Hi Jared, you have to compile all .cpp files within a test folder (like test/ index/). Then you need to link all of them and also link against the rt-library with the "-lrt" option. You find general information about building on our website and in the Trac Wiki (Development Link), see "Getting Started". Regards, David -- David Weese weese@inf.fu-berlin.de Freie Universität Berlin http://www.inf.fu-berlin.de/ Institut für Informatik Phone: +49 30 838 75246 Takustraße 9 Algorithmic Bioinformatics 14195 Berlin Room 021 Am 09.11.2009 um 23:05 schrieb Jared Wilkening: > Hi all, > > I have been trying to get a bit of code running using the SeqAn lib > but keep hitting an issue when I have find in my > code. > > To check if it was an issue with my code or something else I attempted > to build test_index.cpp from svn_repo .../projects/tests/index/. > > My setup: > gcc version 4.1.2 > Seqan_Release_1.2 from the website > > g++ -c -I. test_index.cpp //No issues > g++ test_index.o -o test_index //This blows up with the same > issues that I get in my code: see errors below > > errors: > test_index.o: In function `main': > test_index.cpp:(.text+0xe0e2): undefined reference to `testQGramIndex > ()' > test_index.cpp:(.text+0xe11f): undefined reference to `testShapes()' > test_index.cpp:(.text+0xe18c): undefined reference to `testBWTWalk > (char const*)' > test_index.cpp:(.text+0xe1f4): undefined reference to > `testIndexCreation()' > test_index.o: In function `bool seqan::awriteAt<void, > seqan::Pair<seqan::Pair<unsigned long, unsigned long, > seqan::Tag<seqan::_Compressed> >, seqan::Tuple<unsigned char, 7u, > void>, seqan::Tag<seqan::_Compressed> >, unsigned long, > long>(seqan::File<seqan::Async<void> >&, > seqan::Pair<seqan::Pair<unsigned long, unsigned long, > seqan::Tag<seqan::_Compressed> >, seqan::Tuple<unsigned char, 7u, > void>, seqan::Tag<seqan::_Compressed> > const*, unsigned long, long, > aiocb&)': > test_index.cpp: > (.text > ._ZN5seqan8awriteAtIvNS_4PairINS1_ImmNS_3TagINS_11_CompressedEEEEENS_5TupleIhLj7EvEES4_EEmlEEbRNS_4FileINS_5AsyncIT_EEEEPKT0_T1_T2_R5aiocb > [bool > seqan::awriteAt<void, seqan::Pair<seqan::Pair<unsigned long, unsigned > long, seqan::Tag<seqan::_Compressed> >, seqan::Tuple<unsigned char, > 7u, void>, seqan::Tag<seqan::_Compressed> >, unsigned long, > long>(seqan::File<seqan::Async<void> >&, > seqan::Pair<seqan::Pair<unsigned long, unsigned long, > seqan::Tag<seqan::_Compressed> >, seqan::Tuple<unsigned char, 7u, > void>, seqan::Tag<seqan::_Compressed> > const*, unsigned long, long, > aiocb&)]+0xb8): undefined reference to `aio_write64' > test_index.o: In function `bool seqan::awriteAt<void, > seqan::Pair<unsigned long, unsigned long, > seqan::Tag<seqan::_Compressed> >, unsigned long, > long>(seqan::File<seqan::Async<void> >&, seqan::Pair<unsigned long, > unsigned long, seqan::Tag<seqan::_Compressed> > const*, unsigned long, > long, aiocb&)': > test_index.cpp: > (.text > ._ZN5seqan8awriteAtIvNS_4PairImmNS_3TagINS_11_CompressedEEEEEmlEEbRNS_4FileINS_5AsyncIT_EEEEPKT0_T1_T2_R5aiocb > [bool > seqan::awriteAt<void, seqan::Pair<unsigned long, unsigned long, > seqan::Tag<seqan::_Compressed> >, unsigned long, > long>(seqan::File<seqan::Async<void> >&, seqan::Pair<unsigned long, > unsigned long, seqan::Tag<seqan::_Compressed> > const*, unsigned long, > long, aiocb&)]+0x9a): undefined reference to `aio_write64' > test_index.o: In function `bool seqan::awriteAt<void, > seqan::Pair<unsigned long, seqan::Tuple<unsigned long, 7u, void>, > seqan::Tag<seqan::_Compressed> >, unsigned long, > long>(seqan::File<seqan::Async<void> >&, seqan::Pair<unsigned long, > seqan::Tuple<unsigned long, 7u, void>, seqan::Tag<seqan::_Compressed> >> const*, unsigned long, long, aiocb&)': > test_index.cpp: > (.text > ._ZN5seqan8awriteAtIvNS_4PairImNS_5TupleImLj7EvEENS_3TagINS_11_CompressedEEEEEmlEEbRNS_4FileINS_5AsyncIT_EEEEPKT0_T1_T2_R5aiocb > [bool > seqan::awriteAt<void, seqan::Pair<unsigned long, seqan::Tuple<unsigned > long, 7u, void>, seqan::Tag<seqan::_Compressed> >, unsigned long, > long>(seqan::File<seqan::Async<void> >&, seqan::Pair<unsigned long, > seqan::Tuple<unsigned long, 7u, void>, seqan::Tag<seqan::_Compressed> >> const*, unsigned long, long, aiocb&)]+0x9a): undefined reference to > `aio_write64' > test_index.o: In function `bool seqan::awriteAt<void, > seqan::Triple<unsigned long, seqan::Tuple<unsigned long, 3u, void>, > seqan::Tuple<unsigned long, 6u, void>, seqan::Tag<seqan::_Compressed> >> , unsigned long, long>(seqan::File<seqan::Async<void> >&, > seqan::Triple<unsigned long, seqan::Tuple<unsigned long, 3u, void>, > seqan::Tuple<unsigned long, 6u, void>, seqan::Tag<seqan::_Compressed> >> const*, unsigned long, long, aiocb&)': > test_index.cpp: > (.text > ._ZN5seqan8awriteAtIvNS_6TripleImNS_5TupleImLj3EvEENS2_ImLj6EvEENS_3TagINS_11_CompressedEEEEEmlEEbRNS_4FileINS_5AsyncIT_EEEEPKT0_T1_T2_R5aiocb > [bool > seqan::awriteAt<void, seqan::Triple<unsigned long, > seqan::Tuple<unsigned long, 3u, void>, seqan::Tuple<unsigned long, 6u, > void>, seqan::Tag<seqan::_Compressed> >, unsigned long, > long>(seqan::File<seqan::Async<void> >&, seqan::Triple<unsigned long, > seqan::Tuple<unsigned long, 3u, void>, seqan::Tuple<unsigned long, 6u, > void>, seqan::Tag<seqan::_Compressed> > const*, unsigned long, long, > aiocb&)]+0xb1): undefined reference to `aio_write64' > test_index.o: In function `bool seqan::awriteAt<void, > seqan::Triple<unsigned long, seqan::Tuple<unsigned long, 3u, void>, > seqan::Tuple<unsigned long, 4u, void>, seqan::Tag<seqan::_Compressed> >> , unsigned long, long>(seqan::File<seqan::Async<void> >&, > seqan::Triple<unsigned long, seqan::Tuple<unsigned long, 3u, void>, > seqan::Tuple<unsigned long, 4u, void>, seqan::Tag<seqan::_Compressed> >> const*, unsigned long, long, aiocb&)': > test_index.cpp: > (.text > ._ZN5seqan8awriteAtIvNS_6TripleImNS_5TupleImLj3EvEENS2_ImLj4EvEENS_3TagINS_11_CompressedEEEEEmlEEbRNS_4FileINS_5AsyncIT_EEEEPKT0_T1_T2_R5aiocb > [bool > seqan::awriteAt<void, seqan::Triple<unsigned long, > seqan::Tuple<unsigned long, 3u, void>, seqan::Tuple<unsigned long, 4u, > void>, seqan::Tag<seqan::_Compressed> >, unsigned long, > long>(seqan::File<seqan::Async<void> >&, seqan::Triple<unsigned long, > seqan::Tuple<unsigned long, 3u, void>, seqan::Tuple<unsigned long, 4u, > void>, seqan::Tag<seqan::_Compressed> > const*, unsigned long, long, > aiocb&)]+0x9a): undefined reference to `aio_write64' > test_index.o:test_index.cpp: > (.text > ._ZN5seqan8awriteAtIvNS_6TripleImNS_5TupleImLj3EvEENS2_ImLj5EvEENS_3TagINS_11_CompressedEEEEEmlEEbRNS_4FileINS_5AsyncIT_EEEEPKT0_T1_T2_R5aiocb > [bool > seqan::awriteAt<void, seqan::Triple<unsigned long, > seqan::Tuple<unsigned long, 3u, void>, seqan::Tuple<unsigned long, 5u, > void>, seqan::Tag<seqan::_Compressed> >, unsigned long, > long>(seqan::File<seqan::Async<void> >&, seqan::Triple<unsigned long, > seqan::Tuple<unsigned long, 3u, void>, seqan::Tuple<unsigned long, 5u, > void>, seqan::Tag<seqan::_Compressed> > const*, unsigned long, long, > aiocb&)]+0xb1): more undefined references to `aio_write64' follow > test_index.o: In function `seqan::waitFor(aiocb&)': > test_index.cpp:(.text._ZN5seqan7waitForER5aiocb[seqan::waitFor > (aiocb&)]+0x23): > undefined reference to `aio_suspend64' > test_index.o: In function `seqan::waitFor(aiocb&, long)': > test_index.cpp:(.text._ZN5seqan7waitForER5aiocbl[seqan::waitFor > (aiocb&, > long)]+0x1d): undefined reference to `aio_error64' > test_index.cpp:(.text._ZN5seqan7waitForER5aiocbl[seqan::waitFor > (aiocb&, > long)]+0xbc): undefined reference to `aio_suspend64' > test_index.o: In function `bool > seqan::cancel<void>(seqan::File<seqan::Async<void> >&, aiocb&)': > test_index.cpp: > (.text._ZN5seqan6cancelIvEEbRNS_4FileINS_5AsyncIT_EEEER5aiocb[bool > seqan::cancel<void>(seqan::File<seqan::Async<void> >&, aiocb&)]+0x1c): > undefined reference to `aio_cancel64' > test_index.o: In function `bool seqan::areadAt<void, > seqan::Pair<unsigned long, unsigned long, > seqan::Tag<seqan::_Compressed> >, unsigned long, > long>(seqan::File<seqan::Async<void> >&, seqan::Pair<unsigned long, > unsigned long, seqan::Tag<seqan::_Compressed> >*, unsigned long, long, > aiocb&)': > test_index.cpp: > (.text > ._ZN5seqan7areadAtIvNS_4PairImmNS_3TagINS_11_CompressedEEEEEmlEEbRNS_4FileINS_5AsyncIT_EEEEPT0_T1_T2_R5aiocb > [bool > seqan::areadAt<void, seqan::Pair<unsigned long, unsigned long, > seqan::Tag<seqan::_Compressed> >, unsigned long, > long>(seqan::File<seqan::Async<void> >&, seqan::Pair<unsigned long, > unsigned long, seqan::Tag<seqan::_Compressed> >*, unsigned long, long, > aiocb&)]+0x9a): undefined reference to `aio_read64' > test_index.o: In function `bool seqan::areadAt<void, > seqan::Triple<unsigned long, seqan::Tuple<unsigned long, 3u, void>, > seqan::Tuple<unsigned long, 6u, void>, seqan::Tag<seqan::_Compressed> >> , unsigned long, long>(seqan::File<seqan::Async<void> >&, > seqan::Triple<unsigned long, seqan::Tuple<unsigned long, 3u, void>, > seqan::Tuple<unsigned long, 6u, void>, seqan::Tag<seqan::_Compressed> >> *, unsigned long, long, aiocb&)': > test_index.cpp: > (.text > ._ZN5seqan7areadAtIvNS_6TripleImNS_5TupleImLj3EvEENS2_ImLj6EvEENS_3TagINS_11_CompressedEEEEEmlEEbRNS_4FileINS_5AsyncIT_EEEEPT0_T1_T2_R5aiocb > [bool > seqan::areadAt<void, seqan::Triple<unsigned long, > seqan::Tuple<unsigned long, 3u, void>, seqan::Tuple<unsigned long, 6u, > void>, seqan::Tag<seqan::_Compressed> >, unsigned long, > long>(seqan::File<seqan::Async<void> >&, seqan::Triple<unsigned long, > seqan::Tuple<unsigned long, 3u, void>, seqan::Tuple<unsigned long, 6u, > void>, seqan::Tag<seqan::_Compressed> >*, unsigned long, long, > aiocb&)]+0xb1): undefined reference to `aio_read64' > test_index.o: In function `bool seqan::areadAt<void, > seqan::Triple<seqan::Pair<unsigned long, unsigned long, > seqan::Tag<seqan::_Compressed> >, seqan::Tuple<unsigned long, 3u, > void>, seqan::Tuple<unsigned char, 6u, void>, > seqan::Tag<seqan::_Compressed> >, unsigned long, > long>(seqan::File<seqan::Async<void> >&, > seqan::Triple<seqan::Pair<unsigned long, unsigned long, > seqan::Tag<seqan::_Compressed> >, seqan::Tuple<unsigned long, 3u, > void>, seqan::Tuple<unsigned char, 6u, void>, > seqan::Tag<seqan::_Compressed> >*, unsigned long, long, aiocb&)': > test_index.cpp: > (.text > ._ZN5seqan7areadAtIvNS_6TripleINS_4PairImmNS_3TagINS_11_CompressedEEEEENS_5TupleImLj3EvEENS7_IhLj6EvEES5_EEmlEEbRNS_4FileINS_5AsyncIT_EEEEPT0_T1_T2_R5aiocb > [bool > seqan::areadAt<void, seqan::Triple<seqan::Pair<unsigned long, unsigned > long, seqan::Tag<seqan::_Compressed> >, seqan::Tuple<unsigned long, > 3u, void>, seqan::Tuple<unsigned char, 6u, void>, > seqan::Tag<seqan::_Compressed> >, unsigned long, > long>(seqan::File<seqan::Async<void> >&, > seqan::Triple<seqan::Pair<unsigned long, unsigned long, > seqan::Tag<seqan::_Compressed> >, seqan::Tuple<unsigned long, 3u, > void>, seqan::Tuple<unsigned char, 6u, void>, > seqan::Tag<seqan::_Compressed> >*, unsigned long, long, > aiocb&)]+0x97): undefined reference to `aio_read64' > test_index.o: In function `bool seqan::areadAt<void, > seqan::Triple<seqan::Pair<unsigned long, unsigned long, > seqan::Tag<seqan::_Compressed> >, seqan::Tuple<unsigned long, 3u, > void>, seqan::Tuple<seqan::SimpleType<unsigned char, seqan::_Dna>, 6u, > seqan::Tag<seqan::_Compressed> >, seqan::Tag<seqan::_Compressed> >, > unsigned long, long>(seqan::File<seqan::Async<void> >&, > seqan::Triple<seqan::Pair<unsigned long, unsigned long, > seqan::Tag<seqan::_Compressed> >, seqan::Tuple<unsigned long, 3u, > void>, seqan::Tuple<seqan::SimpleType<unsigned char, seqan::_Dna>, 6u, > seqan::Tag<seqan::_Compressed> >, seqan::Tag<seqan::_Compressed> >*, > unsigned long, long, aiocb&)': > test_index.cpp: > (.text > ._ZN5seqan7areadAtIvNS_6TripleINS_4PairImmNS_3TagINS_11_CompressedEEEEENS_5TupleImLj3EvEENS7_INS_10SimpleTypeIhNS_4_DnaEEELj6ES5_EES5_EEmlEEbRNS_4FileINS_5AsyncIT_EEEEPT0_T1_T2_R5aiocb > [bool > seqan::areadAt<void, seqan::Triple<seqan::Pair<unsigned long, unsigned > long, seqan::Tag<seqan::_Compressed> >, seqan::Tuple<unsigned long, > 3u, void>, seqan::Tuple<seqan::SimpleType<unsigned char, seqan::_Dna>, > 6u, seqan::Tag<seqan::_Compressed> >, seqan::Tag<seqan::_Compressed> >> , unsigned long, long>(seqan::File<seqan::Async<void> >&, > seqan::Triple<seqan::Pair<unsigned long, unsigned long, > seqan::Tag<seqan::_Compressed> >, seqan::Tuple<unsigned long, 3u, > void>, seqan::Tuple<seqan::SimpleType<unsigned char, seqan::_Dna>, 6u, > seqan::Tag<seqan::_Compressed> >, seqan::Tag<seqan::_Compressed> >*, > unsigned long, long, aiocb&)]+0xbd): undefined reference to > `aio_read64' > test_index.o: In function `bool seqan::areadAt<void, > seqan::Triple<seqan::Pair<unsigned long, unsigned long, > seqan::Tag<seqan::_Compressed> >, seqan::Tuple<unsigned long, 3u, > void>, seqan::Tuple<seqan::SimpleType<unsigned char, seqan::_Dna5>, > 6u, seqan::Tag<seqan::_Compressed> >, seqan::Tag<seqan::_Compressed> >> , unsigned long, long>(seqan::File<seqan::Async<void> >&, > seqan::Triple<seqan::Pair<unsigned long, unsigned long, > seqan::Tag<seqan::_Compressed> >, seqan::Tuple<unsigned long, 3u, > void>, seqan::Tuple<seqan::SimpleType<unsigned char, seqan::_Dna5>, > 6u, seqan::Tag<seqan::_Compressed> >, seqan::Tag<seqan::_Compressed> >> *, unsigned long, long, aiocb&)': > test_index.cpp: > (.text > ._ZN5seqan7areadAtIvNS_6TripleINS_4PairImmNS_3TagINS_11_CompressedEEEEENS_5TupleImLj3EvEENS7_INS_10SimpleTypeIhNS_5_Dna5EEELj6ES5_EES5_EEmlEEbRNS_4FileINS_5AsyncIT_EEEEPT0_T1_T2_R5aiocb > [bool > seqan::areadAt<void, seqan::Triple<seqan::Pair<unsigned long, unsigned > long, seqan::Tag<seqan::_Compressed> >, seqan::Tuple<unsigned long, > 3u, void>, seqan::Tuple<seqan::SimpleType<unsigned char, > seqan::_Dna5>, 6u, seqan::Tag<seqan::_Compressed> >, > seqan::Tag<seqan::_Compressed> >, unsigned long, > long>(seqan::File<seqan::Async<void> >&, > seqan::Triple<seqan::Pair<unsigned long, unsigned long, > seqan::Tag<seqan::_Compressed> >, seqan::Tuple<unsigned long, 3u, > void>, seqan::Tuple<seqan::SimpleType<unsigned char, seqan::_Dna5>, > 6u, seqan::Tag<seqan::_Compressed> >, seqan::Tag<seqan::_Compressed> >> *, unsigned long, long, aiocb&)]+0xbd): undefined reference to > `aio_read64' > test_index.o:test_index.cpp: > (.text > ._ZN5seqan7areadAtIvcmlEEbRNS_4FileINS_5AsyncIT_EEEEPT0_T1_T2_R5aiocb > [bool > seqan::areadAt<void, char, unsigned long, > long>(seqan::File<seqan::Async<void> >&, char*, unsigned long, long, > aiocb&)]+0x8c): more undefined references to `aio_read64' follow > collect2: ld returned 1 exit status > > Any ideas? > > Cheers, > Jared Wilkening > > _______________________________________________ > seqan-dev mailing list > seqan-dev@lists.fu-berlin.de > https://lists.fu-berlin.de/listinfo/seqan-dev