Problem setting up OpenGL in Borland C++
I am trying to set up OpenGL in Borland C++ 5. Here are a list of the errors that I am getting inisde the vcl directory (which is needed for vcl.h). Could anyone please help me?
Info :Building...
Info :Compiling C:\apcs\gl\lesson01.cpp
Error: dstring.h(20,34):Conflicting type modifiers
Error: dstring.h(27,18):Declaration syntax error
Error: dstring.h(29,18):Declaration syntax error
Error: dstring.h(31,79):Conflicting type modifiers
Error: dstring.h(36,67):Conflicting type modifiers
Error: dstring.h(37,53):Conflicting type modifiers
Error: dstring.h(39,17):Conflicting type modifiers
Error: dstring.h(41,38):Conflicting type modifiers
Error: dstring.h(43,33):Conflicting type modifiers
Error: dstring.h(45,61):Conflicting type modifiers
Error: dstring.h(46,66):Conflicting type modifiers
Error: dstring.h(47,60):Conflicting type modifiers
Error: dstring.h(49,46):Conflicting type modifiers
Error: dstring.h(52,29):Conflicting type modifiers
Error: dstring.h(53,44):Conflicting type modifiers
Error: dstring.h(54,50):Conflicting type modifiers
Error: dstring.h(55,63):Conflicting type modifiers
Error: dstring.h(56,47):Conflicting type modifiers
Error: dstring.h(57,37):Conflicting type modifiers
Error: dstring.h(58,36):Conflicting type modifiers
Error: dstring.h(59,39):Conflicting type modifiers
Error: dstring.h(62,30):Conflicting type modifiers
Error: dstring.h(65,62):Conflicting type modifiers
Error: dstring.h(66,63):Conflicting type modifiers
Error: dstring.h(69,62):Conflicting type modifiers
Error: dstring.h(69,62):Too many error or warning messages
I can help you if you tell me what vcl.h is. Why do you need that? It''s not part of BC5.02 and I''m sure a part of BC5.5 neither.
Crispy
Crispy
"Literally, it means that Bob is everything you can think of, but not dead; i.e., Bob is a purple-spotted, yellow-striped bumblebee/dragon/pterodactyl hybrid with a voracious addiction to Twix candy bars, but not dead."- kSquared
vcl.h is needed for WINGDIAPI, which is found in gl.h.
Its directory is located here: c:\program files\borland\cbuilder\include\vcl
[edited by - jtrost on February 11, 2003 10:40:38 PM]
Its directory is located here: c:\program files\borland\cbuilder\include\vcl
[edited by - jtrost on February 11, 2003 10:40:38 PM]
And how does your code look like ?
I''m pretty sure it''s the problem of including files. As far as i remember, i had no problem compling NEHE''s Borland C++ lessons.
I''m pretty sure it''s the problem of including files. As far as i remember, i had no problem compling NEHE''s Borland C++ lessons.
Trust me - you don''t need that file and gl.h doesn''t include it in. If you''re using BCB (Borland Builder, then the problem might be different, though it seems kinda strange. A quick search in Google returned that vcl.h is in the vcl directory. So make sure you''re including vcl/vcl.h . If it doesn''t help - run a reach on the file on your hard drive or the BCB directory and after locating it manually, move it to the proper location. I''m sure it''s there if it''s required.
Crispy
Crispy
"Literally, it means that Bob is everything you can think of, but not dead; i.e., Bob is a purple-spotted, yellow-striped bumblebee/dragon/pterodactyl hybrid with a voracious addiction to Twix candy bars, but not dead."- kSquared
I am using the code that I downloaded from Nehe''s website. Here is what my preprocessor directives look like:
#include <vcl.h>
#include <windows.h>
#include <gl\gl.h>
#include <gl\glu.h>
#include <gl\glaux.h>
#pragma hdrstop
When I do not include vcl.h I get these errors:
Info :Building...
Info :Compiling C:\apcs\gl\lesson01.cpp
Error: GL.H(833,15):Declaration syntax error
Error: GL.H(834,15):Multiple declaration for ''WINGDIAPI''
Error: GL.H(833,15):Earlier declaration of ''WINGDIAPI''
Error: GL.H(834,15):Declaration syntax error
Error: GL.H(835,15):Multiple declaration for ''WINGDIAPI''
Error: GL.H(834,15):Earlier declaration of ''WINGDIAPI''
Error: GL.H(835,15):Declaration syntax error
Error: GL.H(836,15):Multiple declaration for ''WINGDIAPI''
Error: GL.H(835,15):Earlier declaration of ''WINGDIAPI''
Error: GL.H(836,15):Declaration syntax error
Error: GL.H(837,15):Multiple declaration for ''WINGDIAPI''
Error: GL.H(836,15):Earlier declaration of ''WINGDIAPI''
Error: GL.H(837,15):Declaration syntax error
Error: GL.H(838,15):Multiple declaration for ''WINGDIAPI''
Error: GL.H(837,15):Earlier declaration of ''WINGDIAPI''
Error: GL.H(838,15):Declaration syntax error
Error: GL.H(839,15):Multiple declaration for ''WINGDIAPI''
Error: GL.H(838,15):Earlier declaration of ''WINGDIAPI''
Error: GL.H(839,15):Declaration syntax error
Error: GL.H(840,15):Multiple declaration for ''WINGDIAPI''
Error: GL.H(839,15):Earlier declaration of ''WINGDIAPI''
Error: GL.H(840,15):Declaration syntax error
Error: GL.H(841,15):Multiple declaration for ''WINGDIAPI''
Error: GL.H(840,15):Earlier declaration of ''WINGDIAPI''
Error: GL.H(841,15):Declaration syntax error
Error: GL.H(841,15):Too many error or warning messages
I am not sure whether or not I need vcl.h, but it was included when I downloaded the file. Oh, and if this may help at all, here is a list of my project option directories:
include: c:\bc5\include; c\apcs\gl; c:\program files\borland\cbuilder\include\vcl
lib: c:\bc5\lib; c:\apcs\gl
final: c:\apcs\gl
Do I need anything inside the source or intermediate?
#include <vcl.h>
#include <windows.h>
#include <gl\gl.h>
#include <gl\glu.h>
#include <gl\glaux.h>
#pragma hdrstop
When I do not include vcl.h I get these errors:
Info :Building...
Info :Compiling C:\apcs\gl\lesson01.cpp
Error: GL.H(833,15):Declaration syntax error
Error: GL.H(834,15):Multiple declaration for ''WINGDIAPI''
Error: GL.H(833,15):Earlier declaration of ''WINGDIAPI''
Error: GL.H(834,15):Declaration syntax error
Error: GL.H(835,15):Multiple declaration for ''WINGDIAPI''
Error: GL.H(834,15):Earlier declaration of ''WINGDIAPI''
Error: GL.H(835,15):Declaration syntax error
Error: GL.H(836,15):Multiple declaration for ''WINGDIAPI''
Error: GL.H(835,15):Earlier declaration of ''WINGDIAPI''
Error: GL.H(836,15):Declaration syntax error
Error: GL.H(837,15):Multiple declaration for ''WINGDIAPI''
Error: GL.H(836,15):Earlier declaration of ''WINGDIAPI''
Error: GL.H(837,15):Declaration syntax error
Error: GL.H(838,15):Multiple declaration for ''WINGDIAPI''
Error: GL.H(837,15):Earlier declaration of ''WINGDIAPI''
Error: GL.H(838,15):Declaration syntax error
Error: GL.H(839,15):Multiple declaration for ''WINGDIAPI''
Error: GL.H(838,15):Earlier declaration of ''WINGDIAPI''
Error: GL.H(839,15):Declaration syntax error
Error: GL.H(840,15):Multiple declaration for ''WINGDIAPI''
Error: GL.H(839,15):Earlier declaration of ''WINGDIAPI''
Error: GL.H(840,15):Declaration syntax error
Error: GL.H(841,15):Multiple declaration for ''WINGDIAPI''
Error: GL.H(840,15):Earlier declaration of ''WINGDIAPI''
Error: GL.H(841,15):Declaration syntax error
Error: GL.H(841,15):Too many error or warning messages
I am not sure whether or not I need vcl.h, but it was included when I downloaded the file. Oh, and if this may help at all, here is a list of my project option directories:
include: c:\bc5\include; c\apcs\gl; c:\program files\borland\cbuilder\include\vcl
lib: c:\bc5\lib; c:\apcs\gl
final: c:\apcs\gl
Do I need anything inside the source or intermediate?
i have never used borland c++ 5 (i''m a msvc++6 user), but would like to comment:
do you really need the vcl.h? i don''t know, in vc++6, windows.h is all you need for win32 stuffs....
maybe try compiling without the vcl.h?
nomad | nomad forum
do you really need the vcl.h? i don''t know, in vc++6, windows.h is all you need for win32 stuffs....
maybe try compiling without the vcl.h?
nomad | nomad forum
In my last message I posted what errors I get without vcl.h. So either way, I''m getting a lot of errors.
try including windows.h after the opengl headers. if this doesn''t help, do not include glaux.h and refit your project to not use glaux functions (trust me - glaux is a real pain to work with on borland compilers). to get things moving - try commenting out glaux-related stuff and just get the project to compile. you don''t need hdrstop here - comment it out.
Crispy
Crispy
"Literally, it means that Bob is everything you can think of, but not dead; i.e., Bob is a purple-spotted, yellow-striped bumblebee/dragon/pterodactyl hybrid with a voracious addiction to Twix candy bars, but not dead."- kSquared
NEVER include gl header files before windows.h. That will give you such strange errors but in gl header files. I think, vcl.h
is some sort of borland''s windows.h with some other features.
Also including both of them may cause ''conflicting type'' errors.
Try just order vcl.h, gl.h, glu.h or windows.h, gl.h glu.h.
And it this fails, post the whole code ;-)
is some sort of borland''s windows.h with some other features.
Also including both of them may cause ''conflicting type'' errors.
Try just order vcl.h, gl.h, glu.h or windows.h, gl.h glu.h.
And it this fails, post the whole code ;-)
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement