Symbol reference error for same code & libraries but compiled in different environmen


 
Thread Tools Search this Thread
Operating Systems Solaris Symbol reference error for same code & libraries but compiled in different environmen
# 1  
Old 07-10-2009
Question Symbol reference error for same code & libraries but compiled in different environmen

Hi All,
I am having a code written in C++.First I build this code on SUN 5.10.It was built successfully.Following is the log when build was successful.

-L/apps/compilers/SUNWspro/lib -lm -lsunmath \
-o App
ld: warning: symbol `clog' has differing types:
(file /apps/SUNWspro_studio10/lib/libiostream.so type=OBJT; file /lib/libm.so type=FUNC);
/apps/SUNWspro_studio10/lib/libiostream.so definition taken

After this warning also I got the executable as App.

but when I build same code in another environment(on SUN 5.10 only)having same configuration as earlier.It has thrown "symbol reference error".Build log is as follows.

-L/appl/util/Sun/SUNWspro/prod/lib -lm -lsunmath \
-o App
CC: Warning: -xarch=v8plusa is deprecated, use -m32 -xarch=sparcvis instead
ld: warning: symbol `clog' has differing types:
(file /appl/util/Sun/SUNWspro/lib/libiostream.so type=OBJT; file /lib/libm.so type=FUNC);
/appl/util/Sun/SUNWspro/lib/libiostream.so definition taken
Undefined first referenced
symbol in file
main /appl/util/Sun/SUNWspro/prod/lib/crt1.o
ld: fatal: Symbol referencing errors. No output written to App
*** Error code 1
make: Fatal error: Command failed for target `App'


Only difference I see is the -xarch warning.
Is the warning causig error?
If yes how could I resolve this?

If not the warning then what could be the cause of error.

Thanks in advance.

Last edited by milindb; 07-10-2009 at 11:37 AM..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Programming

Compiling C++ code with NetCDF libraries: "undefined reference"

Hi! I am trying to compile a C++ code with cmake and gcc on Ubuntu. The code uses NetCDF4 libraries. I specify the path to these libraries as follows: -I/usr/local/include -L/usr/local/lib -lnetcdf -lnetcdf_c++4 "ccmake" and "cmake" work fine. After typing "make" I receive the error... (0 Replies)
Discussion started by: Alauda
0 Replies

2. Shell Programming and Scripting

Perl de-reference code reference variable

Guys, May i know how can we de reference the code reference variable.? my $a = sub{$a=shift;$b=shift;print "SUM:",($a+$b),"\n";}; print $a->(4,5); How can we print the whole function ? Please suggest me regarding this. Thanks for your time :) Cheers, Ranga :) (0 Replies)
Discussion started by: rangarasan
0 Replies

3. Shell Programming and Scripting

symbol list reference

Can anyone direct me to a page that holds a list of perl's built in symbols? Example: $_ means blah $? means blah2 $! means blah3 (3 Replies)
Discussion started by: mrwatkin
3 Replies

4. Shell Programming and Scripting

Symbol reference

Hi, test -d .ssh || mkdir .ssh && chmod 700 .ssh The command has couple of symbols, could someone redirect me to the link, where i can understand their significance. Thanks, John (1 Reply)
Discussion started by: john_prince
1 Replies

5. Programming

gcc symbol reference error in Solaris

Hi there, Honestly i'm not much of a code guy but i found some short piece of code over the net which i need to compile in my Solaris machine (in order to change my hostid). As far as i read - i need to use the gcc to compile this short text file making it an executable file. My problem is... (0 Replies)
Discussion started by: avisht
0 Replies

6. Shell Programming and Scripting

use of \&\& symbol

sh /home/juser/ajss/utils/ajstartdb.sh oragold@hydapps.test.com /d03/AppsGOLD/golddb/9.2.0/GOLD_hydapps.env \&\& /home/oragold/ajss/ajstrtdb.sh the above command will execute ajstrtdb.sh file which is located in another machine. but can u specify the use of \&\& here... Is there any... (2 Replies)
Discussion started by: suryahota
2 Replies

7. UNIX for Advanced & Expert Users

C++ Compiling error.. Symbol Reference

Undefined first referenced symbol in file std::basic_string<char, std::char_traits<char>, std::allocator<char> >::operator(unsigned int) const/var/tmp//cc9ACJBX.o std::basic_istream<char, std::char_traits<char> >& std::operator>><char,... (3 Replies)
Discussion started by: bjena
3 Replies

8. Solaris

How to print libraries used by compiled proC object

How to print libraries used by a compiled proC object? I beleive these libararies need to be in the PATH to successfully run the given proC. TIA, Greg (1 Reply)
Discussion started by: greg0320
1 Replies

9. Programming

Why my code couldn't be compiled

#include <Xm/Xm.h> #include <Xm/PushB.h> Widget CreatePushbutton(Widget parent, char* name, XtCallbackProc callback, XtPointer client_data) { Widget push; Arg args; Cardinal n; n=0; push=XmCreatePushButton(parent, name, args, n); XtAddCallback(push,... (4 Replies)
Discussion started by: endeavour1985
4 Replies

10. Programming

Unresolved Symbol on HP UX & oracle7

Hi everyone, I have a problem. I do not succeed to linking the oracle7's library for my .so and a Unresolved Symbol :sqlcxt error returns me when I call program. this is my makefile. cc -Ae -I/usr/include/curses_colr -L/usr/lib -DUSE_TERMIOS -D_FILE64 -DDYNAMIC_LIBRARIES_SUPPORTED... (2 Replies)
Discussion started by: luckycs
2 Replies
Login or Register to Ask a Question