The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
.
google unix.com



High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
ld: fatal: Symbol referencing errors rudolph High Level Programming 1 05-25-2009 08:06 AM
ld: fatal: Symbol referencing errors shafi2all Shell Programming and Scripting 1 06-18-2008 10:21 AM
ld: fatal: Symbol referencing errors. No output written to SNX jerryragland High Level Programming 1 08-09-2006 02:15 AM
ld: fatal: Symbol referencing errors alfabetman UNIX for Dummies Questions & Answers 2 01-08-2002 04:57 AM
Compiling Errors -- Symbol referencing spotanddot High Level Programming 5 07-11-2001 02:18 PM

Reply
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 06-24-2009
acheong87 acheong87 is offline
Registered User
  
 

Join Date: Jan 2009
Posts: 6
C++ ld: fatal: Symbol referencing errors.

Hello. I used to compile my code including a third-party library, "libfoo.so". Now, the vendor ships a statically linked library, "libfoo.a", instead. With this library, I run into the following error:


Code:
CC  -mt -xarch=v9 -DCOMPILE_SOL_SPARC -ftrap=%none -xlibmil  -xchip=ultra2 -xbuiltin -xO4 \
-D_REENTRANT -DNDEBUG -instances=static -I. -I/home/test/release64/include -I/home/test/release64/include \
-I/home/test/src/foo/common  -I/home/test/src/foo/foo -I/infrastructure/core/release64/include \
-I/infrastructure/core/third-party/boost_1_36_0    -xildoff -norunpath  -o /home/test/release64/bin/xyz \
/home/test/release64/obj/xyz/app.o \
\
        /home/test/release64/obj/xyz/compiledate.o -L/home/test/release64/lib \
-L/home/test/src/foo/lib/SOL_SPARC -L/infrastructure/core/release64/lib -lfoo -ldl \
-lsocket -ldemangle -lm -lnsl -lz -lsched -R /usr/lib/lwp/64 \
 
Undefined                       first referenced
 symbol                             in file
 
std::basic_string<char,std::char_traits<char>,
  std::allocator<char> >&std::basic_string<char,std::char_traits<char>,
  std::allocator<char> >::operator+=(const char*)
 
                                /home/test/src/foo/lib/SOL_SPARC/libfoo.a(app.o) 
 
[...]
 
(symbol belongs to implicit dependency /usr/lib/sparcv9/libCstd.so.1)
 
ld: fatal: Symbol referencing errors. No output written to /home/test/release64/bin/foo
*** Error code 1

I've tried "-Bstatic -lfoo -Bdynamic" with no success. I see several Google results about this error, but none that helps me specifically. Am I compiling with the wrong options? Is it something that the vendor must change? Hope someone can point me in the right direction, thanks!

EDIT: I am using Sun Studio 12 Update 1. I have already tried "-L/usr/lib/sparcv9 -lCstd" as well.

Last edited by acheong87; 06-24-2009 at 10:28 AM..
Reply

Bookmarks

Tags
link error, solaris

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 12:06 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0