Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 7 of 7

Thread: GLUT + Bc55

  1. #1
    Guest

    GLUT + Bc55

    If I
    #include <GL/glut.h>

    #include <stdio.h>
    #include <stdlib.h>

    and compile I get next error...
    c:\Borland\Bcc55\include\stdlib.h 584: Only one of a set of
    overloaded functions can be "C"


    If I only do it with
    #include <GL/glut.h>
    it works fine...

    why is it?

  2. #2
    Guest

    Re: GLUT + Bc55

    It is because the Borland headers are little different. C code works, C++ gives your error. I think that including windows.h before glut.h fix it. A perhaps better solution is to change "if 0" to "if 1" in glut.h or make this for C++ only.

  3. #3
    Junior Member Newbie
    Join Date
    Oct 2001
    Posts
    6

    Re: GLUT + Bc55

    i think in your bc-project you must apply:
    "console", and switch to "c-node" under "advanced".
    everything else you must turn off, or you use some kind of code templates, but you don't need this.
    and on a windows-system you need to include "windows.h" before "glut.h".

  4. #4
    Junior Member Newbie
    Join Date
    Apr 2002
    Location
    London, UK
    Posts
    6

    Re: GLUT + Bc55

    Originally posted by borlander:
    If I
    #include <GL/glut.h>

    #include <stdio.h>
    #include <stdlib.h>

    and compile I get next error...
    c:\Borland\Bcc55\include\stdlib.h 584: Only one of a set of
    overloaded functions can be "C"


    If I only do it with
    #include <GL/glut.h>
    it works fine...

    why is it?

    Hello, how did you resolve the problem, becouse I ahve the same one.

    from Ida
    ida

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

    Re: GLUT + Bc55

    Ok... I just tried doing just that with the free command-line compiler from Borland. (5.5) I had no errors... curious about what is on that line, I opened up stdlib.h and went to line 584. I found this...

    using std::exit;
    It's inside a big block within

    #if defined(__cplusplus) && !defined(__USING_CNAME__) && !defined(__STDLIB_H_USING_LIST)


    #endif

    What does your stdlib.h have at that line? From the error it sounds like it has to have something like

    extern "C" someFunction();
    Deiussum
    Software Engineer and OpenGL enthusiast

  6. #6
    Junior Member Newbie
    Join Date
    Apr 2002
    Location
    London, UK
    Posts
    6

    Re: GLUT + Bc55

    Originally posted by Deiussum:
    Ok... I just tried doing just that with the free command-line compiler from Borland. (5.5) I had no errors... curious about what is on that line, I opened up stdlib.h and went to line 584. I found this...

    using std::exit;
    It's inside a big block within

    #if defined(__cplusplus) && !defined(__USING_CNAME__) && !defined(__STDLIB_H_USING_LIST)


    #endif

    What does your stdlib.h have at that line? From the error it sounds like it has to have something like

    extern "C" someFunction();
    Thanks a lot, I do not know if it is correct to put as a comment 'using std::exit;', in stdlib but it works to accept some functions I was using.

    from IDa
    ida

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

    Re: GLUT + Bc55

    Do you have your own exit function somewhere? Perhaps that is the reason commenting out that line causes it to work for you. I hadn't really posted that to suggest you should comment it out, but if doing so helps you, it at least gives a clearer indication of what the problem is... You probably have two exit() functions defined! One in stdlib.h, and one someplace else.
    Deiussum
    Software Engineer and OpenGL enthusiast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •