?
Solved

Easy help with compiling please!

Posted on 2004-09-19
6
Medium Priority
?
544 Views
Last Modified: 2013-12-06
Hello!

I'm an OpenGL newbie, and I've been desperately attempting to compile some OpenGL programs without luck. So far I was only successful in getting one file compiled and run, but not the others.

I have all the correct dlls, libraries, header files installed in the correct folders. So far I've been successful only in getting this one to work:

http://www.nullterminator.net/glsample.zip

So I extracted glsample.cpp, and I put bcc32 -tW glsample.cpp
and it compiled and worked fine.

Whereas, if I try to compile:
http://www.opengl.org/resources/code/basics/samples/accum.c

by using bcc32 accum.c, I got this:

Error E2141 D:\Borland\BCC55\include\GL/gl.h 1153: Declaration syntax error
Error E2238 D:\Borland\BCC55\include\GL/gl.h 1154: Multiple declaration for 'WINGDIAPI'
Error E2344 D:\Borland\BCC55\include\GL/gl.h 1153: Earlier declaration of 'WINGDIAPI'


The same thing happened if I compile it this way:
bcc32 opengl32.lib glut32.lib glu32.lib accum.c


I really don't know what else to do, and if anyone can help me, I'll appreciate that! I don't really care how or what I should use to compile, as long as I can compile OpenGL programs and make them work/run.
So far, I have opengl32.lib placed in the /lib directory of my compiler (which is Borland C++), and I have glut32.h and glu32.h placed in the /include/GL directory. The correct dlls are also placed in WINNT\system32 (I am using Win2k) So if there's any more files I need to have placed, I'd be glad to know. You can also tell me any IDE of your choice, and I'll follow it.
Again, I just want to get some programs to compile and make them w-o-r-k. *grrrrrrrrr* :-)

Thank you!!!
0
Comment
Question by:zpivat
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 45

Expert Comment

by:sunnycoder
ID: 12099777
Post lines 1148-1158 of gl.h ... Seems like a syntax error
0
 

Author Comment

by:zpivat
ID: 12100826
But how is that a syntax error? Afterall I got to compile and run glsample.cpp successfully.
0
 
LVL 45

Expert Comment

by:sunnycoder
ID: 12100840
Sytax error in the program that you are trying to compile now. One program compiling successfully does not imply all programs will comile successfully
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Author Comment

by:zpivat
ID: 12105012
Yes, but the thing is....out of all programs I've tried to compile, only glsample.cpp did successfully. None of the other files compiled, and I think that doesn't make sense. And I've tried this at least with 50 different files.
0
 

Expert Comment

by:Wyverex
ID: 12201569
Try to change the order in which the headers are included. Sometimes a header is included more than once by a circular reference. I had similar problems in the past.
0
 
LVL 3

Accepted Solution

by:
Srm74 earned 200 total points
ID: 12367040
Hi,
I'm almost sure this will solve it..
This error message is caused by using the wrong platform selection in your project file. Open your project. Right click the .exe file in the project window and select "Target Expert." Change the platform to "Win32" and change target model to "Console." Upon successful recompilation, your program should work.

Hope this helps
0

Featured Post

Percona Live Europe 2017 | Sep 25 - 27, 2017

The Percona Live Open Source Database Conference Europe 2017 is the premier event for the diverse and active European open source database community, as well as businesses that develop and use open source database software.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Artificial Intelligence comes in many forms, and for game developers, Path-Finding is an important ability for making an NPC (Non-Playable Character) maneuver through terrain.  A* is a particularly easy way to approach it.  I’ll start with the algor…
As game developers, we quickly learn that Artificial Intelligence (AI) doesn’t need to be so tough.  To reference Space Ghost: “Moltar, I have a giant brain that is able to reduce any complex machine into a simple yes or no answer. (http://www.youtu…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question