This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Using SeqAn and other external libraries in C++

Hello All,

I am new to C++ and also to using external libraries in C++. I am currently trying to use SeqAn for read mapping. I have created a Test.cpp with the following code:

#include <iostream>
#include <seqan/basic.h>
#include <seqan/sequence.h>

using namespace seqan;

int main() {
    std::cout << CharString("SeqAn run successful!") << std::endl;
    return 0;
}

I tried running this code using CodeBlocks, passing the library path while building and its working perfectly fine.

However while trying to compile and run using g++ as:

g++ -I /root/seqan-library-2.3.2/include Test.cpp

throws me more than 100 errors relating to seqan header files being used in my code. Am I missing any step of building the libraries separately or passing the library path to g++ incorrectly?

Please help.

read-mapping seqan

throws me more than 100 errors relating to seqan header files being used in my code.

show us a few errors please.

the libraries seperately or passing the library path to g++

usually, there are a few -l options added at the end of the g++ command...

Agree with @Pierre Lindenbaum commentary, we need more information about errors and warnings. Can you also give us your codeblock compiler settings?

Thanks a lot, the issue got resolved after adding -std=c++14 to g++ command. Thanks again.

0 answers

No answers yet.

Log in to answer this question.