All 3 messages in topic - view as tree
From: ser...@moredata.pt - view profile
Date: Fri, Dec 1 2006 1:44 pm
Email: ser...@moredata.pt
Hi,
When I define an array inside GLOBALS statement in two modules the linker
tells me that the symbol is multiply defined.
This just happens to arrays (records and primitive data types are ok)
because in the generated C it have a initialization.
Does anyone know how to tell to c4gl to do not initialize the array(s) ?
I know that if I use a globals file it works, but my customer have a
strange code generation process.
Thanks
Sérgio Ferreira
Reply » Rate this post: Text for clearing space
From: minnickbr...@aim.com - view profile
Date: Fri, Dec 1 2006 5:17 pm
Email: minnickbr...@aim.com
Since these are not truly global arrays, the scope be only module wide
for each one, just
renaming the array in one of the modules will resolve it.
Good luck,
Brian
>Hi,
>When I define an array inside GLOBALS statement in two modules the
linker
>tells me that the symbol is multiply defined.
>This just happens to arrays (records and primitive data types are ok)
>because in the generated C it have a initialization.
>Does anyone know how to tell to c4gl to do not initialize the array(s)
?
>I know that if I use a globals file it works, but my customer have a
>strange code generation process.
>Thanks
>Sérgio Ferreira
_______________________________________________
________________________________________________________________________
Check Out the new free AIM(R) Mail -- 2 GB of storage and
industry-leading spam and email virus protection.
Reply » Rate this post: Text for clearing space
From: Jonathan Leffler - view profile
Date: Fri, Dec 1 2006 11:07 pm
Email: "Jonathan Leffler"
On 12/1/06, ser...@moredata.pt
> When I define an array inside GLOBALS statement in two modules the linker
> tells me that the symbol is multiply defined.
> This just happens to arrays (records and primitive data types are ok)
> because in the generated C it have a initialization.
> Does anyone know how to tell to c4gl to do not initialize the array(s) ?
You do it by using the GLOBALS "globals.4gl" notation in all files
that need the globals.
You can have multiple GLOBALS "filename.4gl" entries in a file if need be.
Each included globals.4gl file also needs to be compiled separately to
provide the definitions of the variables (instead of the declarations
used when you use the GLOBALS "globals.4gl" notation).
Basically, anything else is wrong - you are lucky if it ever worked.
If you have DATETIME or INTERVAL types in the data, they are
initialized - which means you end up with multiple definitions of the
data.
> I know that if I use a globals file it works, but my customer have a
> strange code generation process.
Fix the broken as well as strange code generation process - you are
trying to ask I4GL to do what it is designed not to do.
--
Jonathan Leffler #include
Email: jleff...@earthlink.net, jleff...@us.ibm.com
Guardian of DBD::Informix v2005.02 -- http://dbi.perl.org/
Reply » Rate this post: Text for clearing space
End of messages
No comments:
Post a Comment