Application in Library project in IDE

bridged with qnx.development_tools
Post Reply
Robert Muil

Application in Library project in IDE

Post by Robert Muil » Thu Nov 25, 2004 6:30 am

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.

David Gibbs

Re: Application in Library project in IDE

Post by David Gibbs » Thu Nov 25, 2004 5:36 pm

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

Robert Muil

Re: Application in Library project in IDE

Post by Robert Muil » Fri Nov 26, 2004 5:06 am

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.

Chris Herborth

Re: Application in Library project in IDE

Post by Chris Herborth » Mon Nov 29, 2004 6:52 pm

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.

Robert Muil

Re: Application in Library project in IDE

Post by Robert Muil » Tue Nov 30, 2004 2:18 am

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.

Chris Herborth

Re: Application in Library project in IDE

Post by Chris Herborth » Tue Nov 30, 2004 6:16 pm

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.

Post Reply

Return to “qnx.development_tools”