Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unresolved Externals

Status
Not open for further replies.

AndyHollywood

Programmer
Oct 7, 2001
30
GB
Hello

I'm having probs linking a dll with my app, it keep son giving me unresolved externals:

Compiling...
authenticate32.cpp
Linking...
authenticate32.obj : error LNK2001: unresolved external symbol __chkesp
LINK : error LNK2001: unresolved external symbol _WinMainCRTStartup
Debug/authenticate32.exe : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.

authenticate32.exe - 3 error(s), 0 warning(s)



I don't know where to begin to solve them, I was hoping some one could give me guidance or advice on where to start.

Heres a link to the project files:

its a main project with the dll in the sub folder.

cheers for any advice

Andy
 
You become such errors, if You have in Your win32 Program a main() Function (or wrong use WinMain() - Function) etc. The usage of DllEntryPoint() (if You have any) is not easy too, if You try to create a Project with dll.
May be, You have checked "Do not use all standard Libraries" in Your Project settings (Page Linker)?
I'm sorry, i have no time to look Yor Project Files.
 
Hello ,

i've already had lot's of this kind of problems. It's resolved inspecting the directories that you tell the vc++ to find the libs and .h files.

go to the tools>options>directories and in the include files put the directory where the .h files will be searched and in the library files put the directory where the .lib files will be searched. For example , if i had this directory in my machine

c:\myStuff\myPrograms
and inside that i had these directories

c:\myStuff\myPrograms\program1_h
c:\myStuff\myPrograms\program2_h

etc.

and inside the c:\myStuff\myPrograms\program1_h and c:\myStuff\myPrograms\program2_h are my .h files , i could write

#include "program1_h\first.h"
#include "program1_h\second.h"

whatever

In the case of the lib files , is the same kind of stuff , but you don't include libs files like the above example , you do that in the project settings>link>Object/Library module and write the name of the libs.

If you are using the MFC and the unicode , you still need to put the wWinMainCRTStartup in the project settings>link>output>Entry-point symbol.

Thor da Silva



 

I got an error message similar to this on trying to #include a C header file into a C++ program. Try changing the linkage convention - use the syntax:

extern "C" {
#include "headerfilename.h"
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top