C++ Compiling error.. Symbol Reference


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users C++ Compiling error.. Symbol Reference
# 1  
Old 08-08-2006
C++ Compiling error.. Symbol Reference

Undefined first referenced
symbol in file
std::basic_string<char, std::char_traits<char>, std::allocator<char> >:Smilieperator[](unsigned int) const/var/tmp//cc9ACJBX.o
std::basic_istream<char, std::char_traits<char> >& std:Smilieperator>><char, std::char_traits<char> >(std::basic_istream<char, std::char_traits<char> >&, char&)/var/tmp//cc9ACJBX.o
std::basic_istream<char, std::char_traits<char> >:Smilieperator>>(int&)/var/tmp//cc9ACJBX.o
std::cout /var/tmp//cc9ACJBX.o
std::ios_base::Init::~Init() /var/tmp//cc9ACJBX.o
std::ios_base::Init::Init() /var/tmp//cc9ACJBX.o
__gxx_personality_v0 /var/tmp//cc9ACJBX.o
std::basic_ostream<char, std::char_traits<char> >& std:Smilieperator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)/var/tmp//cc9ACJBX.o
std::basic_istream<char, std::char_traits<char> >::get()/var/tmp//cc9ACJBX.o
std::basic_string<char, std::char_traits<char>, std::allocator<char> >::size() const/var/tmp//cc9ACJBX.o
std::cin /var/tmp//cc9ACJBX.o
ld: fatal: Symbol referencing errors. No output written to a.out


----------------------------------------------------------------
I am having the above errror while compiling a C++ program using "gcc tic.C" command. Please help.

Thanks in advance.
# 2  
Old 08-08-2006
Please use g++ to compile C++ programs.
# 3  
Old 08-09-2006
Thanks buddy

Thanks buddy,

you saved my day.. Smilie
# 4  
Old 08-09-2006
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. Solaris

/usr/lib/passwdutil.so.1: symbol __nsl_fgetspent_r: referenced symbol not found

deleteing post (0 Replies)
Discussion started by: dshakey
0 Replies

7. Solaris

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... (0 Replies)
Discussion started by: milindb
0 Replies

8. Programming

Symbol referencing error

Hey everyone, I can't figure out this symbol referencing error after looking at it for the longest time, and I figured some fresh eyes might be able to point something out I am overlooking. Undefined first referenced symbol in... (1 Reply)
Discussion started by: fromatz
1 Replies

9. Programming

symbol referencing error

Undefined first referenced symbol in file std::basic_ostream<char, std::char_traits<char> >::operator<<(int)/var/tmp//ccTR std::cerr /var/tmp//ccTRcjui.o std::cout /var/tmp//ccTRcjui.o... (1 Reply)
Discussion started by: suhasini
1 Replies

10. Programming

Compiling Errors -- Symbol referencing

I'm trying to compile a FTP_API program. To do this you must use the libftp.so libary. But that libary has references which are not defined. Has anyone had this problems and how is it corrected?? The command line looks like this:-------------------------------------------- # cc ftpstock.c -lftp... (5 Replies)
Discussion started by: spotanddot
5 Replies
Login or Register to Ask a Question