Results 1 to 7 of 7

Thread: problems with windows.h

  1. #1
    Junior Member Newbie
    Join Date
    Aug 2004
    Posts
    7

    problems with windows.h

    Hi,
    I am a new user to OpenGL.
    currently, I installed visual c++ 2005 expressed edition beta in my winxp.

    I also put the required gl.h, glu.h, glut.h and all the libs and dlls to the correct directories.

    I tried a code, which needs windows.h. Then I copied a source file on line, and put it into VC\include\, the file is got from the below
    http://doc.ddart.net/msdn/header/include/windows.h.html
    the problems is that, there are a number of header files included in the windows.h, and I have none...it's kind of impossible to seach every single file and copy them. How to solve this problem?

    Thanks for your kind attention!

    Regards

  2. #2
    Senior Member Regular Contributor
    Join Date
    Dec 2002
    Location
    Poland
    Posts
    234

    Re: problems with windows.h

    Originally posted by chaosy:
    I installed visual c++ 2005 expressed edition beta
    Heh. Frankly speaking, I have no idea how vc++ 2005 even looks like. Anyway, I think that thing about include files didn't actually change. When you include a header file,
    #include <windows.h>
    you don't need to look for all other headers that are included in <windows.h>. Thery are avaible for a compiler in it's INCLUDE directory. If that's the reason your program does not compile, you have to be doing something else wrong. Maybe some source code would help.

    See ya'

  3. #3
    Junior Member Newbie
    Join Date
    Aug 2004
    Posts
    7

    Re: problems with windows.h

    Hi, guys, thanks
    I solved the problem by installing a Platform SDK from msdn website instructions. And it gives a bunch of libs and include files.

    The new problem is that, I tested one sample code in redbook, Example 1-2 : Simple OpenGL Program Using GLUT: hello.c.

    The suprised thing is, I was told there are lots of syntax errors in gl.h file...

    The errors are at the batch of commands as below

    WINGDIAPI void APIENTRY glAccum (GLenum op, GLfloat value);

    Anyone experienced this before? Then I tested a single line's code, #include<GL/gl.h> it gives the same result...
    Am I wrong at any stage?

    Thanks & Regards

  4. #4
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,574

    Re: problems with windows.h

    You need to include windows.h before gl.h on Windows.

  5. #5
    Senior Member Frequent Contributor
    Join Date
    Feb 2000
    Location
    London
    Posts
    503

    Re: problems with windows.h

    Originally posted by ZbuffeR:
    You need to include windows.h before gl.h on Windows.
    Works, but kind of overkill. You can get away with sticking the following snippet before the <gl.h> #include.

    Code :
    #if !defined(APIENTRY) &amp;&amp; defined(WIN32)
    #define APIENTRY __stdcall
    #endif
     
    #if !defined(WINGDIAPI)
    #define WINGDIAPI
    #endif

  6. #6
    Junior Member Newbie
    Join Date
    Aug 2004
    Posts
    7

    Re: problems with windows.h

    yar, thanks a lot to MikeC! that problem was solved.
    The new one is it asks form ODBC.lib...
    why do I need an ODBC.lib?

    why do these kind of problem keep happen to me?!

  7. #7
    Junior Member Newbie
    Join Date
    Aug 2004
    Posts
    7

    Re: problems with windows.h

    hi, hi, the ODBC.lib problem is solved as well.

    but...new one

    LIBCMTD.lib(crt0.obj) : error LNK2019: unresolved external symbol _main referenced in function _mainCRTStartup

    what's that again?

    Thanks

Similar Threads

  1. OpenGL problems with Windows XP
    By in forum OpenGL: User Software
    Replies: 4
    Last Post: 02-04-2005, 08:12 PM
  2. Problems using Windows 2000
    By in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 07-07-2003, 04:47 PM
  3. GLUT problems with windows?
    By nexusone in forum OpenGL: General
    Replies: 1
    Last Post: 01-30-2003, 03:54 PM
  4. Windows Problems
    By Allan Walton in forum OpenGL: Advanced Coding
    Replies: 19
    Last Post: 06-28-2002, 05:43 PM
  5. Glut problems under windows
    By in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 12-28-2000, 11:02 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