View Full Version : Visual c++ 6.0 and glut?

10-17-2000, 08:08 AM
I just wonderd if Visual C++ 6.0 can use glut? If it works How do I do it?

10-17-2000, 08:17 AM
#include <GL\glut.h>
It's that simple.

10-17-2000, 08:38 AM
Sure i have done that ... =) but it was an other problem i saw ... gahs... i picked up a Demo about bumpmapping and now i saw it was made with a main(...), and if i whant to compile it I must reprogram a lot i think ... or is there an easy way to do it?

Sure i can use an other compilator but i dont have one =)

10-18-2000, 02:34 PM
Hi lepra,

I don't know if I get your point but you need to configure your VC++6.0 to compile GLUT.
Check these 3 files:

If you can't find one of these files go to: http://reality.sgi.com/opengl/glut3/glut3.html

It's important to say that I create a project as a Win32 Console Application (MFC is disabled) when I am working with GLUT.

I hope this info can be useful.

10-18-2000, 04:10 PM
Don't forget to add glut32.lib to your libraries, otherwise you'll get errors when linking.

Antonio www.fatech.com/tech (http://www.fatech.com/tech)

10-18-2000, 04:53 PM
Both GLUT & GLUI work well with VC6.

Another way to import the glut32.dll calls
besides using Project Settings... Link... is to add the following into your #includes

#pragma comment(lib,"glut32.lib") http://www.opengl.org/discussion_boards/ubb/cool.gif

You typically don't have to do this since it's already in glut32.h
I prefer the latter (and so did the folks who wrote glut32 for Win32) since I can encapsulate the lib calls right in the editor and I see what's going on in the code. (just as with #include)

Good Luck http://www.opengl.org/discussion_boards/ubb/smile.gif

Take a look at GLUI: a GUI built with GLUT in mind. http://www.opengl.org/discussion_boards/ubb/wink.gif

[This message has been edited by iss (edited 10-22-2000).]

10-19-2000, 05:20 AM
Thanx you guys realy help me with that...
i didnt know i could still do Dos programs in VC++ 6.0 ... but now i have a question to "ISS" ... with that command for including librarys is it exaktly what the VC do in the linker or do the library get in the *.xe file (Do the *.exe file get larger i mean)?

10-19-2000, 06:51 AM
Where can I find GLUI?


10-19-2000, 12:05 PM
Originally posted by Antonio:
Where can I find GLUI?


You will find it at http://www.cs.unc.edu/~rademach/glui/

10-20-2000, 04:43 AM
Im trying to get GLUT working in V c++ 6.0

I've added the GLUT lib and include directory in option
I've added glut32.lib in project -> settings -> link tab ->

And i get this error:
--------------------Configuration: lesson6 - Win32 Debug--------------------
LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16
Debug/lesson6.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

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

could some help me??? please

10-20-2000, 05:12 AM
Originally posted by BeatHam:
Im trying to get GLUT working in V c++ 6.0

I've added the GLUT lib and include directory in option
I've added glut32.lib in project -> settings -> link tab ->

And i get this error:

This error you get then you not have choosen Console application i think. Try to make a new workspace with console App and add the librarys like before

10-20-2000, 05:20 PM
You can still have a win32 app and avoid writing the WinMian function.

Select project->settings from the main menu;
Select the "Link" tab from the dialog box;
Select "Output" from the "Category" combo box;
In the "Entry-point symbol" textbox type "mainCRTStartup"

Antonio www.fatech.com/tech (http://www.fatech.com/tech)