Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: VC, GL, and DLL - Please Just Get Along

  1. #1
    Member Newbie
    Join Date
    Jun 2001
    Location
    Gary, IN, United States of America
    Posts
    35

    VC, GL, and DLL - Please Just Get Along

    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?
    :-} {-:

  2. #2
    Senior Member Regular Contributor
    Join Date
    Feb 2001
    Location
    Australia
    Posts
    431

    Re: VC, GL, and DLL - Please Just Get Along

    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.

  3. #3
    Member Newbie
    Join Date
    Jun 2001
    Location
    Gary, IN, United States of America
    Posts
    35

    Re: VC, GL, and DLL - Please Just Get Along

    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.
    :-} {-:

  4. #4
    Senior Member OpenGL Pro
    Join Date
    Dec 2007
    Posts
    1,077

    Re: VC, GL, and DLL - Please Just Get Along

    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:

    /SUBSYSTEM:WINDOWS /ENTRY:mainCRTStartup

    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 (jd@riverbed.com).

  5. #5
    Senior Member Regular Contributor
    Join Date
    Feb 2001
    Location
    Australia
    Posts
    431

    Re: VC, GL, and DLL - Please Just Get Along

    Hey, thanks Michael! Very handy Vielen Dank

  6. #6
    Member Newbie
    Join Date
    Jun 2001
    Location
    Gary, IN, United States of America
    Posts
    35

    Re: VC, GL, and DLL - Please Just Get Along

    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.
    :-} {-:

  7. #7
    Senior Member OpenGL Pro
    Join Date
    Dec 2007
    Posts
    1,077

    Re: VC, GL, and DLL - Please Just Get Along

    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)

  8. #8
    Member Newbie
    Join Date
    Jun 2001
    Location
    Gary, IN, United States of America
    Posts
    35

    Re: VC, GL, and DLL - Please Just Get Along

    I saw subsystem, but I didn't see entry.
    :-} {-:

  9. #9
    Senior Member Regular Contributor
    Join Date
    Feb 2001
    Location
    Australia
    Posts
    431

    Re: VC, GL, and DLL - Please Just Get Along

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

  10. #10
    Member Newbie
    Join Date
    Jun 2001
    Location
    Gary, IN, United States of America
    Posts
    35

    Re: VC, GL, and DLL - Please Just Get Along

    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!!!
    :-} {-:

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean