Page 1 of 1

Compiler error on Hello Wolrd?

Posted: Mon Apr 18, 2005 6:42 pm
by BoorishId
Im using VC6 and i have followed the tutrial for hello word step by step. When i compile the example of Hello World that comes with the sdk it works fine but when i compile mine i get

Linking...
LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16
Debug/helloworld.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

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

Im sorry but ive been doing most of my C coding in linux so i dont really understand the linker error. Im guessing its not being able import a symbol for some windows dll?

Posted: Mon Apr 18, 2005 6:56 pm
by BoorishId
Wello im retarded i noticed the tutorial never said to start a new win32 app or win32 console app, and i started a new win32 app but it looks like the source for the Hello World tuorial was written using a console app. Is this the problem would make since seeing as how all the example code is pretty dos style.

same errors?

Posted: Tue Apr 19, 2005 6:37 pm
by ijo coim
BoorishId, i got the same errors, but i got this errors when i execute tech demo file (main.cpp) from folder demo
here are the errors:

Code: Select all

--------------------Configuration: main - Win32 Debug--------------------
Linking...
main.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall CDemo::~CDemo(void)" (??1CDemo@@UAE@XZ)
main.obj : error LNK2001: unresolved external symbol "public: void __thiscall CDemo::run(void)" (?run@CDemo@@QAEXXZ)
main.obj : error LNK2001: unresolved external symbol "public: __thiscall CDemo::CDemo(bool,bool,bool,bool,bool,enum irr::video::E_DRIVER_TYPE)" (??0CDemo@@QAE@_N0000W4E_DRIVER_TYPE@video@irr@@@Z)
main.obj : error LNK2001: unresolved external symbol "public: __thiscall CMainMenu::CMainMenu(void)" (??0CMainMenu@@QAE@XZ)
LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/main.exe : fatal error LNK1120: 5 unresolved externals
Error executing link.exe.

main.exe - 6 error(s), 0 warning(s)
i don't know why it can be, but if i execute turtorial 1-12, it's ok.

Posted: Wed Apr 20, 2005 7:10 am
by Sn0rph
Make sure if you are compiling with VC++ and possibly Dev C++ (I'm not 100% sure on that) to make your project a Win32 Console application and not a Win32 Application.