View Full Version : VC, GL, and DLL - Please Just Get Along
06-17-2001, 07:35 PM
How do I link glut32.dll in my program in VC++ so that I won't need in the same directory as the program everytime I run it?
How do you get rid of the console window and still use GLUT?
06-17-2001, 08:09 PM
Put glut32.dll in C:\Windows\System with your other dll's. I don't think you can get rid of the console using GLUT. Besides, it's great for debugging. If you don't want the console, you'll have to write a win32 or MFC app I think.
06-18-2001, 03:32 AM
Thanks ffish, but I saw somewhere that you can change a setting from console to window or something, but I don't know how or where.
06-18-2001, 03:35 AM
Taken from the original GLUT FAQ:
Q36: How do you avoid the Console window appearing when you compiler a Win32 GLUT application with Microsoft compilers?
A36: Try using the following Microsoft Visual C compiler flags:
These are linker options... if main or wmain are defined, MSVC build a CONSOLE app by default; hence the need for /SUBSYSTEM:WINDOWS. if /SUBSYSTEM:WINDOWS is defined, MSVC expects WinMain or wWinMain to be defined; hence the need to /ENTRY:mainCRTStartup (eg the entry point is the usual C main).
stdout/stderr are [apparently] not "attached"; output via printf is simply "eaten" unless redirected at the command-line or by a parent program.
Information thanks to Jean-David Marrow (email@example.com).
06-18-2001, 03:41 AM
Hey, thanks Michael! Very handy http://www.opengl.org/discussion_boards/ubb/smile.gif Vielen Dank
06-18-2001, 03:47 AM
Great, except, how do you use it. Where do you go to put subsystem windows and all that stuff.
I'm more of a "let the complier handle it and don't mess with anything with 'system' on it" kind of person. I have been programming with VC++, and C++ in general, since about last august.
06-18-2001, 04:03 AM
The flags are defined in the project/settings menu. There are the flags defined for compile and linker respectively.
Another resource for help may be the online help (look for SUBSYSTEM or ENTRY there)
06-18-2001, 04:06 AM
I saw subsystem, but I didn't see entry.
06-18-2001, 04:17 AM
Careful, those settings crashed my computer! I've got an exam in 12 hours so I can't research it now but have a look for both settings under VC++'s help index - they're both there, I just don't have time to research their effects.
<edit>Beat me to it, Michael! There's a link to the ENTRY topic at the bottom of the SUBSYSTEM one on my computer</edit>
[This message has been edited by ffish (edited 06-18-2001).]
06-18-2001, 04:25 AM
I looked up subsystem and entry an it said that if you use SUBSYSTEM:WINDOWS, the you have to use WinMainCRTStartup, not mainCRTStartup. This is fine, except that since I'm using GLUT, I don't have a WinMain function, which you need according to the docs. HELP!!!
06-18-2001, 06:05 AM
Huh? Beat you in what ffish?
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.