02-16-2012 03:20 PM
Hi
First, what I'm running:
* NDK 2 QNX Momentics IDE
* Simulator
I've been struggling for a while to get SDL to work.
I've finally been able to compile SDL and TouchControlOverlay, then create a new project depending on those, and then build it all. However my simple app does not work on the simulator, it just freezes with a white screen.
I added the shared libraries of SDL and TouchControlOverlay as assets in the bar-descriptor file, not sure if that was the right thing to do.
When I don't have anything SDL in the main.c file, but just a printf, I can see that without problems and the app of course exits immediately as it should. However, if I add an SDL init function, it doesn't even print the printf which is above it...
Here's my build log:
**** Rebuild of configuration Simulator-Debug for project SameGooSDL **** **** Internal Builder is used for build **** qcc -o src\main.o ..\src\main.c -V4.4.2,gcc_ntox86 -w1 -IC:/Program2/bbndk-2.0.0-beta3/target/qnx6/usr/include/freetype2 -IC:/Program2/bbndk-2.0.0-beta3/target/qnx6/../tar get-override/usr/include -IC:\Users\Harteex\Documents\bbndk2-workspace\SDL1 2\include -D_FORTIFY_SOURCE=2 -c -O0 -g -fstack-protector-all qcc -o SameGooSDL src\main.o -lbps -lscreen -lm -lpng -lasound -lSDL12 -lTouchControlOverlay -lxml2 -lGLESv2 -V4.4.2,gcc_ntox86 -w1 -g -Wl,-z,relro -Wl,-z,now -LC:/Program2/bbndk-2.0.0-beta3/target/qnx6/../tar get-override/x86/lib -LC:/Program2/bbndk-2.0.0-beta3/target/qnx6/../tar get-override/x86/usr/lib -LC:\Users\Harteex\Documents\bbndk2-workspace\SDL1 2\Simulator -LC:\Users\Harteex\Documents\bbndk2-workspace\Touc hControlOverlay\Simulator Build complete for project SameGooSDL Time consumed: 310 ms.
Does anyone know how I can get an app with SDL running?
Alternatively, does anyone have an empty SDL project for the NDK 2 (Momentics IDE) that I could try?
Solved! Go to Solution.
02-17-2012 04:37 PM
Hello Harteex,
Have you considered giving it a try at our port of SDL and TCO at github?
https://github.com/blackberry/SDL
https://github.com/blackberry/TouchControlOverlay
02-19-2012 06:34 PM
I am using that SDL port and TCO already. They seem to compile fine.
The problem is I'm having trouble creating a working project which is based on those two.
I would love to see a project pre-configured which I could import and run, to see what I'm doing wrong.
02-22-2012 11:33 AM
Thanks Harteex. That is definitely a good idea; I'll reach our folks on github and see if we can expedite one to simplify the process.
Feel free to contact me via PM anytime if you need a close follow-up.
02-22-2012 03:15 PM
Harteex,
Here you go! The team that did the port of SDL (they were very helpful) jumped in and we could together put a quick SDL-contained zipped project for you.
I tested it on both the hardware and simulator in my lab and runs well. Let me know if you have any issue.
02-22-2012 06:08 PM
It works, thanks!
Only one issue I had to fix, the include paths in the project points to an absolute position in C:\cygwin with your nick in the path, so I had to change that first.
It's probably a good idea to put this at your SDL github repository, or on the samples pages for the native SDK so others also can get started more easily.
02-23-2012 11:59 AM
You're welcome, I'm glad it helped. I didn't clean it up much, but I really didn't want to let you stuck with this. In the near future some more polished will be available at github.
Good luck on your project!
02-29-2012 12:56 PM
I'd also like to thank you for the SDL port and skeletion program, that helped setup a lot.
I'm having trouble on the simulator now, the sample runs in 640x480 but it I try to change that to native resolution on the PlayBook of 1024x600 the screen setup fails.
I can find 640x480, 800x600 and 1024x600 in the video driver for the playbook and it should work but I can't seem to get it to work except at the lowest. What am I doing wrong?