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