GATB - Read fasta files
1
0
Entering edit mode
6.2 years ago
robi ▴ 10

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

gatb • 1.5k views
ADD COMMENT
2
Entering edit mode
6.2 years ago

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

ADD COMMENT
1
Entering edit mode

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

ADD REPLY

Login before adding your answer.

Traffic: 2591 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6