More Smilearn tutorial compilation problems

The engine.
Post Reply
ermutarra
Posts: 17
Joined: Fri Apr 24, 2009 1:19 pm

More Smilearn tutorial compilation problems

Post by ermutarra »

Hi,

I'm trying to compile the first Smilearn tutorial but I'm running into problems.
The error message is exactly the following:

nnn@nnn:~/SMILE/tutorial$ make
g++ -O3 -DNDEBUG -ffast-math -c tutorial1.cpp -I/home/nnn/SMILE/lib
g++ -O3 -DNDEBUG -ffast-math tutorial1.o -o tutorial1 -L/home/nnn/SMILE/lib -lsmile -lsmilearn
/home/nnn/SMILE/lib/libsmilearn.a(dataset.o): In function `DSL_dataset::MatchNetwork(DSL_network const&, std::vector<DSL_datasetMatch, std::allocator<DSL_datasetMatch> >&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >&)':
dataset.cxx:(.text+0xca0): undefined reference to `DSL_network::FindNode(char const*) const'
dataset.cxx:(.text+0xdc0): undefined reference to `DSL_stringArray::FindPosition(char const*) const'
/home/nnn/SMILE/lib/libsmilearn.a(dataset.o): In function `DSL_dataset::ReadFile(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, DSL_datasetParseParams const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> >*)':
dataset.cxx:(.text+0x2abe): undefined reference to `ErrorH'
dataset.cxx:(.text+0x2ac7): undefined reference to `DSL_errorStringHandler::LogError(int, char const*, char const*)'
collect2: ld returned 1 exit status
make: *** [tutorial1] Error 1
shooltz[BayesFusion]
Site Admin
Posts: 1417
Joined: Mon Nov 26, 2007 5:51 pm

Re: More Smilearn tutorial compilation problems

Post by shooltz[BayesFusion] »

The problem is most likely related to the order of the libraries in gcc's command line. Try this:

Code: Select all

g++ tutorial1.cpp -O3 -DNDEBUG -I/home/nnn/SMILE/lib -L/home/nnn/SMILE/lib -lsmilearn -lsmile -o tutorial1 
ermutarra
Posts: 17
Joined: Fri Apr 24, 2009 1:19 pm

Post by ermutarra »

This solved this problem. Thank you!!!
Post Reply