Application in Library project in IDE

Hello,

I have another potential gripe about the IDE. It appears to be impossible to
have an application in a library project, or vice-versa.

All my library projects contain at least 1 test program, which allows me to
actually run and test the library without going through another project. The
QNX C/C++ Project, though, does not seem to be flexible enough to allow
this.

Am I wrong?

(using 6.2.1B IDE)

Robert.

Robert Muil <r.muil@crcmining.com.au> wrote:

Hello,

I have another potential gripe about the IDE. It appears to be impossible to
have an application in a library project, or vice-versa.

All my library projects contain at least 1 test program, which allows me to
actually run and test the library without going through another project. The
QNX C/C++ Project, though, does not seem to be flexible enough to allow
this.

I think, in theory, there is probably some way to do this.

In practice, it gets pretty messy.

Am I wrong?

Not really.

The QNX C/C++ project structure has some inherent assumpts – one of the
big ones is that a project builds ONE thing, though in multiple variants.
That one thing could be a program, or a library, and it could build the
program for 3 different processors, or the library in both a shared object
and static form – but the same program or libray in all those.

I generally use Standard Make projects, and write my own makefiles, cause
then I can build whatever I want, with whatever structure I want.

-David

David Gibbs
QNX Training Services
dagibbs@qnx.com

I generally use Standard Make projects, and write my own makefiles,
cause then I can build whatever I want, with whatever structure I
want.

Oh, ok. Even with 6.3.0? I will do that also then.

Robert Muil wrote:

I have another potential gripe about the IDE. It appears to be impossible to
have an application in a library project, or vice-versa.

All my library projects contain at least 1 test program, which allows me to
actually run and test the library without going through another project. The
QNX C/C++ Project, though, does not seem to be flexible enough to allow
this.

Am I wrong?

(using 6.2.1B IDE)

The way Eclipse handles this is to have “working sets” (click the
down-arrow icon in the Navigator or C/C++ Projects view, click “Select
Working Set…”). You’d create a working set of the library project, and
the test program project.

The project for your test program could just use linked resources into
the library’s directory.

I’m not sure this is possible using the QNX C/C++ Projects though; I
think those pick up source files automatically, so they’ll attempt to
include the test program unless it lives in a separate directory.


Chris Herborth (cherborth@qnx.com)
Never send a monster to do the work of an evil scientist.

The way Eclipse handles this is to have “working sets” (click the
down-arrow icon in the Navigator or C/C++ Projects view, click “Select
Working Set…”). You’d create a working set of the library project,
and the test program project.
The project for your test program could just use linked resources into
the library’s directory.

That’s not appropriate in my case. The test program is in the project, which
is a single CVS module. It would be ridiculous to create separate projects
and CVS modules for every test program for a library. The test program I’m
talking about is usually a single diminutive 200 line c file.

I’m not sure this is possible using the QNX C/C++ Projects though; I
think those pick up source files automatically, so they’ll attempt to
include the test program unless it lives in a separate directory.

Robert Muil wrote:

The way Eclipse handles this is to have “working sets” (click the
down-arrow icon in the Navigator or C/C++ Projects view, click “Select
Working Set…”). You’d create a working set of the library project,
and the test program project.
The project for your test program could just use linked resources into
the library’s directory.

That’s not appropriate in my case. The test program is in the project, which
is a single CVS module. It would be ridiculous to create separate projects
and CVS modules for every test program for a library. The test program I’m
talking about is usually a single diminutive 200 line c file.

Yes, this is one of the annoying features of Eclipse (and pretty much
every other IDE I’ve used)… you have to adapt your development system
to them instead of the other way around.

Of course, you could always use a Standard C/C++ Make Project instead,
and craft your own Makefile that could also build the test program.


Chris Herborth (cherborth@qnx.com)
Never send a monster to do the work of an evil scientist.