Results 1 to 8 of 8

Thread: Compilation problem in VC++

  1. #1
    Junior Member Newbie
    Join Date
    Jan 2001
    Location
    Penang,Malaysia
    Posts
    4

    Compilation problem in VC++

    hi..
    I m new in OpenGL programming. I don't know much about it but i like to 3D programs alot.

    I downloaded the OpenGL tutorial from Nehe site from tutorial 1 to 32. I have just started tutorial 1. I followed exactly what has been shown in the tutorial but it gave me this error when i tried to compile the program. the error is as follow:

    "fatal error C1010: unexpected end of file while looking for precompile header directive"

    I try on the original sample program provided by Nehe and yet i still get this error. I don't know whats wrong. I did downloaded the OpenGL header and library file and i have included in the VC++ header and lib folder. I think this is a setup problem.

    Jeff Molofee(Nehe), if u got to read this forum, please give me some advise and by the way, what is your email? I can't seems to get it in your website.

  2. #2
    Senior Member Regular Contributor
    Join Date
    Jun 2000
    Location
    B.C., Canada
    Posts
    367

    Re: Compilation problem in VC++

    You probably did this, but are you sure that it is a Win32 app that you are making, not a Win32 Console app?

    j

  3. #3
    Senior Member Regular Contributor
    Join Date
    Sep 2000
    Location
    Austin, TX, USA
    Posts
    142

    Re: Compilation problem in VC++

    Turn off precompiled headers. It's in Project->Settings->C++->Category:Precompiled Headers. Check the "Not using precompiled headers" option.

    Search MSDN online if you are interested in what they are and how they benefit you; but for a GL demo, just axe them.

    Glossifah

  4. #4
    Junior Member Newbie
    Join Date
    Jan 2001
    Location
    Penang,Malaysia
    Posts
    4

    Re: Compilation problem in VC++

    I followed the tutorial.

    setting:
    Use Win32 application (not console)
    Project/setting/Link :as writen below!!

    "After you have created a new Win32 Application (NOT a console application) in Visual C++, you will need to link the OpenGL libraries. In Visual C++ go to Project, Settings, and then click on the LINK tab. Under "Object/Library Modules" at the beginning of the line (before kernel32.lib) add OpenGL32.lib GLu32.lib and GLaux.lib."

    I followed exactly. Is there anything missing?
    Or if u dont mind can u please giude me step by step to setup? thanks for the reply.

  5. #5
    Junior Member Newbie
    Join Date
    Jan 2001
    Location
    Vancouver, BC, Canada
    Posts
    9

    Re: Compilation problem in VC++

    did you link the dll's in the project settings? i forgot that and had the same error ( i think it was that )

  6. #6
    Junior Member Newbie
    Join Date
    Jan 2001
    Location
    Penang,Malaysia
    Posts
    4

    Re: Compilation problem in VC++

    My video card is a Voodoo3 3000 with AMD K6-2 400MHz. I don't know is this a good configuration for a OpenGL programming.
    can nvidia do better in OpenGL compare to voodoo card?

  7. #7
    Junior Member Newbie
    Join Date
    Jan 2001
    Location
    Penang,Malaysia
    Posts
    4

    Re: Compilation problem in VC++

    hello MALI...

    As for your information, i am a OpenGL dummy.
    Can u please guide me in detail on the initial setting of the OpenGL before we actually do the coding?

  8. #8
    Senior Member OpenGL Pro
    Join Date
    Oct 2000
    Location
    Fargo, ND
    Posts
    1,753

    Re: Compilation problem in VC++

    Read Glossifah's response. You're project is trying to use precompiled headers. It's not the same error you get when you forget to link a library. Forgetting to link a library causes a linker error, not a compile error.

    Just for reference, linker errors occur after the "Linking..." line of output and often take the form of...

    unresolved external BlahBlahBlah@8...

    Linker errors are indications that your code compiled fine, but you didn't add the needed libraries. There are other types of linker errors, but these are the most common.

    [This message has been edited by Deiussum (edited 01-12-2001).]
    Deiussum
    Software Engineer and OpenGL enthusiast

Similar Threads

  1. Kernel compilation problem....
    By Craig in forum OpenCL
    Replies: 16
    Last Post: 11-06-2010, 04:05 PM
  2. problem of compilation with glaux
    By airseb in forum OpenGL: Basic Coding
    Replies: 7
    Last Post: 02-06-2005, 06:40 AM
  3. compilation problem
    By groovieghoulie in forum OpenGL: Windows
    Replies: 2
    Last Post: 11-05-2004, 08:48 AM
  4. Compilation problem
    By in forum OpenGL: Linux
    Replies: 2
    Last Post: 07-05-2004, 08:49 AM
  5. Linux compilation problem
    By mishuk in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 12-16-2002, 12:55 PM

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