By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,190 Members | 1,555 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,190 IT Pros & Developers. It's quick & easy.

what is "Undefined first referenced symbol in file"

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

$

Jan 4 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a

"Will hunting" <li******@gmail.comwrote in message
news:11**********************@51g2000cwl.googlegro ups.com...
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>
Undefined first referenced

symbol in file

std::vector<std::basic_string<char,std::char_trait s<char>,std::allocator<char>
>>,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'
Sounds like you forgot to:
#include <string>
#include <vector>

Or, the method:
solveFPC in the class FpcIntegration is not defined.
Jan 4 '07 #2

P: n/a
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.

Jan 4 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.