Re: "undefined reference" in .o files

Mike Aubury <[email protected]>
Newsgroups gmane.comp.lang.4gl.aubit.general
Message-ID <CAGAq4WE4qQQDo2N=JSU5y-YGbgJXdDAJhDHEfGW_4hJZT9MoCg@mail.gmail.com>
Its normally because you're not linking in something you should be...
Maybe you have an empty GLOBALS file which you have in the GLOBALS  section
- but isnt on being linked in ?

The hex stuff is just a hash  meant to check that the module and globals
are in line - so there should be a "globals.4gl" (the bit before the hex -
but after the init_global_variables) which defines the
init_global_variables_globals_<hex>.

If the globals.c has a  "init_global_variables_globals_..." - but its
different hex hash - then the "hashing" is different between the two -
perhaps globals.4gl was compiled at a different time - and has had
something change ?
(The hashing is based on the variables defined)





On 3 February 2015 at 16:54, Malcolm Perrior <
[email protected]> wrote:

>  Well, testbedding of the Windows binary continues apace!
>
>
>
> How about this one: compilation of 4gl code seems to create a call to a
> function with a name of the format
>
>
>
> void init_global_variables_globals_<hex_number>(void)
>
>
>
> It places this line in the top of the .c compiled from the .4gl amongst
> the A4GL_FUNCTION definitions for the functions in the 4gl file, and calls
> it in the c function  A4GL_INTERNAL_FUNCTION static void
> init_module_variables(void); there is a comment line immediately above it
> saying “/// Initialise any other global variables”
>
>
>
> So when we compile and link all our output object files together we get an
> error complaining about an undefined reference…
>
> The <hex number> seems arbitrary.
>
>
>
> Any clues on this one?
>
>
>
> (Sorry to continue being a pain. Oh and also apologies for the extended
> disclaimer in my company email, can’t fix that, sorry!)
>
>
>
>
>
> **********************************************************************
> The information contained in this email is intended only for the
> individual or entity to whom it is addressed. It may contain privileged and
> confidential information and if you are not an intended recipient you must
> not copy, distribute or take any action in reliance on it. If you have
> received this email in error, please notify us immediately by telephone on
> (020) 8628 3456. Please also destroy and delete the message from your
> computer.
>
> Any opinions expressed in this message are those of the sender only and do
> not necessarily represent the views of Foresters. The sender may not be
> authorised to give financial advice and nothing in this message should be
> construed as offering such advice or entering into any contract on behalf
> of any Foresters Company.
>
> Forester Life Limited is authorised by the Prudential Regulation Authority
> and regulated by the Financial Conduct Authority and Prudential Regulation
> Authority.
>
> Forester Fund Management Limited is authorised and regulated by the
> Financial Conduct Authority. The Children’s Mutual is a trading name of
> Forester Fund Management Ltd.
>
> Companies within the Foresters UK Group are registered in England as
> follows:
> Forester Life Limited 2997655, Forester Fund Management Limited 4315370
> and Forester Holdings (Europe) Limited 3013082.
>
> Registered Offices for all companies within the Foresters UK Group:
> Foresters House, 2 Cromwell Avenue, Bromley, BR2 9BF. T 020 8628 3400. F
> 020 8628 3500. E [email protected] foresters.com
> **********************************************************************
>
>
> ------------------------------------------------------------------------------
> Dive into the World of Parallel Programming. The Go Parallel Website,
> sponsored by Intel and developed in partnership with Slashdot Media, is
> your
> hub for all things parallel software development, from weekly thought
> leadership blogs to news, videos, case studies, tutorials and more. Take a
> look and join the conversation now. http://goparallel.sourceforge.net/
> _______________________________________________
> Aubit4gl-discuss mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/aubit4gl-discuss
>
>

------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/

_______________________________________________
Aubit4gl-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/aubit4gl-discuss
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.