relocation error: undefined symbol stat64
I am writing an interface between IDL (3D graphical display and processing system) and an industry standard data repository. The IDL programs SPAWNs a C++ program, say ServFred, that has a two-way pipe. The IDL system passes commands to ServFred and ServFred calls the API, passing back data and statuses to IDL. I am developing the code on a 32 bit Linux box.
The providers of the API supply sample programs so that one may compile, link and run then to test that the environment has been set up correctly. These work on my 32 bit development machine and the binary executables work when ftp'd to the target 64 bit Linux machine.
So I have a "Stand Alone" test version , Fred, that exercises all the functionality in the API that I wish to use in the Server version ServFred.
Again this works on both my the 32bit machine and the 64 target machine.
However, when I ftp the executable ServFred to the 64 bit machine at certain point in processing when goes to get a certain type of data I get:
servfred: relocation error: servfred: undefined symbol: stat64
even though the "exact" same functionality is exercised in my test program Fred.
Please can you explain what a "relocation error" is and what a "undefined symbol" means.
Is this caused by:
1. My not using the correct compile/link flags in compiling my C++ code.
2. The .h archive files not having been compiled with the correct flags
3. Inability of the ServFred to find a dynamically linked executable to satisfy stat64 at run time; possibly a problem with LD_LIBRARY_PATH
4. A change in the environment that it inherits when spawned out of IDL.
I realise that I have not supplied that I have not provided any version numbers of Linux, G++ compiler etc but will gladly provide whatever is relevant.