Advertisement

How to compile the source code.?

Started by May 21, 2003 10:26 PM
4 comments, last by mc76 21 years, 9 months ago
I downloaded the opengl example source code for visual c++. Then I created "Win32 Console Applicaton" project and opened the source file named "example1". Now I added "opengl32.lib", "glu32.lib", "glaux.lib" to the linkage option. I think that is all, but there is one linkage error that says "unresolved external symbol _main". Can anybody help me?
Are you using main() instead of WinMain()?

You need to use WinMain because it is a Win32 (Windows, not console) application.

EDIT: Sorry, I didn't read your post correctly. You need to create a Win32 Application project, not a Win32 Console Application. Console applications are for Dos type programs. It is wanting a main() function because you specified Console application. Hope that helps.

[edited by - eriel on May 21, 2003 11:55:08 PM]
Advertisement
quote:

Then I created "Win32 Console Applicaton"


That is your problem, it should be Win32 Application NOT Win32 Console Applicaton.

[edited by - Abob on May 21, 2003 12:00:45 AM]
Arrg!!
Thanks for your help.

But another problem occured now..

There is no error from compliling and linking but

when I excuted the excutable file.. "Initiallization failed"

window poped up.

do you see what''s going on here?

but if you downloaded the code haven''t you got the .dsw file? you need only to open that one in VStudio

There aren''''t problems that can''''t be solved with a gun...
There aren''t problems that can''t be solved with a gun...
sounds like you''re missing some data files.

This topic is closed to new replies.

Advertisement