Multi-OS project

Hi All,

We are developing an in-house C++ class wrapper library for OS functions such as
timers, threads etc, that will have Neutrino and Win32 implementations, and I’m
having problems understanding whether the QNX recursive makefiles can be used.
What I would like to have is a top level project directory that contains C++ and
header files that are common to both implementations, with QNX and Win
directories under it with the OS specific implementation files. So the QNX
version of the library would consist of files built from both the QNX directory
and the top level project directory.

Does anybody know whether this can be done using QNX’s standard makefiles, or am
I going to have to create my own? Or is there perhaps a better way of
structuring the directories that would make it easier under Momentics? It’s easy
for Windows using MS Visual Studio as I just have to include the files I want
into the project.

Thanks,
Steve

Steve Ford wrote:

Hi All,

We are developing an in-house C++ class wrapper library for OS functions
such as timers, threads etc, that will have Neutrino and Win32
implementations, and I’m having problems understanding whether the QNX
recursive makefiles can be used. What I would like to have is a top
level project directory that contains C++ and header files that are
common to both implementations, with QNX and Win directories under it
with the OS specific implementation files. So the QNX version of the
library would consist of files built from both the QNX directory and the
top level project directory.

The QNX recursive makefile structure is built specifically to work exactly like
you describe. While you won’t find the OS variant discussed to a great extent in
the docs, support for it is there.

Also, since Momentics uses gcc, and gcc can produce Win32 executables, it is
quite possible to produce both from within the the Momentics IDE.

It’s easy for Windows using MS Visual Studio as I just
have to include the files I want into the project.

If it is easier to produce both QNX and Win32 executables from Visual Studio,
then why don’t you just use Visual Studio ?

ps: I have just finished providing a C++ wrapper for threads, timers, etc. for a
Windows app that has been ported to QNX. I must say the interface had to be
dumbed down to support the archaic Windows concepts of threading, and especially
the brain dead synchronization primitives…

Rennie