?
Solved

Easy help with compiling please!

Posted on 2004-09-19
6
Medium Priority
?
546 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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

What is RenderMan: RenderMan is a not any particular piece of software. RenderMan is an industry standard, defining set of rules that any rendering software should use, to be RenderMan-compliant. Pixar's RenderMan is a flagship implementation of …
Recently, in one of the tech-blogs I usually read, I saw a post about the best-selling video games through history. The first place in the list is for the classic, extremely addictive Tetris. Well, a long time ago, in a galaxy far far away, I was…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
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 …

650 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