Go Back   CodingForums.com > :: Computing & Sciences > Computer Programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 07-24-2009, 02:44 PM   PM User | #1
adarshakb
Regular Coder

 
adarshakb's Avatar
 
Join Date: Jun 2009
Location: Silicon valley of india
Posts: 247
Thanks: 11
Thanked 1 Time in 1 Post
adarshakb has a little shameless behaviour in the past
Open Gl problem

i encountered a problem while programing with openGL using vc 2003
if i give
#include <GL/glut.h>
#include <iostream>
its giving compile time error
Compiling...
main.cpp
D:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\stdlib.h(256) : error C2381: 'exit' : redefinition; __declspec(noreturn) differs
D:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\gl\glut.h(146) : see declaration of 'exit'

Build log was saved at "file://d:\Documents and Settings\Adarsha\My Documents\Visual Studio Projects\line-y=mxplusc\line-y=mxplusc\Debug\BuildLog.htm"
line-y=mxplusc - 1 error(s), 0 warning(s)

if i interchange to
#include <iostream>
#include <GL/glut.h>
i can then compile it

i am relatively new to openGL so can anone help explain
__________________
Two things are infinite: the universe and human stupidity; and I'm not sure about the universe.

Albert Einstein
-----------------------------------------------------
My Blog songs
adarshakb is offline   Reply With Quote
Old 07-26-2009, 01:38 PM   PM User | #2
adarshakb
Regular Coder

 
adarshakb's Avatar
 
Join Date: Jun 2009
Location: Silicon valley of india
Posts: 247
Thanks: 11
Thanked 1 Time in 1 Post
adarshakb has a little shameless behaviour in the past
can no one answer this ... ???

any small idea wat the problem is about...?
i have downloaded the official glut.h file
__________________
Two things are infinite: the universe and human stupidity; and I'm not sure about the universe.

Albert Einstein
-----------------------------------------------------
My Blog songs
adarshakb is offline   Reply With Quote
Old 07-26-2009, 04:16 PM   PM User | #3
Dunna
Regular Coder

 
Join Date: May 2004
Location: New Hampshire, America
Posts: 245
Thanks: 0
Thanked 2 Times in 2 Posts
Dunna is an unknown quantity at this point
Sounds like the same thing is being included twice, but the include inside of glut.h probably uses #if and #else directives. For example:
Code:
#ifndef IOSTREAM_H
#include <iostream>
#endif
Of course, it sounds like something similar to that is being done for the function exit() inside of glut, but not in iostream.
Dunna is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 06:52 PM.


Advertisement
Log in to turn off these ads.