Re: include files
Mike Aubury <[email protected]> Wed, 16 Jun 2021 17:22:18 +0100
| Newsgroups | gmane.comp.lang.4gl.aubit.general |
|---|---|
| Message-ID | <CAGAq4WHAv04E0t5q4_2AdOcytTMhJQty_6ifj5OpCojAN=bqdg@mail.gmail.com> |
You need to link with your globals file too. On Wed, 16 Jun 2021, 17:20 James B. Byrne via Aubit4gl-discuss, < [email protected]> wrote: > I ran across this 4GL code sample in one of the IBM reference manuals: > > GLOBALS > "d4_globals.4gl" > > Which contains a DATABASE declaration and a complete GLOBAL . . . END > GLOBAL > code block. I have tried to duplicate this feature with Aubit and have an > error generated by the c compiler. > > My globals module contains these lines: > > DATABASE stores_demo > > GLOBALS > DEFINE gr_charges > RECORD > tax_rate DECIMAL(5,3), > ship_charge DECIMAL(16,4), > # ship_charge LIKE orders.ship_charge, > sales_tax DECIMAL(16,4), > order_total DECIMAL(16,4) > END RECORD > . . . > # other gr_record and gr_scalar DEFINESs follow. > . . . > END GLOBALS. > > The include code in the main program is: > > #### > GLOBALS > "mgbl_ex15.4gl" > > #### > > The error I get is: > > 4glc ex15.4gl -o ex15.4ae > Error compiling ex15.4ae - check ex15.4ae.err > Failed command was: gcc -rdynamic ex15.ao -o ex15.4ae > -L"/opt/aubit4gl/lib" > -laubit4gl-1.5_2 > ex15.4ae.err 2>&1 > Exit code is: 256 > > [byrnejb_hll@vhost01 exercise-15 (master)]$ more ex15.4ae.err > /usr/local/bin/ld: ex15.ao: in function `init_module_variables': > ex15.c:(.text+0x86): undefined reference to > `init_global_variables_mgblex15_9041' > /usr/local/bin/ld: ex15.ao: in function `aclfgl_add_order2': > ex15.c:(.text+0x60f1): undefined reference to `gr_orders' > /usr/local/bin/ld: ex15.c:(.text+0x6105): undefined reference to > `gr_orders' > /usr/local/bin/ld: ex15.c:(.text+0x6119): undefined reference to > `gr_orders' > /usr/local/bin/ld: ex15.c:(.text+0x612d): undefined reference to > `gr_orders' > /usr/local/bin/ld: ex15.c:(.text+0x6141): undefined reference to > `gr_orders' > /usr/local/bin/ld: ex15.c:(.text+0x6747): undefined reference to > `gr_charges' > /usr/local/bin/ld: ex15.c:(.text+0x6756): undefined reference to > `gr_charges' > > What else am I supposed to do to get this feature to work? > > > > > > > > -- > *** e-Mail is NOT a SECURE channel *** > Do NOT transmit sensitive data via e-Mail > Unencrypted messages have no legal claim to privacy > Do NOT open attachments nor follow links sent by e-Mail > > James B. Byrne mailto:[email protected] > Harte & Lyne Limited http://www.harte-lyne.ca > 9 Brockley Drive vox: +1 905 561 1241 > Hamilton, Ontario fax: +1 905 561 0757 > Canada L8E 3C3 > > > > _______________________________________________ > Aubit4gl-discuss mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/aubit4gl-discuss > _______________________________________________ Aubit4gl-discuss mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/aubit4gl-discuss