Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > C# and C > C++ and Visual C++ > C++ Programming
Password Reminder
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 5th, 2007, 10:05 AM
Registered User
Join Date: Jul 2007
Location: Maidstone, Kent, United Kingdom.
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
Location: Maidstone, Kent, United Kingdom.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts

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

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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

All times are GMT -4. The time now is 11:54 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.