Solved

Easy help with compiling please!

Posted on 2004-09-19
6
542 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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 50 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

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 …
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…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

726 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