Question: GATB - Read fasta files
gravatar for robi
13 months ago by
robi10 wrote:

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 :

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

gatb • 383 views
ADD COMMENTlink modified 13 months ago by guillaume.rizk20 • written 13 months ago by robi10
gravatar for guillaume.rizk
13 months ago by
guillaume.rizk20 wrote:


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
cd gatb-core/gatb-core
mkdir build ; cd build ; cmake .. ; make -j8

cd /Users/grizk/newproj

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.


ADD COMMENTlink written 13 months ago by guillaume.rizk20

Thanks a lot ! Seems its working now. Even if I still don't know why it wasn't working before. Thanks again ! Robin

ADD REPLYlink written 13 months ago by robi10
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1217 users visited in the last hour