PDA

View Full Version : diffirent between using MFC OpenGL AppWizard and normal text file (Using VC++)



always1
04-10-2002, 02:41 PM
I try to compile the tutorial 6 from NeHe Tutorial by using MFC Wizard and normal text file, unfortunately, by using MFC Wizard, it was no errors messages when compiling, but when run it, I couldn't get the output of the program. By the way, it pop up with error message "Unhndled exception in <filename.exe>(I81XGDEV.DLL):0xCD000010:Illegal Instruction". What is this mean?
But it still can continue with selection for the window MODE, but it pop up an error message with "<filename> has caused an error in I81XGDEV.DLL. <filename> will now close".

For normal text file, there are 2 errors message with "LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/Lesson5.exe : fatal error LNK1120: 1 unresolved externals"

I still couldn't find out what is all this about. Please hep.
Thanks you

zeckensack
04-10-2002, 02:57 PM
Originally posted by always1:
I try to compile the tutorial 6 from NeHe Tutorial by using MFC Wizard and normal text file, unfortunately, by using MFC Wizard, it was no errors messages when compiling, but when run it, I couldn't get the output of the program. By the way, it pop up with error message "Unhndled exception in <filename.exe>(I81XGDEV.DLL):0xCD000010:Illegal Instruction". What is this mean?
But it still can continue with selection for the window MODE, but it pop up an error message with "<filename> has caused an error in I81XGDEV.DLL. <filename> will now close".
That's Intel 810 or 815 integrated graphics, right? Try getting updated graphics drivers for it.


For normal text file, there are 2 errors message with "LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/Lesson5.exe : fatal error LNK1120: 1 unresolved externals"
If you chose to create a console app when creating the project, you need to supply a main function. If you only have a WinMain function, recreate the project again, this time selecting 'Win32 application'. There's also a linker switch for that but I can't remember right now...

coredump
04-10-2002, 03:08 PM
yes, to use most (if not all) NeHe tutorials use the Win32 Application project. You will need to add the following libraries to the Link section of the project settings:

opengl32.lib
glu32.lib
glaux.lib
glut32.lib

you may not need the last 2, depends on what you're trying to do. you'll also need the headers. (i think MSVC comes with all of the libraries and headers except for GLUT)

// edit
actually, i don't believe glaux is supported anymore. anyone correct me on this?
// edit

b

[This message has been edited by coredump (edited 04-10-2002).]

always1
04-10-2002, 04:15 PM
that means i must to update the driver?
Originally posted by zeckensack:

Originally posted by always1:
I try to compile the tutorial 6 from NeHe Tutorial by using MFC Wizard and normal text file, unfortunately, by using MFC Wizard, it was no errors messages when compiling, but when run it, I couldn't get the output of the program. By the way, it pop up with error message "Unhndled exception in <filename.exe>(I81XGDEV.DLL):0xCD000010:Illegal Instruction". What is this mean?
But it still can continue with selection for the window MODE, but it pop up an error message with "<filename> has caused an error in I81XGDEV.DLL. <filename> will now close".
That's Intel 810 or 815 integrated graphics, right? Try getting updated graphics drivers for it.


For normal text file, there are 2 errors message with "LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/Lesson5.exe : fatal error LNK1120: 1 unresolved externals"
If you chose to create a console app when creating the project, you need to supply a main function. If you only have a WinMain function, recreate the project again, this time selecting 'Win32 application'. There's also a linker switch for that but I can't remember right now...

always1
04-10-2002, 04:18 PM
this time i included the
glut32.lib
but still error "cannot openfile glut32.lib" http://www.opengl.org/discussion_boards/ubb/frown.gif

Originally posted by coredump:
yes, to use most (if not all) NeHe tutorials use the Win32 Application project. You will need to add the following libraries to the Link section of the project settings:

opengl32.lib
glu32.lib
glaux.lib
glut32.lib

you may not need the last 2, depends on what you're trying to do. you'll also need the headers. (i think MSVC comes with all of the libraries and headers except for GLUT)

// edit
actually, i don't believe glaux is supported anymore. anyone correct me on this?
// edit

b

[This message has been edited by coredump (edited 04-10-2002).]

coredump
04-10-2002, 06:13 PM
as i mentioned above, you'll need to download GLUT if you want to use anything in it. VC++ does not come with GLUT. you can download GLUT from this site.

b

Rob The Bloke
04-10-2002, 06:18 PM
Originally posted by always1:
this time i included the
glut32.lib
but still error "cannot openfile glut32.lib" http://www.opengl.org/discussion_boards/ubb/frown.gif


To get a nehe tutorial to compile in a new project, all you have to do is this :

Create a new Win32 Application project (not a win32 console Application or an MFC project!!)

goto the project settings and link to the following :

opengl32.lib
glu32.lib
glaux.lib

There is no need to link to glut32.lib because nehe never uses it. It's only really used if you dont want the hassle of doing a win32 project, and prefer using console apps. I'm not suprised you dont have the lib or dll required because it doesn't come with VC6. Don't need them anyway so don't bother.....

If after doing the above, you still can't get it to run, then it is the graphics card driver that needs updating.

coredump, glaux hasn't gone under any development for ages, but it is used in some of the nehe demos for a few basic primitives and some of the simpler texture loading tutorials.

always1
04-11-2002, 02:03 AM
by using empty project right? but it doesn't work. My had updated my graphic card driver, but still the same. But if i use the MFC App, was the different output.

Originally posted by Rob The Bloke:
To get a nehe tutorial to compile in a new project, all you have to do is this :

Create a new Win32 Application project (not a win32 console Application or an MFC project!!)

goto the project settings and link to the following :

opengl32.lib
glu32.lib
glaux.lib

There is no need to link to glut32.lib because nehe never uses it. It's only really used if you dont want the hassle of doing a win32 project, and prefer using console apps. I'm not suprised you dont have the lib or dll required because it doesn't come with VC6. Don't need them anyway so don't bother.....

If after doing the above, you still can't get it to run, then it is the graphics card driver that needs updating.

coredump, glaux hasn't gone under any development for ages, but it is used in some of the nehe demos for a few basic primitives and some of the simpler texture loading tutorials.

Rob The Bloke
04-11-2002, 11:57 AM
Yes, it should be in an empty project. What are the errors you get now? Can you compile it? If yes have you tried stepping through it with the debugger?

Mail me the project if you still can't get it to work.

[This message has been edited by Rob The Bloke (edited 04-11-2002).]

J P
04-11-2002, 12:19 PM
All of the NeHe tutorials come with a VC++ workspace (*.dsw) file and all you have to do is double click on that file to bring up the app and the IDE and build the application. The only problem maybe the glut lib and as mentioned previously download and install. If you insist on building your own NeHE app with the APP wizard build a win32 app and make sure that the windows.h header comes before all other header files

always1
04-12-2002, 03:52 PM
yap, i got that output. thanks.
but why couldn't get any output if not opening the *.dsw file?

Originally posted by J P:
All of the NeHe tutorials come with a VC++ workspace (*.dsw) file and all you have to do is double click on that file to bring up the app and the IDE and build the application. The only problem maybe the glut lib and as mentioned previously download and install. If you insist on building your own NeHE app with the APP wizard build a win32 app and make sure that the windows.h header comes before all other header files

Rob The Bloke
04-12-2002, 04:06 PM
Arrrgh!! glut is not used by nehe! At no point do you need to link to the lib because it is not used.

always1
04-15-2002, 01:29 PM
can anyone tell why there is no output if *.dsw file is not open?