Cannot include SDL properly

Here’s my first problem w00t :slight_smile:

i have SDL in my redhat distribution, so i did #include <SDL/SDL.h> but no
luck, it will accept the include but it wont recognize any of the SDL
identifyers. Next i copied all SDL code into a sub dir of my project ( SDL)
and there i made 2 sub’s src and include. copied all the files till all
includes where satiesfied. And i got the same thing again,… it won’t
recognize any SDL identifyers nor any OpenGL ones.

I use KDevelop 2.1

i’m gonne keep trying, practice makes perfect :slight_smile:
but i would love to have suggestions on what could be causing this so i can
get down to buisness.

Tnx in advance.
Dinand Vanvelzen

/*-------

    Liberate Tuteme Ex Inferis, Carpe Diem - May The Games Begin
                                            
                                                            /*--------

Here’s my first problem w00t :slight_smile:

i have SDL in my redhat distribution, so i did #include <SDL/SDL.h>
but no luck, it will accept the include but it wont recognize any of
the SDL identifyers. Next i copied all SDL code into a sub dir of my
project ( SDL) and there i made 2 sub’s src and include. copied all
the files till all includes where satiesfied. And i got the same thing
again,… it won’t recognize any SDL identifyers nor any OpenGL ones.

I use KDevelop 2.1

Maybe this works ( I use the german version of KDevelop - some items
maybe called others in your version )::
In KDevelop goto Project->Options ( F7 )
Goto Compiler Options ( 2nd from top ) -> Other options ( a text field ):
Put in there: ‘sdl-config --libs’ 'sdl-config --cflags`

Bye,
CarstenOn Fri, 26 Jul 2002 11:34:05 +0200 Dinand Vanvelzen wrote:

Carsten Ziepke wrote:> On Fri, 26 Jul 2002 11:34:05 +0200 Dinand Vanvelzen <@Dinand_Vanvelzen> wrote:

Here’s my first problem w00t :slight_smile:

i have SDL in my redhat distribution, so i did #include <SDL/SDL.h>
but no luck, it will accept the include but it wont recognize any of
the SDL identifyers. Next i copied all SDL code into a sub dir of my
project ( SDL) and there i made 2 sub’s src and include. copied all
the files till all includes where satiesfied. And i got the same thing
again,… it won’t recognize any SDL identifyers nor any OpenGL ones.

I use KDevelop 2.1

Maybe this works ( I use the german version of KDevelop - some items
maybe called others in your version )::
In KDevelop goto Project->Options ( F7 )
Goto Compiler Options ( 2nd from top ) -> Other options ( a text field ):
Put in there: ‘sdl-config --libs’ 'sdl-config --cflags`

Bye,
Carsten

Options was the configure tab at compiler options, there at the bottom was a
input field called additional options. there i entered

‘sdl-config --libs’ 'sdl-config --cflags`

and pressed ok
this is what the compiler said :

Running configure in source directory
configure: warning: sdl-config --libs: invalid host type
configure: warning: sdl-config --cflags: invalid host type
configure: error: can only configure for one host and one target at a time
*** failed ***

Any idea’s ?

DV

~kicking the win32 habbit :slight_smile:

Dinand Vanvelzen wrote:

Options was the configure tab at compiler options, there at the bottom
was a input field called additional options. there i entered

‘sdl-config --libs’ 'sdl-config --cflags`

try something like sdl-config --libs sdl-config --cflags instead.
^ ^ ^ ^

regards …
clemens

Dinand Vanvelzen wrote:

Carsten Ziepke wrote:

Here’s my first problem w00t :slight_smile:

i have SDL in my redhat distribution, so i did #include <SDL/SDL.h>
but no luck, it will accept the include but it wont recognize any of
the SDL identifyers. Next i copied all SDL code into a sub dir of my
project ( SDL) and there i made 2 sub’s src and include. copied all
the files till all includes where satiesfied. And i got the same thing
again,… it won’t recognize any SDL identifyers nor any OpenGL ones.

I use KDevelop 2.1

Maybe this works ( I use the german version of KDevelop - some items
maybe called others in your version )::
In KDevelop goto Project->Options ( F7 )
Goto Compiler Options ( 2nd from top ) -> Other options ( a text field ):
Put in there: ‘sdl-config --libs’ 'sdl-config --cflags`

Bye,
Carsten

Options was the configure tab at compiler options, there at the bottom was
a input field called additional options. there i entered

‘sdl-config --libs’ 'sdl-config --cflags`

and pressed ok
this is what the compiler said :

Running configure in source directory
configure: warning: sdl-config --libs: invalid host type
configure: warning: sdl-config --cflags: invalid host type
configure: error: can only configure for one host and one target at a time
*** failed ***

Any idea’s ?

DV

~kicking the win32 habbit :slight_smile:

This might be helpfull to :
When i compile the project now it says this :

gmake all-recursive
gmake[1]: Entering directory /home/dinand/gu_client' cd . && automake --foreign ./Makefile cd . && perl admin/am_edit Makefile.in cd . \ && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status fast creating Makefile gmake[1]: Leaving directory/home/dinand/gu_client’
gmake[1]: Entering directory /home/dinand/gu_client' Making all in gu_client gmake[2]: Entering directory/home/dinand/gu_client/gu_client’
cd … && automake --gnu gu_client/Makefile
cd … && perl admin/am_edit gu_client/Makefile.in
cd … \
&& CONFIG_FILES=gu_client/Makefile CONFIG_HEADERS= /bin/sh ./config.status
fast creating gu_client/Makefile
gmake[2]: Leaving directory /home/dinand/gu_client/gu_client' gmake[2]: Entering directory/home/dinand/gu_client/gu_client’
Making all in docs
gmake[3]: Entering directory /home/dinand/gu_client/gu_client/docs' cd ../.. && automake --gnu gu_client/docs/Makefile cd ../.. && perl admin/am_edit gu_client/docs/Makefile.in cd ../.. \ && CONFIG_FILES=gu_client/docs/Makefile CONFIG_HEADERS= /bin/sh ./config.status fast creating gu_client/docs/Makefile gmake[3]: Leaving directory/home/dinand/gu_client/gu_client/docs’
gmake[3]: Entering directory /home/dinand/gu_client/gu_client/docs' Making all in en gmake[4]: Entering directory/home/dinand/gu_client/gu_client/docs/en’
cd …/…/… && automake --gnu gu_client/docs/en/Makefile
cd …/…/… && perl admin/am_edit gu_client/docs/en/Makefile.in
cd …/…/… \
&& CONFIG_FILES=gu_client/docs/en/Makefile CONFIG_HEADERS= /bin/sh
./config.status
fast creating gu_client/docs/en/Makefile
gmake[4]: Leaving directory /home/dinand/gu_client/gu_client/docs/en' gmake[4]: Entering directory/home/dinand/gu_client/gu_client/docs/en’
gmake[4]: Nothing to be done for all'. gmake[4]: Leaving directory/home/dinand/gu_client/gu_client/docs/en’
gmake[4]: Entering directory /home/dinand/gu_client/gu_client/docs' gmake[4]: Nothing to be done forall-am’.
gmake[4]: Leaving directory /home/dinand/gu_client/gu_client/docs' gmake[3]: Leaving directory/home/dinand/gu_client/gu_client/docs’
Making all in SDL
gmake[3]: Entering directory /home/dinand/gu_client/gu_client/SDL' cd ../.. && automake --gnu gu_client/SDL/Makefile cd ../.. && perl admin/am_edit gu_client/SDL/Makefile.in cd ../.. \ && CONFIG_FILES=gu_client/SDL/Makefile CONFIG_HEADERS= /bin/sh ./config.status fast creating gu_client/SDL/Makefile gmake[3]: Leaving directory/home/dinand/gu_client/gu_client/SDL’
gmake[3]: Entering directory /home/dinand/gu_client/gu_client/SDL' Making all in include gmake[4]: Entering directory/home/dinand/gu_client/gu_client/SDL/include’
cd …/…/… && automake --gnu gu_client/SDL/include/Makefile
cd …/…/… && perl admin/am_edit gu_client/SDL/include/Makefile.in
cd …/…/… \
&& CONFIG_FILES=gu_client/SDL/include/Makefile CONFIG_HEADERS= /bin/sh
./config.status
fast creating gu_client/SDL/include/Makefile
gmake[4]: Leaving directory /home/dinand/gu_client/gu_client/SDL/include' gmake[4]: Entering directory/home/dinand/gu_client/gu_client/SDL/include’
gmake[4]: Nothing to be done for all'. gmake[4]: Leaving directory/home/dinand/gu_client/gu_client/SDL/include’
Making all in src
gmake[4]: Entering directory /home/dinand/gu_client/gu_client/SDL/src' cd ../../.. && automake --gnu gu_client/SDL/src/Makefile cd ../../.. && perl admin/am_edit gu_client/SDL/src/Makefile.in cd ../../.. \ && CONFIG_FILES=gu_client/SDL/src/Makefile CONFIG_HEADERS= /bin/sh ./config.status fast creating gu_client/SDL/src/Makefile gmake[4]: Leaving directory/home/dinand/gu_client/gu_client/SDL/src’
gmake[4]: Entering directory /home/dinand/gu_client/gu_client/SDL/src' gmake[4]: Nothing to be done forall’.
gmake[4]: Leaving directory /home/dinand/gu_client/gu_client/SDL/src' gmake[4]: Entering directory/home/dinand/gu_client/gu_client/SDL’
gmake[4]: Nothing to be done for all-am'. gmake[4]: Leaving directory/home/dinand/gu_client/gu_client/SDL’
gmake[3]: Leaving directory /home/dinand/gu_client/gu_client/SDL' gmake[3]: Entering directory/home/dinand/gu_client/gu_client’
c++ -DHAVE_CONFIG_H -I. -I. -I… -O2 -O0 -g3 -Wall -fno-exceptions
-fno-check-new -c main.cpp
main.cpp: In function int resizeWindow (int, int)': main.cpp:53:GLfloat’ undeclared (first use this function)
main.cpp:53: (Each undeclared identifier is reported only once for each
function it appears in.)
main.cpp:53: parse error before ;' main.cpp:59:ratio’ undeclared (first use this function)
main.cpp:59: parse error before /' main.cpp:62:GLint’ undeclared (first use this function)
main.cpp:62: parse error before ,' main.cpp:65:GL_PROJECTION’ undeclared (first use this function)
main.cpp:65: glMatrixMode' undeclared (first use this function) main.cpp:66:glLoadIdentity’ undeclared (first use this function)
main.cpp:69: gluPerspective' undeclared (first use this function) main.cpp:72:GL_MODELVIEW’ undeclared (first use this function)
main.cpp: At top level:
main.cpp:103: GLvoid' was not declared in this scope main.cpp:104: syntax error before{‘
main.cpp:110: ISO C++ forbids declaration of glClearColor' with no type main.cpp:110: initializer list being treated as compound expression mgmake[3]: Leaving directory/home/dinand/gu_client/gu_client’
gmake[2]: Leaving directory /home/dinand/gu_client/gu_client' gmake[1]: Leaving directory/home/dinand/gu_client’
ain.cpp:110: warning: initialization to int' fromfloat’
main.cpp:110: warning: argument to int' fromfloat’
main.cpp:113: ISO C++ forbids declaration of glClearDepth' with no type main.cpp:113: warning: initialization toint’ from float' main.cpp:113: warning: argument toint’ from float' main.cpp:116:GL_DEPTH_TEST’ was not declared in this scope
main.cpp:116: ISO C++ forbids declaration of glEnable' with no type main.cpp:119:GL_LEQUAL’ was not declared in this scope
main.cpp:119: ISO C++ forbids declaration of glDepthFunc' with no type main.cpp:122:GL_PERSPECTIVE_CORRECTION_HINT’ was not declared in this
scope
main.cpp:122: GL_NICEST' was not declared in this scope main.cpp:122: ISO C++ forbids declaration ofglHint’ with no type
main.cpp:122: initializer list being treated as compound expression
main.cpp:124: parse error before return' main.cpp:128:GLvoid’ was not declared in this scope
main.cpp:129: syntax error before {' main.cpp:132: syntax error before=‘
main.cpp:135: GL_COLOR_BUFFER_BIT' was not declared in this scope main.cpp:135:GL_DEPTH_BUFFER_BIT’ was not declared in this scope
main.cpp:135: ISO C++ forbids declaration of glClear' with no type main.cpp:137: ISO C++ forbids declaration ofglLoadIdentity’ with no
type
main.cpp:137: int glLoadIdentity ()' used prior to declaration main.cpp:140: ISO C++ forbids declaration ofSDL_GL_SwapBuffers’ with
no type
main.cpp:140: new declaration int SDL_GL_SwapBuffers ()' /usr/include/SDL/SDL_video.h:812: ambiguates old declarationvoid
SDL_GL_SwapBuffers ()‘
main.cpp:143: syntax error before ++' main.cpp:148: syntax error before=‘
main.cpp:149: Frames' was not declared in this scope main.cpp:149:seconds’ was not declared in this scope
main.cpp:149: fps' was not declared in this scope main.cpp:149: ISO C++ forbids declaration ofprintf’ with no type
main.cpp:149: int printf' redeclared as different kind of symbol /usr/include/stdio.h:278: previous declaration ofint printf (const
char *, …)‘
main.cpp:149: initializer list being treated as compound expression
main.cpp:150: ISO C++ forbids declaration of T0' with no type main.cpp:150:t’ was not declared in this scope
main.cpp:151: ISO C++ forbids declaration of Frames' with no type main.cpp:152: parse error before}‘
main.cpp: In function int main (int, char **)': main.cpp:220:initGL’ cannot be used as a function
main.cpp:275: `drawGLScene’ cannot be used as a function
gmake[3]: *** [main.o] Error 1
gmake[2]: *** [all-recursive] Error 1
gmake[1]: *** [all-recursive] Error 1
gmake: *** [all-recursive-am] Error 2
*** failed ***>> On Fri, 26 Jul 2002 11:34:05 +0200 Dinand Vanvelzen <@Dinand_Vanvelzen> wrote:

Clemens Kirchgatterer wrote:

Dinand Vanvelzen <@Dinand_Vanvelzen> wrote:

Options was the configure tab at compiler options, there at the bottom
was a input field called additional options. there i entered

‘sdl-config --libs’ 'sdl-config --cflags`

try something like sdl-config --libs sdl-config --cflags instead.
^ ^ ^ ^

regards …
clemens

i used :

sdl-config --libs sdl-config --cflags

and got :

Running configure in source directory
configure: error: -L/usr/lib: invalid option; use --help to show usage
*** failed ***

Dinand Vanvelzen wrote:

Clemens Kirchgatterer wrote:

try something like sdl-config --libs sdl-config --cflags
instead.
^ ^ ^ ^

regards …
clemens

i used :

sdl-config --libs sdl-config --cflags

and got :

Running configure in source directory
configure: error: -L/usr/lib: invalid option; use --help to show usage

i dunno anything about kdevelope, so i can only say this:

on compile stage you should add sdl-config --cflags to the gcc options
and on linking sdl-config --libs should be added to the linker
options.

you have to find out, what kdevelope really does with your additional
options …

try to run:

echo sdl-config --libs sdl-config --cflags

in bash and then copy n’ paste whatever it outputs into the compiler options
field of KDevelop.

//Anders ?> ----- Original Message -----

From: vanvelzen@skynet.be (Dinand Vanvelzen)
Newsgroups: loki.open-source.sdl
To:
Sent: Friday, July 26, 2002 2:50 PM
Subject: Re: [SDL] Cannot include SDL properly

Clemens Kirchgatterer wrote:

Dinand Vanvelzen wrote:

Options was the configure tab at compiler options, there at the bottom
was a input field called additional options. there i entered

‘sdl-config --libs’ 'sdl-config --cflags`

try something like sdl-config --libs sdl-config --cflags instead.
^ ^ ^ ^

regards …
clemens

i used :

sdl-config --libs sdl-config --cflags

and got :

Running configure in source directory
configure: error: -L/usr/lib: invalid option; use --help to show usage
*** failed ***


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Clemens Kirchgatterer wrote:

Dinand Vanvelzen <@Dinand_Vanvelzen> wrote:

Clemens Kirchgatterer wrote:

try something like sdl-config --libs sdl-config --cflags
instead.
^ ^ ^ ^

regards …
clemens

i used :

sdl-config --libs sdl-config --cflags

and got :

Running configure in source directory
configure: error: -L/usr/lib: invalid option; use --help to show usage

i dunno anything about kdevelope, so i can only say this:

on compile stage you should add sdl-config --cflags to the gcc options
and on linking sdl-config --libs should be added to the linker
options.

you have to find out, what kdevelope really does with your additional
options …

it adds them to the other compiler directives,… so that seems to be fine.

Anders A wrote:

try to run:

echo sdl-config --libs sdl-config --cflags

in bash and then copy n’ paste whatever it outputs into the compiler
options field of KDevelop.

//Anders ?

Ok did that,
got this :

-L/usr/lib -Wl, -rpath,/usr/lib -lSDL -lpthread -I/usr/include/SDL
-D_REENTRANT

assuming i have read the font correctly :slight_smile: the l is confusing in the bash
font.

i entered it excatly and the compiler gave me this :

Running configure in source directory
configure: error: -L/usr/lib: invalid option; use --help to show usage
*** failed ***

looking at the pervious help i added and the result :

Running configure in source directory
/bin/sh: -L/usr/lib: No such file or directory
loading cache ./config.cache
checking host system type… i386-pc-linux-gnu
checking target system type… i386-pc-linux-gnu
checking build system type… i386-pc-linux-gnu
checking for a BSD compatible install… (cached) /usr/bin/install -c
checking for -p flag to install… yes
checking whether build environment is sane… yes
checking whether make sets ${MAKE}… (cached) yes
checking for working aclocal… found
checking for working autoconf… found
checking for working automake… found
checking for working autoheader… found
checking for working makeinfo… found
checking for gcc… (cached) gcc
checking whether the C compiler (gcc ) works… yes
checking whether the C compiler (gcc ) is a cross-compiler… no
checking whether we are using GNU C… (cached) yes
checking whether gcc accepts -g… (cached) yes
checking how to run the C preprocessor… cpp
checking for c++… (cached) c++
checking whether the C++ compiler (c++ -O0 -g3 -Wall ) works… yes
checking whether the C++ compiler (c++ -O0 -g3 -Wall ) is a
cross-compiler… no
checking whether we are using GNU C++… (cached) yes
checking whether c++ accepts -g… (cached) yes
checking whether c++ supports -fno-exceptions… (cached) yes
checking whether c++ supports -fno-check-new… (cached) yes
checking whether c++ supports -fexceptions… (cached) yes
checking how to run the C++ preprocessor… (cached) c++ -E
checking whether c++ supports -frepo… (cached) yes
checking for ld used by GCC… (cached) /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld… (cached) yes
checking for /usr/bin/ld option to reload object files… (cached) -r
checking for BSD-compatible nm… (cached) /usr/bin/nm -B
checking whether ln -s works… (cached) yes
checking how to recognise dependant libraries… (cached) pass_all
checking for ranlib… (cached) ranlib
checking for strip… (cached) strip
checking for Cygwin environment… (cached) no
checking for mingw32 environment… (cached) no
loading cache ./config.cache within ltconfig
checking whether -lc should be explicitly linked in… (cached) yes
checking for objdir… .libs
checking for gcc option to produce PIC… -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works… (cached) yes
checking if gcc static flag -static works… (cached) yes
finding the maximum length of command line arguments… (cached) 73729
checking if gcc supports -c -o file.o… (cached) yes
checking if gcc supports -fno-rtti -fno-exceptions … yes
checking whether the linker (/usr/bin/ld) supports shared libraries… yes
checking how to hardcode library paths into programs… immediate
checking whether stripping libraries is possible… yes
checking dynamic linker characteristics… GNU/Linux ld.so
checking command to parse /usr/bin/nm -B output… ok
checking if libtool supports shared libraries… yes
checking whether to build shared libraries… yes
checking whether to build static libraries… no
checking for dlfcn.h… (cached) yes
checking whether a program can dlopen itself… (cached) yes
checking whether a statically linked program can dlopen itself… (cached)
no
creating libtool
loading cache ./config.cache
loading cache ./config.cache within ltconfig
checking host system type… i386-pc-linux-gnu
checking build system type… i386-pc-linux-gnu
ltcf-cxx: with_gcc=yes ; with_gnu_ld=yes
checking for objdir… .libs
checking for c++ option to produce PIC… -fPIC -DPIC
checking if c++ PIC flag -fPIC -DPIC works… yes
checking if c++ static flag -static works… yes
finding the maximum length of command line arguments… (cached) 73729
checking if c++ supports -c -o file.o… (cached) yes
checking if c++ supports -fno-rtti -fno-exceptions … yes
checking whether the linker (/usr/bin/ld) supports shared libraries… yes
checking how to hardcode library paths into programs… immediate
checking whether stripping libraries is possible… yes
checking dynamic linker characteristics… GNU/Linux ld.so
checking command to parse /usr/bin/nm -B output… ok
checking if libtool supports shared libraries… yes
checking whether to build shared libraries… yes
checking whether to build static libraries… no
checking for dlfcn.h… (cached) yes
checking whether a program can dlopen itself… (cached) yes
checking whether a statically linked program can dlopen itself… (cached)
no
appending configuration tag “CXX” to libtool
checking for object suffix… (cached) o
checking for executable suffix… (cached) no
checking for extra includes… no
checking for extra libs… no
checking if gu_client should be compiled… yes
creating ./config.status
fast creating ./Makefile
fast creating gu_client/Makefile
fast creating gu_client/docs/Makefile
fast creating gu_client/docs/en/Makefile
fast creating gu_client/SDL/Makefile
fast creating gu_client/SDL/include/Makefile
fast creating gu_client/SDL/src/Makefile
creating config.h
config.h is unchanged
*** success ***

Ok, at least it now accepts that command :slight_smile:
Now press compile :

gmake all-recursive
gmake[1]: Entering directory /home/dinand/gu_client' Making all in gu_client gmake[2]: Entering directory/home/dinand/gu_client/gu_client’
Making all in docs
gmake[3]: Entering directory /home/dinand/gu_client/gu_client/docs' Making all in en gmake[4]: Entering directory/home/dinand/gu_client/gu_client/docs/en’
gmake[4]: Nothing to be done for all'. gmake[4]: Leaving directory/home/dinand/gu_client/gu_client/docs/en’
gmake[4]: Entering directory /home/dinand/gu_client/gu_client/docs' gmake[4]: Nothing to be done forall-am’.
gmake[4]: Leaving directory /home/dinand/gu_client/gu_client/docs' gmake[3]: Leaving directory/home/dinand/gu_client/gu_client/docs’
Making all in SDL
gmake[3]: Entering directory /home/dinand/gu_client/gu_client/SDL' Making all in include gmake[4]: Entering directory/home/dinand/gu_client/gu_client/SDL/include’
gmake[4]: Nothing to be done for all'. gmake[4]: Leaving directory/home/dinand/gu_client/gu_client/SDL/include’
Making all in src
gmake[4]: Entering directory /home/dinand/gu_client/gu_client/SDL/src' gmake[4]: Nothing to be done forall’.
gmake[4]: Leaving directory /home/dinand/gu_client/gu_client/SDL/src' gmake[4]: Entering directory/home/dinand/gu_client/gu_client/SDL’
gmake[4]: Nothing to be done for all-am'. gmake[4]: Leaving directory/home/dinand/gu_client/gu_client/SDL’
gmake[3]: Leaving directory /home/dinand/gu_client/gu_client/SDL' gmake[3]: Entering directory/home/dinand/gu_client/gu_client’
c++ -DHAVE_CONFIG_H -I. -I. -I… -O2 -O0 -g3 -Wall -fno-exceptions
-fno-check-new -c main.cpp
main.cpp: In function int resizeWindow (int, int)': main.cpp:53:GLfloat’ undeclared (first use this function)
main.cpp:53: (Each undeclared identifier is reported only once for each
function it appears in.)
main.cpp:53: parse error before ;' main.cpp:59:ratio’ undeclared (first use this function)
main.cpp:59: parse error before /' main.cpp:62:GLint’ undeclared (first use this function)
main.cpp:62: parse error before ,' main.cpp:65:GL_PROJECTION’ undeclared (first use this function)
main.cpp:65: glMatrixMode' undeclared (first use this function) main.cpp:66:glLoadIdentity’ undeclared (first use this function)
main.cpp:69: gluPerspective' undeclared (first use this function) main.cpp:72:GL_MODELVIEW’ undeclared (first use this function)
main.cpp: At top level:
main.cpp:103: GLvoid' was not declared in this scope main.cpp:104: syntax error before{‘
main.cpp:110: ISO C++ forbids declaration of glClearColor' with no type main.cpp:110: initializer list being treated as compound expression main.cpp:110: warning: initialization toint’ from float' main.cpp:110: warning: argument toint’ from float' main.cpp:113: ISO C++ forbids declaration ofglClearDepth’ with no
type
main.cpp:113: warning: initialization to int' fromfloat’
main.cpp:113: warning: argument to int' fromfloat’
main.cpp:116: GL_DEPTH_TEST' was not declared in this scope main.cpp:116: ISO C++ forbids declaration ofglEnable’ with no type
main.cpp:119: GL_LEQUAL' was not declared in this scope main.cpp:119: ISO C++ forbids declaration ofglDepthFunc’ with no type
main.cpp:122: GL_PERSPECTIVE_CORRECTION_HINT' was not declared in this scope main.cpp:122:GL_NICEST’ was not declared in this scope
main.cpp:122: ISO C++ forbids declaration of glHint' with no type main.cpp:122: initializer list being treated as compound expression main.cpp:124: parse error beforereturn’
main.cpp:128: GLvoid' was not declared in this scope main.cpp:129: syntax error before{‘
main.cpp:132: syntax error before =' main.cpp:135:GL_COLOR_BUFFER_BIT’ was not declared in this scope
main.cpp:135: GL_DEPTH_BUFFER_BIT' was not declared in this scope main.cpp:135: ISO C++ forbids declaration ofglClear’ with no type
main.cpp:137: ISO C++ forbids declaration of glLoadIdentity' with no type main.cpp:137:int glLoadIdentity ()’ used prior to declaration
main.cpp:140: ISO C++ forbids declaration of SDL_GL_SwapBuffers' with no type main.cpp:140: new declarationint SDL_GL_SwapBuffers ()’
/usr/include/SDL/SDL_video.h:812: ambiguates old declaration void SDL_GL_SwapBuffers ()' main.cpp:143: syntax error before++‘
main.cpp:148: syntax error before =' main.cpp:149:Frames’ was not declared in this scope
main.cpp:149: seconds' was not declared in this scope main.cpp:149:fps’ was not declared in this scope
main.cpp:149: ISO C++ forbids declaration of printf' with no type main.cpp:149:int printf’ redeclared as different kind of symbol
/usr/include/stdio.h:278: previous declaration of int printf (const char *, ...)' main.cpp:149: initializer list being treated as compound expression main.cpp:150: ISO C++ forbids declaration ofT0’ with no type
main.cpp:150: t' was not declared in this scope main.cpp:151: ISO C++ forbids declaration ofFrames’ with no type
main.cpp:152: parse error before }' main.cpp: In functionint main (int, char **)’:
main.cpp:220: initGL' cannot be used as a function main.cpp:275:drawGLScene’ cannot be used as a function
gmake[3]: *** [main.o] Error 1
gmake[3]: Leaving directory /home/dinand/gu_client/gu_client' gmake[2]: *** [all-recursive] Error 1 gmake[2]: Leaving directory/home/dinand/gu_client/gu_client’
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/home/dinand/gu_client’
gmake: *** [all-recursive-am] Error 2
*** failed ***

Still the same.
Won’t accept the identifyers although it does inlcude the SDL files :S
i don’t get it… what’s wrong ?

At least we are on the right track with that command :slight_smile:

i now added <GL/gl.h>
in the includes,… that took care of most errors except for these :

main.cpp:71: `gluPerspective’ undeclared (first use this function)
main.cpp:71: (Each undeclared identifier is reported only once for each
function it appears in.)

Then i included <GL/glu.h>
but that made it worse,… an big list of errors again.

And correct me if i’m wrong but is includeing gl.h not allready done by SDL
? so i don’t see why it’s won’t recognize the gl identifyers untill i add
gl.h

— Dinand Vanvelzen wrote:

assuming i have read the font correctly :slight_smile: the l is
confusing in the bash
font.

There’s a bash font now? :wink:

Cheers,

-Loren

P.S. For those new to X11 I thought I should describe
the operation of the “cut buffer”… the "cut buffer"
is a similar concept to the Windows/Mac "clipboard"
with a little bit different operation/paradygm: In
theory, any text that you select is automatically
coppied to the “cut buffer” (except for some newer
programs -usually windows program ports- programs that
try to treat the “cut buffer” like a clipboard)…

To paste from the “cut buffer”, simply movie the mouse
to where you want to insert the text, and press the
middle mouse button.

Hope that helped,__________________________________________________
Do You Yahoo!?
Yahoo! Health - Feel better, live better

Dinand Vanvelzen wrote:

i now added <GL/gl.h>
in the includes,… that took care of most errors except for these :

main.cpp:71: `gluPerspective’ undeclared (first use this function)
main.cpp:71: (Each undeclared identifier is reported only once for each
function it appears in.)

Then i included <GL/glu.h>
but that made it worse,… an big list of errors again.

And correct me if i’m wrong but is includeing gl.h not allready done by
SDL ? so i don’t see why it’s won’t recognize the gl identifyers untill i
add gl.h

Seems my gl.h is of the mesa library.
is this normal ? i have redhat 7.3