Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Error LNK2001 when linking
Message
De
28/01/2002 14:45:17
 
 
À
Tous
Information générale
Forum:
Visual C++
Catégorie:
Débogage
Titre:
Error LNK2001 when linking
Divers
Thread ID:
00611819
Message ID:
00611819
Vues:
55
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.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform