PDA

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



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

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

LeprA
10-17-2000, 07: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 =)

humberto
10-18-2000, 01: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:
x:\windows\system\glut32.dll
x:\...\VC\lib\glu32.lib
x:\...\VC\include\GL\Glut.h

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.

Antonio
10-18-2000, 03: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)

iss
10-18-2000, 03: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

PS
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).]

LeprA
10-19-2000, 04: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)?

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

Antonio

LeprA
10-19-2000, 11:05 AM
Originally posted by Antonio:
Where can I find GLUI?

Antonio


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

BeatHam
10-20-2000, 03:43 AM
hi,
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--------------------
Linking...
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

LeprA
10-20-2000, 04:12 AM
Originally posted by BeatHam:
hi,
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

Antonio
10-20-2000, 04: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)