General information
Title:
Error LNK2001 when linking
Hi,
I found a program on the Net that I can't compile correctly using the MS Visual C++ dev. environment. I keep getting some LNK2001 errors. The help on that subject is not very good.
Here's how the program is constructed:
I have 3 .cpp files containing C++ code. 6 .c files containing pure C code. Some of the previous files have corresponding .h files but not all of them.
At the beginning of each source file, I include the header files necessary for the program to find what it needs.
Now, let's explore one of the LNK2001 errors.
One method called "bstest" is defined in a file called "bstrap.c". At the beginning of "bstrap.c", I include it's header file "bstrap.h" where the prototype of "bstest" is defined. In my main program file (called "transmit.cpp"), I included "bstrap.h". I get the error LNK2001 stating that "bstest" cannot be found!
Oh, and by the way, all the individual files compile without an error or a warning.
I guess I need a little crash course on the proper way to include multiple files in a project.
Thanks in advance, Stephane.
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only