Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C++ and Visual C++ > C++ Programming
|
C++ Programming General discussions for the C++ language. For questions specific to Microsoft's Visual C++ variant, see the Visual C++ forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C++ Programming section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old July 5th, 2007, 10:05 AM
Registered User
 
Join Date: Jul 2007
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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.

Many thanks

Reply With Quote
  #2 (permalink)  
Old July 12th, 2007, 09:00 AM
Registered User
 
Join Date: Jul 2007
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The solution was to re-arrange the order of libraries in LD_LIBRARY_PATH. For some (unknown) reason if the Oracle libs were first on the path the STAT64 error occurred as soon as any Oracle activity was invoked.

Reply With Quote





Similar Threads
Thread Thread Starter Forum Replies Last Post
Undefined Function Error arimakidd Beginning PHP 2 November 10th, 2005 02:54 AM
error LNK2019: unresolved external symbol tinawalt VS.NET 2002/2003 3 August 9th, 2005 07:59 AM
undefined symbol: apr_bucket_type_file surajmundada Linux 0 December 7th, 2004 06:46 AM
Error-cannot resolve symbol Rusk JSP Basics 1 February 18th, 2004 09:20 AM
Error: Cannot resolve symbol "Beginning JSP" amcp2002 Wrox Book Feedback 2 July 22nd, 2003 03:30 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.