Thread: OpenGL Not working......

  1. #16
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    In that case, it's again a project setup problem. You created your project as a console project, which causes VC++ to set the SUBSYSTEM linker switch to CONSOLE and look for a main() as the program entry point. The tutorial, however, expects you to create a standard Win32 project, which causes VC++ to set the SUBSYSTEM linker switch to WINDOWS and look for a WinMain() as the program entry point.

    To solve, go to the project options, linker tab, and set SUBSYSTEM to WINDOWS. In the future, create Win32 projects instead of Win32 Console projects, unless you actually want the console.

    (I wonder how many billion times I've already answered this one. How do I propose something for a FAQ?)
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  2. #17
    Yah. Morgul's Avatar
    Join Date
    Feb 2005
    Posts
    109
    Sic vis pacum para bellum. If you want peace, prepare for war.

  3. #18
    For Narnia! Sentral's Avatar
    Join Date
    May 2005
    Location
    Narnia
    Posts
    719
    Why didn't you tell me this before if you already knew it?

    Awesome! It finally worked. I wish the **** tutorial would have told me that.
    Last edited by Sentral; 01-18-2006 at 04:47 PM.

  4. #19
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    Quote Originally Posted by Sentral
    Awesome! It finally worked. I wish the **** tutorial would have told me that.
    Well, considering that the lessons build on each other (i.e. you're not supposed to do lesson 2 until you've done lesson 1), it DOES tell you that. From Lesson 1:
    After you have created a new Win32 Application (NOT a console application) in Visual C++
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  5. #20
    For Narnia! Sentral's Avatar
    Join Date
    May 2005
    Location
    Narnia
    Posts
    719
    I didn't go through the nehe tutorial one. I just used the source from nehe 2. I was referring to the other tutorial i used. It was posted a few posts back.

  6. #21
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    That's because the code in your first post was written either for Linux or as a Win32 Console application. (It has a main().)
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Multithread pthread with OpenGL
    By parad0x13 in forum C++ Programming
    Replies: 8
    Last Post: 07-24-2008, 03:04 PM
  2. Replies: 8
    Last Post: 01-18-2008, 04:06 AM
  3. Replies: 4
    Last Post: 01-13-2008, 02:14 AM
  4. Replies: 0
    Last Post: 07-26-2007, 09:55 AM
  5. .TGA files in OpenGL
    By ... in forum Game Programming
    Replies: 2
    Last Post: 10-26-2003, 02:48 PM