Author Topic: Codeblocks project wizard doesn't recognize SDL path.  (Read 14455 times)

registerthis

  • Guest
Codeblocks project wizard doesn't recognize SDL path.
« on: September 13, 2009, 08:07:28 am »
64 bit XP, if it matters.

SDL installed and working under MSYS/mingw.

Starting a new SDL project, asks for location of SDL, starts with "$(#sdl)."

Point to base path of SDL, under which there's lib and bin, which has SDL.h, etc., yet codeblocks says it can't find SDL.h.




registerthis

  • Guest
Re: Codeblocks project wizard doesn't recognize SDL path.
« Reply #1 on: September 13, 2009, 08:09:24 pm »
So.. broken, there a work around?

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Codeblocks project wizard doesn't recognize SDL path.
« Reply #2 on: September 13, 2009, 08:34:30 pm »
So.. broken, there a work around?
It seems SDL has (yet again) changed their path policy. Change the wizard to your needs. to do that, right click on the wizard and select "Edit this script". The scoll down until you find "// verify include dependencies" and "// verify library dependencies". You might want to comment both sections after these comments.
I am sick of adjusting path settings over and over again.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

hornpipe2

  • Guest
Re: Codeblocks project wizard doesn't recognize SDL path.
« Reply #3 on: November 28, 2011, 07:09:42 pm »
Actually the fix is very simple.  Edit the script, and line 50, change from:
Code
        if (!VerifyFile(dir_nomacro_inc, _T("SDL.h"), _T("SDL's include")))
to
Code
        if (!VerifyFile(dir_nomacro_inc, _T("SDL/SDL.h"), _T("SDL's include")))

EDIT:  I will add that this is still broken in 10.5 over 2 years later.  Someone should get in and fix this.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Codeblocks project wizard doesn't recognize SDL path.
« Reply #4 on: November 28, 2011, 07:44:52 pm »
Hm, As far as I remember the includes in the source code should be '#include "SDL.h" ' and not '#include <SDL/SDL.h>'
Are you sure the change you're proposing is correct?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Codeblocks project wizard doesn't recognize SDL path.
« Reply #5 on: November 28, 2011, 08:13:52 pm »
EDIT:  I will add that this is still broken in 10.5 over 2 years later.  Someone should get in and fix this.
I am sick of adjusting path settings over and over again.
I simply had to do it too often.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Folco

  • Regular
  • ***
  • Posts: 343
    • Folco's blog (68k lover)
Re: Codeblocks project wizard doesn't recognize SDL path.
« Reply #6 on: November 28, 2011, 09:07:35 pm »
Obfuscated -> SDL is distributed with the headers in <SDL>/include/SDL/ (you can check with the MinGW package here : http://www.libsdl.org/download-1.2.php ).
Kernel Extremist - PedroM power ©

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Codeblocks project wizard doesn't recognize SDL path.
« Reply #7 on: November 28, 2011, 10:16:26 pm »
OK, what does it change then?

Here is the ouptut of sdl-config on linux:
Code
$ sdl-config --cflags
-I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT

$ ls -l /usr/include/SDL/
общо 592K
-rw-r--r-- 1 root root 5,1K 13 мар  2011 begin_code.h
-rw-r--r-- 1 root root 1,5K 13 мар  2011 close_code.h
-rw-r--r-- 1 root root 1,9K 13 мар  2011 SDL_active.h
-rw-r--r-- 1 root root  11K 13 мар  2011 SDL_audio.h
-rw-r--r-- 1 root root  986 13 мар  2011 SDL_byteorder.h
-rw-r--r-- 1 root root 6,0K 13 мар  2011 SDL_cdrom.h
-rw-r--r-- 1 root root 8,9K 13 мар  2011 SDL_config.h
-rw-r--r-- 1 root root 2,2K 13 мар  2011 SDL_cpuinfo.h
-rw-r--r-- 1 root root 5,8K 13 мар  2011 SDL_endian.h
-rw-r--r-- 1 root root 1,9K 13 мар  2011 SDL_error.h
-rw-r--r-- 1 root root  13K 13 мар  2011 SDL_events.h
-rw-r--r-- 1 root root  979 13 мар  2011 SDL_getenv.h
-rw-r--r-- 1 root root 3,2K 13 мар  2011 SDL.h
-rw-r--r-- 1 root root 5,2K 20 сеп 22,19 SDL_image.h
-rw-r--r-- 1 root root 5,5K 13 мар  2011 SDL_joystick.h
-rw-r--r-- 1 root root 4,1K 13 мар  2011 SDL_keyboard.h
-rw-r--r-- 1 root root 7,4K 13 мар  2011 SDL_keysym.h
-rw-r--r-- 1 root root 2,7K 13 мар  2011 SDL_loadso.h
-rw-r--r-- 1 root root 2,8K 13 мар  2011 SDL_main.h
-rw-r--r-- 1 root root 4,7K 13 мар  2011 SDL_mouse.h
-rw-r--r-- 1 root root 5,8K 13 мар  2011 SDL_mutex.h
-rw-r--r-- 1 root root  183 13 мар  2011 SDL_name.h
-rw-r--r-- 1 root root 329K 13 мар  2011 SDL_opengl.h
-rw-r--r-- 1 root root 2,7K 13 мар  2011 SDL_platform.h
-rw-r--r-- 1 root root 2,0K 13 мар  2011 SDL_quit.h
-rw-r--r-- 1 root root 4,9K 13 мар  2011 SDL_rwops.h
-rw-r--r-- 1 root root  17K 13 мар  2011 SDL_stdinc.h
-rw-r--r-- 1 root root 6,2K 13 мар  2011 SDL_syswm.h
-rw-r--r-- 1 root root 4,4K 13 мар  2011 SDL_thread.h
-rw-r--r-- 1 root root 4,5K 13 мар  2011 SDL_timer.h
-rw-r--r-- 1 root root  979 13 мар  2011 SDL_types.h
-rw-r--r-- 1 root root 2,6K 13 мар  2011 SDL_version.h
-rw-r--r-- 1 root root  38K 13 мар  2011 SDL_video.h

So, if I use the sdl-config, I'll have to use #include "SDL.h" in my code, then to be portable I'll have to setup my windows project to point to the SDL.h file directly.

@hornpipe2:
The change is already made in SVN.
Some questions:
What is the path to SDL.h?
What have you entered for #sdl, #sdl.includes #sdl.libs?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]