I hope this is an easy problem to solve

A

alter

Hi,

I'm a newbie to the world of C/C++ and I was planning
to write a relatively simple program for handling
biological sequences. I wanted to use a C++ package
called seqio to import sequences from files in FASTA
format to my program. Below is a piece of code I wrote
to test it. I'm using Dev-C++ 4.9.4.1.

#include <iostream.h>
#include "seqio.h"

int main(void) {

int len;

char *seq;
SEQFILE *sfp;

if ((sfp = seqfopen("Probes.txt", "r", "FASTA")) == NULL)
exit(1);

while ((seq = seqfgetseq(sfp, &len, 0)) != NULL) {

cout << "Found a sequence!";

}

seqfclose(sfp);

return 0;

}

However, when compiling it all I got were these three error messages:

[Linker error] undefined reference to `seqfopen'
[Linker error] undefined reference to `seqfgetseq'
[Linker error] undefined reference to `seqfclose'

which mean, I guess, that the compiler can't find the three
functions which should be defined in seqio.h. I have copied
the header file to the include folder defined in Dev-C++'s
Compiler options. Any help would be warmly welcome.

Regards,
Pekka
 
N

Nils Petter Vaskinn

#include <iostream.h>

#include said:
#include "seqio.h"

int main(void) {

int len;

char *seq;
SEQFILE *sfp;

if ((sfp = seqfopen("Probes.txt", "r", "FASTA")) == NULL)
exit(1);

while ((seq = seqfgetseq(sfp, &len, 0)) != NULL) {

cout << "Found a sequence!";
std::cout


}

seqfclose(sfp);

return 0;

}
However, when compiling it all I got were these three error messages:

[Linker error] undefined reference to `seqfopen'
[Linker error] undefined reference to `seqfgetseq'
[Linker error] undefined reference to `seqfclose'

This means that the _linker_ can't find the functions, you probably need
to specify where to fid seqio.o or seqio.dll or something similar. Read
your compiler/linker/ide documentation or ask in a newsgroup specific for
that compiler/linker/ide

hth
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top