i made 3 files :
kata2.cpp //the file that i want to show
kata2.h //header file for kata2.cpp
main_kata_2.cpp //the file that i execute
in main_kata_2.cpp, i write code like this (i got it from demo (in MAIN.CPP))
Code: Select all
#pragma comment (lib, "Irrlicht.lib")
#ifdef _WIN32
INT WINAPI WinMain( HINSTANCE hInst, HINSTANCE, LPSTR strCmdLine, INT )
#else
int main()
#endif
{
.
.
.
}
Code: Select all
Linking...
LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/main_kata_2.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
main_kata_2.exe - 2 error(s), 0 warning(s)
Code: Select all
#pragma comment (lib, "Irrlicht.lib")
[b]//#ifdef _WIN32
//INT WINAPI WinMain( HINSTANCE hInst, HINSTANCE, LPSTR strCmdLine, INT )[/b]
[b]//#else[/b]
int main()
[b]//#endif[/b]
{
.
.
.
}
so, when you got the same error like that , try to disable those code , maybe it can help.
btw, why does it can be happen?