Connecting Tech Pros Worldwide Help | Site Map

what is "Undefined first referenced symbol in file"

  #1  
Old January 4th, 2007, 02:15 AM
Will hunting
Guest
 
Posts: n/a
hi, when compiling using makefile on unix, I encounter such problem,
anyone has similar experience on this?
what could be the possible cause? thanks


make OBJS=out/release "EXTRAFLAGS=-O -DNDEBUG" world

/u04/app/forte/SUNWspro/bin/CC -c -O -DNDEBUG -pto -PIC -DIL_STD
-DILDORACLE -I/usr/include -I/u04/app/ilog/cplex71/include
-I/u04/app/ilog/concert11/include -I/u04/app/ilog/dblink50/include
src/IDODBInterface.cpp -o out/release/IDODBInterface.o

usr/include -I/u04/app/ilog/cplex71/include
-I/u04/app/ilog/concert11/include -Iusr/include
-I/u04/app/ilog/cplex71/include -I/u04/app/ilog/concert11/include
-I/u04/app/ilog/dblink50/include src/IDODataA.cpp -o
out/release/IDODataA.o

/u04/app/forte/SUNWspro/bin/CC -c -O -DNDEBUG -pto -PIC -DIL_STD
-DILDORACLE -I/usr/include -I/u04/app/ilog/cplex71/include
-I/u04/app/ilog/concert11/include -I/u04/app/ilog/dblink50/include
src/IDOEngineImplA.cpp -o out/release/IDOEngineImplA.o

/u04/app/forte/SUNWspro/bin/CC -c -O -DNDEBUG -pto -PIC -DIL_STD
-DILDORACLE -I/usr/include -I/u04/app/ilog/cplex71/include
-I/u04/app/ilog/concert11/include -I/u04/app/ilog/dblink50/include
src/IDOTextInterface.cpp -o out/release/IDOTextInterface.o

/u04/app/forte/SUNWspro/bin/CC -c -O -DNDEBUG -pto -PIC -DIL_STD
-DILDORACLE -I/usr/include -I/u04/app/ilog/cplex71/include
-I/u04/app/ilog/concert11/include -I/u04/app/ilog/dblink50/include
src/helpers.cpp -o out/release/helpers.o

/u04/app/forte/SUNWspro/bin/CC -c -O -DNDEBUG -pto -PIC -DIL_STD
-DILDORACLE -I/usr/include -I/u04/app/ilog/cplex71/include
-I/u04/app/ilog/concert11/include -I/u04/app/ilog/dblink50/include
src/ildutil.cpp -o out/release/ildutil.o

/u04/app/forte/SUNWspro/bin/CC -c -O -DNDEBUG -pto -PIC -DIL_STD
-DILDORACLE -I/usr/include -I/u04/app/ilog/cplex71/include
-I/u04/app/ilog/concert11/include -I/u04/app/ilog/dblink50/include
src/main.cpp -o out/release/main.o

/u04/app/forte/SUNWspro/bin/CC -O -DNDEBUG -pto -PIC -DIL_STD
-DILDORACLE -I/usr/include -I/u04/app/ilog/cplex71/include
-I/u04/app/ilog/concert11/include -I/u04/app/ilog/dblink50/include
out/release/IDODBInterface.o out/release/IDODataA.o out/release/ID


OEngineImplA.o out/release/IDOTextInterface.o out/release/helpers.o
out/release/ildutil.o out/release/main.o -L/export/home/liguan/lib
-lcommon -L/u04/app/ilog/cplex71/lib/sparc_5_5.0/static_pic_mt
-lilocplex -lcplex -L/u04/app/ilog/concert11/lib/sparc_5_


5.0/static_pic_mt -lconcert -L/u01/app/oracle/product/8.1.7/lib
-lclntsh -L/u04/app/ilog/dblink50/lib/sparc_5_5.0/static_pic_mt
-ldbora81 -ldbkernel -ldblnkst -lilog -lsocket -lnsl -lthread -ldl -o
out/engine

Undefined first referenced

symbol in file

std::vector<std::basic_string<char,std::char_trait s<char>,std::allocator<char>
Quote:
>,std::allocator<std::basic_string<char,std::char_ traits<char>,std::allocator<char FpcIntegration::solveFPC(double) out/release/IDODataA.o
FpcIntegration::FpcIntegration() out/release/IDODataA.o

ld: fatal: Symbol referencing errors. No output written to out/engine

*** Error code 1

make: Fatal error: Command failed for target `out/engine'

Current working directory /export/home/liguan/IDO

*** Error code 1

make: Fatal error: Command failed for target `release'

$

  #2  
Old January 4th, 2007, 09:35 AM
Jim Langston
Guest
 
Posts: n/a

re: what is "Undefined first referenced symbol in file"



"Will hunting" <lihangbo@gmail.comwrote in message
news:1167876745.762897.139330@51g2000cwl.googlegro ups.com...
Quote:
hi, when compiling using makefile on unix, I encounter such problem,
anyone has similar experience on this?
what could be the possible cause? thanks
<SNIP>
Quote:
Undefined first referenced
>
symbol in file
>
std::vector<std::basic_string<char,std::char_trait s<char>,std::allocator<char>
Quote:
>>,std::allocator<std::basic_string<char,std::char _traits<char>,std::allocator<char>
Quote:
FpcIntegration::solveFPC(double) out/release/IDODataA.o
>
FpcIntegration::FpcIntegration() out/release/IDODataA.o
>
ld: fatal: Symbol referencing errors. No output written to out/engine
>
*** Error code 1
>
make: Fatal error: Command failed for target `out/engine'
>
Current working directory /export/home/liguan/IDO
>
*** Error code 1
>
make: Fatal error: Command failed for target `release'
Sounds like you forgot to:
#include <string>
#include <vector>

Or, the method:
solveFPC in the class FpcIntegration is not defined.


  #3  
Old January 4th, 2007, 01:55 PM
Will hunting
Guest
 
Posts: n/a

re: what is "Undefined first referenced symbol in file"


thanks, I have found that in my makefile, I forgot to add -lfpc to
include the libfpc.so shared objects, so that when linking, error msg
symbol not defined appeared.

Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
"const int" as function parameter type qingning answers 2 October 18th, 2006 02:55 PM