Oops - sorry about that :? Coincidently the example was made using Codeblocks under Windows, so the executable (which I can run under wine) came with the required .dll s - I tried adding them to the same folder just to see what would happen but (unsurprisingly) there was no change...
Ubuntu 9.04
Codeblocks 8.02
GNU GCC Compiler 4:3.4.3-1ubuntu1
And here is the build log:
-------------- Build: Debug in Mario2 ---------------
gcc -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -Wall -g -c /home/william/Desktop/Documents/Programming/SDL/Mario2/files.c -o obj/Debug/files.o
gcc -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -Wall -g -c /home/william/Desktop/Documents/Programming/SDL/Mario2/main.c -o obj/Debug/main.o
gcc -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -Wall -g -c /home/william/Desktop/Documents/Programming/SDL/Mario2/make.c -o obj/Debug/make.o
/home/william/Desktop/Documents/Programming/SDL/Mario2/make.c: In function ‘make’:
/home/william/Desktop/Documents/Programming/SDL/Mario2/make.c:34: warning: missing curly brackets around initialiser
/home/william/Desktop/Documents/Programming/SDL/Mario2/make.c:34: warning: (near initialisation for ‘map[0]’)
gcc -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -Wall -g -c /home/william/Desktop/Documents/Programming/SDL/Mario2/play.c -o obj/Debug/play.o
/home/william/Desktop/Documents/Programming/SDL/Mario2/play.c: In function ‘play’:
/home/william/Desktop/Documents/Programming/SDL/Mario2/play.c:33: warning: missing curly brackets around initialiser
/home/william/Desktop/Documents/Programming/SDL/Mario2/play.c:33: warning: (near initialisation for ‘map[0]’)
g++ -o bin/Debug/Mario2 obj/Debug/files.o obj/Debug/main.o obj/Debug/make.o obj/Debug/play.o -L/usr/lib -lSDL -lSDL_image
Output size is 36.23 KB
Process terminated with status 0 (0 minutes, 2 seconds)
0 errors, 4 warnings
I haven't checked the "shared libraries" page yet, I'll do that now - just wanted to get the information out there as soon as possible
Thanks for the help :)
William
If you just use system-libraries (or libs from package installed correctly) they should be found.
If you have self-compiled libs you want to use, see the link Tim posted.
The compiled programs on linux are of course executables, because you can execute them (even if they have no file ending, linux works in a different way).
In your case I guess it's a problem with the paths to your images.
If you start your program from inside C::B look in your build-log how C::B does it.
It should look like:
Checking for existence: /tmp/test/bin/Release/test
Executing: /tmp/test/bin/Release/test (in /tmp/test/.)
Now open a console and switch to /tmp/test and type /tmp/test/bin/Release/test to see if it works now.
You have to use your paths of course and not mine.
Gotcha
Checking for existence: /home/william/Desktop/Documents/Programming/SDL/Mario2/bin/Debug/Mario2
Executing: xterm -T Mario2 -e /usr/bin/cb_console_runner /home/william/Desktop/Documents/Programming/SDL/Mario2/bin/Debug/Mario2 (in /home/william/Desktop/Documents/Programming/SDL/Mario2/.)
So go here:
/home/william/Desktop/Documents/Programming/SDL/Mario2/
and execute:
xterm -T Mario2 -e /usr/bin/cb_console_runner /home/william/Desktop/Documents/Programming/SDL/Mario2/bin/Debug/Mario2
That seems to have worked perfectly, and I can always make a bash script to run it. Is there any way of simplifying the process though?
William