Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Solaris / OpenSolaris This forum is for the discussion of Solaris and OpenSolaris.
General Sun, SunOS and Sparc related questions also go here.


  Search this Thread
Old 03-12-2009, 01:44 PM   #1
LQ Newbie
Registered: Feb 2009
Posts: 5

Rep: Reputation: 0
Compiled C++ static library not recognized

I compiled Clp-1.9.0 ( on a sun workstation.
And try to link the generated static library to my program with
g++ -I../Clp-1.9.0/include/coin/ -o bin/Release/LPSVMFeatureSelector *.cpp -L../Clp-1.9.0/lib -lClp -lCoinUtils
But the result is:
/a/cmdsv3/vol/vol2/ia510/gnu/bin/../lib/gcc/i386-pc-solaris2.10/3.4.3/../../../../i386-pc-solaris2.10/bin/ld: warning:, needed by /a/cmdsv3/vol/vol2/ia510/SparCompiler/SUNWspro/lib/, may conflict with
/var/tmp//ccbnR1wV.o: In function `uniwits::BalancedOmegaSVM::clear()':
Model2Classes.cpp:(.text+0x211): undefined reference to `ClpModel::~ClpModel()'
/var/tmp//ccbnR1wV.o: In function `uniwits::BalancedOmegaSVM::useSimplex()':
Model2Classes.cpp:(.text+0x334): undefined reference to `ClpModel::~ClpModel()'
Model2Classes.cpp:(.text+0x36b): undefined reference to `ClpSimplex::ClpSimplex(bool)'
/var/tmp//ccbnR1wV.o: In function `uniwits::BalancedOmegaSVM::useInterior()':
Model2Classes.cpp:(.text+0x3d4): undefined reference to `ClpModel::~ClpModel()'
Model2Classes.cpp:(.text+0x409): undefined reference to `ClpInterior::ClpInterior()'
/var/tmp//ccbnR1wV.o: In function `uniwits::BalancedOmegaSVM::formulate(uniwits::KernelComputer&, double)':
Model2Classes.cpp:(.text+0x1610): undefined reference to `ClpModel::resize(int, int)'
Model2Classes.cpp:(.text+0x1bb7): undefined reference to `ClpModel::setSpecialOptions(unsigned int)'
Model2Classes.cpp:(.text+0x1bf5): undefined reference to `CoinPackedMatrix::CoinPackedMatrix(bool, double, double)'
Model2Classes.cpp:(.text+0x1c70): undefined reference to `CoinPackedMatrix::assignMatrix(bool, int, int, int, double*&, int*&, int*&, int*&, int, int)'
Model2Classes.cpp:(.text+0x1c9a): undefined reference to `ClpPackedMatrix::ClpPackedMatrix(CoinPackedMatrix*)'
Model2Classes.cpp:(.text+0x1ce6): undefined reference to `ClpModel::replaceMatrix(ClpMatrixBase*, bool)'
/var/tmp//ccbnR1wV.o: In function `uniwits::BalancedOmegaSVM::execute()':
Model2Classes.cpp:(.text+0x1dba): undefined reference to `ClpSimplex::dual(int, int)'
Model2Classes.cpp:(.text+0x1dcd): undefined reference to `ClpInterior::primalDual()'
/var/tmp//ccE0QWZt.o: In function `uniwits::execute2ClassTrainingSet(uniwits::TrainingSet&, std::basic_ostream<char, std::char_traits<char> >&, uniwits::MessageWriter&)':
console.cpp:(.text+0x37f): undefined reference to `ClpSimplex::ClpSimplex(bool)'
console.cpp:(.text+0x3ae): undefined reference to `ClpSimplex::~ClpSimplex()'
console.cpp:(.text+0x825): undefined reference to `ClpSimplex::~ClpSimplex()'
console.cpp:(.text+0x877): undefined reference to `ClpSimplex::~ClpSimplex()'
/var/tmp//ccE0QWZt.o: In function `ClpModel::setLogLevel(int)':
console.cpp:(.gnu.linkonce.t._ZN8ClpModel11setLogLevelEi+0x16): undefined reference to `CoinMessageHandler::setLogLevel(int)'
Beside that initial warning, the linker cannot find any function in the provided library. However, I succeeded with the following command on another PC running CentOS. Only paths are different.

g++ -I/opt/Clp-1.9.0/include/coin/ -o bin/Release/LPSVMFeatureSelector *.cpp -L/opt/Clp-1.9.0/lib -lClp -lCoinUtils
I need it to working on workstations. Can anyone help?

Old 03-15-2009, 03:31 PM   #2
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2015, Slack14.1 DebJessie, + 50+ other Linux OS, for test only.
Posts: 15,644

Rep: Reputation: 2993Reputation: 2993Reputation: 2993Reputation: 2993Reputation: 2993Reputation: 2993Reputation: 2993Reputation: 2993Reputation: 2993Reputation: 2993Reputation: 2993
I have no experience with static libs on Solaris,
but how about trying with the shared libs ? ?

> > ..
...... ..

Old 03-15-2009, 04:11 PM   #3
LQ Newbie
Registered: Feb 2009
Posts: 5

Original Poster
Rep: Reputation: 0
Thank you for your reply!
But, in fact, I tried, and I failed.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
shared library containing static library serbet Programming 0 01-04-2008 03:17 AM
creating static library that includes another static library kskkumar Programming 2 10-22-2007 10:51 AM
Making a static library from a given shared library vro Programming 1 07-27-2007 04:07 PM
LINUX - linking archive (static library) with shared (dynamic) library gurkama Programming 5 03-04-2007 11:11 PM
howto compile bin with my library using all-static and shared linked standart library stpg Programming 4 06-29-2004 04:20 AM

All times are GMT -5. The time now is 02:45 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration