I have created a devpak for SDL2 but the template for it needs to refer to the SDL2 include directory and lib. This works with an absolute "include" and "lib" directory, but that assumes that devcpp is installed in the default place. how do you do a "relative to devcpp app" include etc. inside a template ?
Why don't you put your header files and libraries to the standard directories in the first place?
The old standard place used to be %app%\lib and %app%\include and %app%\bin but post 184.108.40.206 it might also be %app%\mingw32\lib and %app%\mingw32\include or even %app%\mingw32\mingw32\lib and %app%\mingw32\ming32\include
It used to be recommended to install devcpp to c:\ to avoid spaces in directory paths, and I still follow that recommendation, although the current default is c:\program files\
What I need to know is how to define a template so that the include and lib directories needed are relative to devcpp app directory that devcpp was installed in as the actual directory is unknown.
But you should not need any directories in your template at all. The compiler and linker knows where to look for the files no matter where you've installed them.
That is what used to happen. However it is not quite as simple now. The api has changed somewhat for SDL so 1.2.x is quite a bit different to 2.x It is quite likely that both will be installed at the same time. SDL is installed into SDL and SDL2 into SDL2. however, a number of their include files etc. still have the same name, so I have to specify the include directory specifically. I did try without an extra include directory and SDL2 could not find it's own includes or libs. That is where I get the problems.
When compiling on linux you can use `sdl2-config --cflags --libs` in your compiling and linking to include the correct extra paths, but that does not work in windows.
SDL header files should be in e.g.
and SDL2 header files in
The template C file should then use
thanks. It is not the recommended method for SDL2, but it works, and keeps things simple for now. I've created a package. how can I make it available?
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.