Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error LNK2001 when linking
Message
From
28/01/2002 14:45:17
 
 
To
All
General information
Forum:
Visual C++
Category:
Debugging
Title:
Error LNK2001 when linking
Miscellaneous
Thread ID:
00611819
Message ID:
00611819
Views:
54
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
Map
View

Click here to load this message in the networking platform