what is "Undefined first referenced symbol in file"

W

Will hunting

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 said:
,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'

$
 
J

Jim Langston

Will hunting said:
hi, when compiling using makefile on unix, I encounter such problem,
anyone has similar experience on this?
what could be the possible cause? thanks

Undefined first referenced

symbol in file



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.
 
W

Will hunting

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top