Question: Using SeqAn and other external libraries in C++
1
gravatar for anshupa.vssut
18 months ago by
Germany
anshupa.vssut50 wrote:

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 seperately or passing the library path to g++ incorrectly? Please help.

ADD COMMENTlink modified 18 months ago • written 18 months ago by anshupa.vssut50

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...

ADD REPLYlink written 18 months ago by Pierre Lindenbaum118k

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

ADD REPLYlink modified 18 months ago • written 18 months ago by glihm590

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

ADD REPLYlink written 18 months ago by anshupa.vssut50
Please log in to add an answer.

Help
Access

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