Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Windows CLI for QNX app?

I have a library that I wish to create a simple CLI front end to do some testing on the library.  I dont want to create a whole GUI front end (plus the time to compile and deploy to a device), just a basic main(...) with stdout/stderr output to a terminal window (old school).  Is there any way to do that with QNX Momentics IDE on Windows?

 

I tried using Code::Blocks that has a GNU GCC compiler, but it does not support sys/mman.h.

 

Alternative suggestions welcomed too. 

 

Developer
Posts: 162
Registered: ‎01-11-2012
My Device: BlackBerry 9790, BlackBerry PlayBook 64Gb, BlackBerry 10 Dev Alpha
My Carrier: MTS

Re: Windows CLI for QNX app?

Hi jtegen,

If I understand you correctly, you can use printf()/fprintf(stderr, ...) or similar functions for output to an IDE terminal.
Respectfully,
Oleg

Developer, QNX RTOS, BlackBerry 10 and PlayBook
Follow me on Twitter (in Russian)
St.Petersburg BlackBerry Dev. Group
Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: Windows CLI for QNX app?

True, but I would like to do this on Windows so development is a lot faster. Worse case, I guess I can do a NDK app deployed to the simulator. Looking for quicker alternatives.
Developer
Posts: 1,280
Registered: ‎03-03-2011
My Device: Playbook, Z10, Q10, Z30 with Files & Folders and Orbit of course
My Carrier: Vodafone

Re: Windows CLI for QNX app?

Is it just for your own use? Then you could just start your "app" from the terminal in Momentics, writing to stdout/stderr...

Files & Folders, the unified file & cloud manager for PlayBook and BB10 with SkyDrive, SugarSync, Box, Dropbox, Google Drive, Google Docs. Free 3-day trial! - Jon Webb - Innovatology - Utrecht, Netherlands
Developer
Posts: 1,068
Registered: ‎11-24-2011
My Device: PlayBook
My Carrier: x

Re: Windows CLI for QNX app?

Do you mean creating pure MS Windows CLI app (that you can run from Start->Run...) using QNX Momentics IDE?

Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: Windows CLI for QNX app?

I've got it kind of working to just run the hello world app via the simulator. Slow, but it will allow me to debug and migrate the library to QNX. If there was a Windows Target in QNX, that would be perfect.
Developer
Posts: 1,068
Registered: ‎11-24-2011
My Device: PlayBook
My Carrier: x

Re: Windows CLI for QNX app?

Still a bit confused about what you are trying to achive and how that would help debugging but you know better for sure -) good luck!

Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: Windows CLI for QNX app?

I have a 3rd party C library that I am porting over to QNX. Wanted to create a command line app in QNX IDE that runs the library without any GUI on Windows without having to launch it on a simulator or a device. It outputs files that would be easier to access on Windows then trying to access them on the simulator or a device.
Developer
Posts: 1,068
Registered: ‎11-24-2011
My Device: PlayBook
My Carrier: x

Re: Windows CLI for QNX app?

How do you see a library compiled for QNX to be running (to be used by) on MS Windows? I am not sure it is theoretically possible...

Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: Windows CLI for QNX app?

Believe you are right. I was hoping that because it was a GNU C/C++ compiler that is a Windows target was available, it could at least run a command line executable w/o having to use Visual Studio or other GNU IDEs. If I find how to compile a LEX file, I am in pretty good shape.