PDA

Click to See Complete Forum and Search --> : Linker errors under win2k...


CyberCarsten
Jul 15th, 2001, 05:04 AM
Ok, I get this nasty error every time I try to compile a windows app under win2k:

--------------------Configuration: PROG3_2 - Win32 Debug--------------------
Linking...
LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/PROG3_2.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

PROG3_2.exe - 2 error(s), 0 warning(s)


I have tried uninstalling/reinstalling VS...without luck....

Have any of you experienced this error before???

Vlatko
Jul 15th, 2001, 05:29 AM
Are you making a console app. If so then make sure you haven't chosen win32 app.

CyberCarsten
Jul 15th, 2001, 05:40 AM
I'm creating a win32 app, and I have also selected that type...

CyberCarsten
Jul 15th, 2001, 06:04 AM
I have found another problem...I get these errors when I compile DirectX apps....

--------------------Configuration: PROG9_1 - Win32 Debug--------------------
Linking...
PROG9_1.OBJ : error LNK2001: unresolved external symbol _DirectDrawCreate@12
LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/PROG9_1.exe : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.

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

Technocrat
Jul 17th, 2001, 10:21 AM
PROG9_1.OBJ : error LNK2001: unresolved external symbol _DirectDrawCreate@12
----As I stated in the other Post You do not have the direct draw libs linked (See Bottom For A Quick Way To Link)

LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
----Vlatko must be right, you must not have made a Win32 App because I have never seen this error on a Win32 App

Here is how to setup Direct X links:



#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <D3DX8.h>
#include <DDraw.h>

// This is causes the DX .libs to be linked in, the same thing can be accomplished by
// adding it to your compiler's link list (Project->Settings->Link in VC++),
// but I prefer this method.
#pragma comment(lib,"d3d8.lib") //DirectX 3D
#pragma comment(lib,"d3dx8.lib") //DirectX 3D
#pragma comment(lib,"dxguid.lib") //Needed For DirectDraw
#pragma comment(lib,"ddraw.lib") //Needed For DirectDraw