system
August 21, 2001, 9:15am
1
i get this error message when i execute my opengl program in microsoft C++
--------------------Configuration: main - Win32 Debug--------------------
Linking…
LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/main.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
main.exe - 2 error(s), 0 warning(s)
what is my problem
your problem is your trying to use a console app when what you need is a
Win32 app…
or your just not defining the function
int main()
{
return 0;
}
hi,
i am also getting similar errors like in microsoft VC ++:
open1.obj : error LNK2001: unresolved external symbol _gluPerspective@32
open1.obj : error LNK2001: unresolved external symbol __imp__glLoadIdentity@0
open1.obj : error LNK2001: unresolved external symbol __imp__glMatrixMode@4
open1.obj : error LNK2001: unresolved external symbol __imp__glViewport@16
help me guys…
thanks
Include the gl library. And if that isn’t the case… Uhhh…
system
August 21, 2001, 11:40am
5
i am the person who posted this message, i have some new information to add when i compile the program witch is a WIn 32 app. i get no error messages but when i execute it in C++ i get the same error message witch is
--------------------Configuration: pin - Win32 Debug--------------------
Linking…
LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/pin.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
pin.exe - 2 error(s), 0 warning(s)
HELPPPP--------------------Configuration: pin - Win32 Debug--------------------
Linking…
LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/pin.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
pin.exe - 2 error(s), 0 warning(s)
HELP!!!
thanks
Mezz
August 21, 2001, 12:41pm
6
Is it a Win32 Application or a Win32 console application?
-Mezz
so if the errors go away in win32 thats what you need. Win32 apps are c/c++ or whatever language your using…
>but when i execute it in C++ i get the same error message witch is
im not sure whats you mean by this…
are you saying when you compile it as a console?
in that case then that is expected since GL is not made to be used in a console…
Mezz
August 21, 2001, 2:42pm
8
OpenGL on a Windows platform can run under windows directly or under a DOS shell using GLUT.
If you are not using GLUT and your program has a WinMain() function then you will need to build a Win32 Application in VC++.
If you are using GLUT and your program has a main() function then you should use a Win32 Console Application in VC++.
-Mezz
zed
August 21, 2001, 5:29pm
9
chuck this somewhere
#pragma comment(linker,"/entry:“mainCRTStartup”")