By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,655 Members | 1,005 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,655 IT Pros & Developers. It's quick & easy.

I hope this is an easy problem to solve

P: n/a
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
Jul 22 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On Tue, 25 Nov 2003 00:50:19 -0800, alter wrote:
#include <iostream.h>
#include <iostream>
#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
--
NPV

"the large print giveth, and the small print taketh away"
Tom Waits - Step right up

Jul 22 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.