BlueSorc
December 12th, 2009, 11:03 AM
Hi,
I'm developing a program using the SDL libraries in the Code::Blocks IDE. Previously, I had been building it on a laptop running Windows Vista, and it has been running fine.
I've then moved the project across to my desktop running Jaunty Ubuntu. Because of code:blocks, getting the program to compile and link without any errors was fairly straightforward. The issue comes when it runs, and I get a crash.
Outputted text to the console seems to suggest that the crash is caused when I attempt to load an image file. Fiddling with the code confirms this, and I get a crash whenever I try to load an image file, whether its a BMP, PNG or JPEG, wether I'm using the IMG_Load() function from SDL_image or SDL's native LoadBMP(). I believe the crash is not caused when the program loads the image, but I believe that it simply is unable to load the image, causing an uninitialized pointer later on in the code.
I'm unfamiliar with developing on a non-windows environment, so I don't really have any idea where to start to fix this. As previously stated, the code compiles and it runs fine on Windows, so I don't believe its an issue with the code. It also links correctly, making me feel I have my linker options correct. I don't really have any idea what else to try; If anyone can even give me a starting point to Google from, it would be appreciated.
I'm developing a program using the SDL libraries in the Code::Blocks IDE. Previously, I had been building it on a laptop running Windows Vista, and it has been running fine.
I've then moved the project across to my desktop running Jaunty Ubuntu. Because of code:blocks, getting the program to compile and link without any errors was fairly straightforward. The issue comes when it runs, and I get a crash.
Outputted text to the console seems to suggest that the crash is caused when I attempt to load an image file. Fiddling with the code confirms this, and I get a crash whenever I try to load an image file, whether its a BMP, PNG or JPEG, wether I'm using the IMG_Load() function from SDL_image or SDL's native LoadBMP(). I believe the crash is not caused when the program loads the image, but I believe that it simply is unable to load the image, causing an uninitialized pointer later on in the code.
I'm unfamiliar with developing on a non-windows environment, so I don't really have any idea where to start to fix this. As previously stated, the code compiles and it runs fine on Windows, so I don't believe its an issue with the code. It also links correctly, making me feel I have my linker options correct. I don't really have any idea what else to try; If anyone can even give me a starting point to Google from, it would be appreciated.