Thanks a lot ! Seems its working now. Even if I still don't know why it wasn't working before. Thanks again ! Robin
Hi everyone,
For a project using the GATB library, I have to read Fasta files. I made a code very similar to one of the snippets examples, but I have a linking error during compilation for the "bank" functions. The strange thing is that only "bank" functions produces an linking error (I also use Bloom filters, and it works). Please, could you have a look on it ? Where is the error ?
My directories : ~/MyProject/gatb ~/MyProject/test.cpp Compiling command : g++ test.cpp -Igatb-core/include -Lgatb-core/lib -lgatbcore -lhdf5 -ldl -lz -lpthread -std=c++0x -O3 -o test
Here is my code : https://pastebin.com/3a5zGWwB
And here is the error :
/tmp/cc4mGPEd.o : In the function « main » : test.cpp:(.text.startup+0x87) : undefined reference to « gatb::core::bank::impl::Bank::_open_(std::__cxx11::basic_string<char, std::char_traits<char="">, std::allocator<char> > const&) » collect2: error: ld returned 1 exit status
1 answer
Hi,
I am not sure why you have an error only for bank functions. Anyway, I was able to compile your example from a fresh gatb install with these commands :
cd /Users/grizk/newproj
git clone https://github.com/GATB/gatb-core.git
cd gatb-core/gatb-core
mkdir build ; cd build ; cmake .. ; make -j8
cd /Users/grizk/newproj
GATB=/Users/grizk/newproj/gatb-core/gatb-core
g++ test.cpp -O3 -I${GATB}/src -I${GATB}/build/include -I${GATB}/thirdparty -L${GATB}/build/lib -lgatbcore -lpthread -lz -lhdf5 -std=c++0x -ldl -o test
You can also see a sample makefile in gatb-core/gatb-core/examples.
Guillaume
Log in to answer this question.