[SDL] Cannot include SDL properly

Dinand Vanvelzen vanvelzen at skynet.be
Fri Jul 26 05:21:06 PDT 2002


Dinand Vanvelzen wrote:

> Carsten Ziepke wrote:
> 
>> On Fri, 26 Jul 2002 11:34:05 +0200
>> Dinand Vanvelzen <vanvelzen at skynet.be> wrote:
>> 
>>> Here's my first problem w00t :)
>>> 
>>> 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 :)

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 for `all-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 for `all'. 
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' from `float' 
main.cpp:110: warning: argument to `int' from `float' 
main.cpp:113: ISO C++ forbids declaration of `glClearDepth' with no 
type 
main.cpp:113: warning: initialization to `int' from `float' 
main.cpp:113: warning: argument to `int' 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 of `glHint' 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 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 declaration `int 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 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 *** 




More information about the SDL mailing list