Project with more than one process

Wo can I have more then one process in a Project in the 6.2.1 IDE?
Can I do it with a QNX C project?
Or do I have to create a standard make C project?

Adding a second process in a QNX C project I got error message
multiple definition of `main’

Werner Schweizer

Werner Schweizer <nospamWrnr.Schwzr@ch.mullermartini.com> wrote:

Wo can I have more then one process in a Project in the 6.2.1 IDE?
Can I do it with a QNX C project?

No. Basically, the QNX C project structure assumes that you are
building one program per project.

Or do I have to create a standard make C project?

Yes.

Adding a second process in a QNX C project I got error message
multiple definition of `main’

It automatically binds all .c files into the same executable, not
what you want.

-David

QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.

Thanks
Werner

“David Gibbs” <dagibbs@qnx.com> schrieb im Newsbeitrag
news:b8re0i$b6f$1@nntp.qnx.com

Werner Schweizer <> nospamWrnr.Schwzr@ch.mullermartini.com> > wrote:
Wo can I have more then one process in a Project in the 6.2.1 IDE?
Can I do it with a QNX C project?

No. Basically, the QNX C project structure assumes that you are
building one program per project.

Or do I have to create a standard make C project?

Yes.

Adding a second process in a QNX C project I got error message
multiple definition of `main’

It automatically binds all .c files into the same executable, not
what you want.

-David

QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.

“David Gibbs” <dagibbs@qnx.com> wrote in message
news:b8re0i$b6f$1@nntp.qnx.com

Werner Schweizer <> nospamWrnr.Schwzr@ch.mullermartini.com> > wrote:
Wo can I have more then one process in a Project in the 6.2.1 IDE?
Can I do it with a QNX C project?

No. Basically, the QNX C project structure assumes that you are
building one program per project.

David:

I disagree. As I noted in my 4/22/03 query, “Launch AppBuilder from IDE
when PhAB app is not at the project level?”, I have QNX projects (software
components) that include more than one process (program). I use the slick
QNX recurse.mk facilities, except that I put a common.mk file in the
directory for each program, not at the project level. (The common.mk file
at the project level becomes basically useless with this scheme.) For
example:

MyProject/
___ .project {has a “cnature”, “ccnature”, “qnxnature”, “phabnature”}
___ common.mk {not used}
___ Makefile {include recurse.mk}
___ Program1/ {C or C++ app}
_____ common.mk {options for Program1}
_____ Makefile {include recurse.mk}
_____ x86/
_______ Makefile {include recurse.mk}
_______ o/
__________ Makefile {include …/…/common.mk}
_______ o-g/
__________ Makefile {include …/…/common.mk}
___ Program2/ {PhAB app}
_____ common.mk {options for Program2}
_____ Makefile {include recurse.mk}
_____ src/
_____ wgt/
_____ x86/
_______ Makefile {include recurse.mk}
_______ o/
__________ Makefile {include …/…/common.mk}
_______ o-g/
__________ Makefile {include …/…/common.mk}

This builds all the programs. The question I asked was basically this: Is
there any way to launch AppBuilder for Program2 from within the IDE? When I
open AppBuilder for MyProject in the IDE (even with Program2 selected),
AppBuilder does not see a PhAB app so it wants to create a new one. I must
run AppBuilder externally to open Program2. I would rather do everything
from the IDE, and I do not want to create one project per program because
that is not the way our components are structured.

->>>–Sherwood–>

Dale Sherwood @NYAB <dsherwoo@nyab.com> wrote:

“David Gibbs” <> dagibbs@qnx.com> > wrote in message
news:b8re0i$b6f$> 1@nntp.qnx.com> …
Werner Schweizer <> nospamWrnr.Schwzr@ch.mullermartini.com> > wrote:
Wo can I have more then one process in a Project in the 6.2.1 IDE?
Can I do it with a QNX C project?

No. Basically, the QNX C project structure assumes that you are
building one program per project.

David:

I disagree. As I noted in my 4/22/03 query, “Launch AppBuilder from IDE
when PhAB app is not at the project level?”, I have QNX projects (software
components) that include more than one process (program). I use the slick
QNX recurse.mk facilities, except that I put a common.mk file in the
directory for each program, not at the project level. (The common.mk file
at the project level becomes basically useless with this scheme.) For
example:

I see…you subvert things in a different manner.

That is a neat trick – though, again, it isn’t really what is
“expected” in a QNX C project.

MyProject/
___ .project {has a “cnature”, “ccnature”, “qnxnature”, “phabnature”}
___ common.mk {not used}
___ Makefile {include recurse.mk}
___ Program1/ {C or C++ app}
_____ common.mk {options for Program1}
_____ Makefile {include recurse.mk}
_____ x86/
_______ Makefile {include recurse.mk}
_______ o/
__________ Makefile {include …/…/common.mk}
_______ o-g/
__________ Makefile {include …/…/common.mk}
___ Program2/ {PhAB app}
_____ common.mk {options for Program2}
_____ Makefile {include recurse.mk}
_____ src/
_____ wgt/
_____ x86/
_______ Makefile {include recurse.mk}
_______ o/
__________ Makefile {include …/…/common.mk}
_______ o-g/
__________ Makefile {include …/…/common.mk}

This builds all the programs. The question I asked was basically this: Is
there any way to launch AppBuilder for Program2 from within the IDE? When I
open AppBuilder for MyProject in the IDE (even with Program2 selected),
AppBuilder does not see a PhAB app so it wants to create a new one. I must
run AppBuilder externally to open Program2. I would rather do everything
from the IDE, and I do not want to create one project per program because
that is not the way our components are structured.

I don’t know enough about the interactions with Phabb to comment. Sorry.

QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.

On Fri, 2 May 2003 20:12:20 -0500, “Dale Sherwood @NYAB” <dsherwoo@nyab.com> wrote:

“David Gibbs” <> dagibbs@qnx.com> > wrote in message
news:b8re0i$b6f$> 1@nntp.qnx.com> …
Werner Schweizer <> nospamWrnr.Schwzr@ch.mullermartini.com> > wrote:
Wo can I have more then one process in a Project in the 6.2.1 IDE?
Can I do it with a QNX C project?

No. Basically, the QNX C project structure assumes that you are
building one program per project.

David:

I disagree. As I noted in my 4/22/03 query, “Launch AppBuilder from IDE
when PhAB app is not at the project level?”, I have QNX projects (software
components) that include more than one process (program). I use the slick
QNX recurse.mk facilities, except that I put a common.mk file in the
directory for each program, not at the project level. (The common.mk file
at the project level becomes basically useless with this scheme.) For
example:

MyProject/
___ .project {has a “cnature”, “ccnature”, “qnxnature”, “phabnature”}
___ common.mk {not used}
___ Makefile {include recurse.mk}
___ Program1/ {C or C++ app}
_____ common.mk {options for Program1}
_____ Makefile {include recurse.mk}
_____ x86/
_______ Makefile {include recurse.mk}
_______ o/
__________ Makefile {include …/…/common.mk}
_______ o-g/
__________ Makefile {include …/…/common.mk}
___ Program2/ {PhAB app}
_____ common.mk {options for Program2}
_____ Makefile {include recurse.mk}
_____ src/
_____ wgt/
_____ x86/
_______ Makefile {include recurse.mk}
_______ o/
__________ Makefile {include …/…/common.mk}
_______ o-g/
__________ Makefile {include …/…/common.mk}

This builds all the programs. The question I asked was basically this: Is
there any way to launch AppBuilder for Program2 from within the IDE? When I
open AppBuilder for MyProject in the IDE (even with Program2 selected),
AppBuilder does not see a PhAB app so it wants to create a new one. I must
run AppBuilder externally to open Program2. I would rather do everything
from the IDE, and I do not want to create one project per program because
that is not the way our components are structured.

This is neat! Had the same problem where there are about 20 or so process
in a customer’s old 6.1 project to be migrated to Eclipse.
IMO Eclipse will have to be extended to allow for multiple processes
to be supported. Esp the launch capability will have to allow for >1
executable to be selected, and other tools/plugins should be

1 process aware.

I suppose you could try to swap the order of projects around.
However, it seems that the Appbuilder has been changed to detect
that a project originated in the IDE, and will not allow you to
start it up on that project outside of the IDE…

Or you could start a PhAB project, and then adapt it for
the 2nd program.

----SNIP—

This is neat! Had the same problem where there are about 20 or so process
in a customer’s old 6.1 project to be migrated to Eclipse.
IMO Eclipse will have to be extended to allow for multiple processes
to be supported. Esp the launch capability will have to allow for >1
executable to be selected, and other tools/plugins should be
1 process aware.

I suppose you could try to swap the order of projects around.
However, it seems that the Appbuilder has been changed to detect
that a project originated in the IDE, and will not allow you to
start it up on that project outside of the IDE…

Or you could start a PhAB project, and then adapt it for
the 2nd program.

I second that.
For me a QNX project consist of a group of loosely coupled processes.
Each of this processes is useless for it alone.
So it will be better to organise all dependant processes in a singel
project.

Werner Schweizer

I see…you subvert things in a different manner.

That is a neat trick – though, again, it isn’t really what is
“expected” in a QNX C project.

The Momentics PE 6.2.1 help appendix, “Conventions for Makefiles and
Directories,” documents a “section level” directory of the source tree, so I
simply used it for Program1, Program2, Library1, etc. That appendix also
contains the following curious sentence that I am still trying to exploit:
“Note that you can add as many levels as you want above the levels described
here [i.e., above the project level] – these levels would reflect your
product.” Therefore, I was surprised at how little support there is for
creating and maintaining projects containing these additional directory
levels. For example, it would be useful to be able to add (embed) a
“project” (QNX C/C++, PhAB, etc.) in a project at any directory level, not
just at the top level.

->>>–Sherwood–>

This is neat! Had the same problem where there are about 20 or so process
in a customer’s old 6.1 project to be migrated to Eclipse.
IMO Eclipse will have to be extended to allow for multiple processes
to be supported. Esp the launch capability will have to allow for >1
executable to be selected, and other tools/plugins should be
1 process aware.

IMO that would be great.

I suppose you could try to swap the order of projects around.
However, it seems that the Appbuilder has been changed to detect
that a project originated in the IDE, and will not allow you to
start it up on that project outside of the IDE…

This will likely be a problem in my “subverted” project structure since I
can run AppBuilder only for a single-process project. Furthermore, if the
project originated outside the IDE–e.g., for QNX4/Photon1–AppBuilder
(launched externally) does not appear to support the Momentics multiplatform
source tree–e.g., it uses the ‘Program2/src/default’ directory instead of
‘Program2/x86/o’.

Or you could start a PhAB project, and then adapt it for
the 2nd program.

I currently use the “trick” of generating a “template” project, then
coping/moving it to where I need it (e.g., MyProject/Program2). This saves
me the effort of trying to create the files manually. But the lack of
AppBuilder support for this structure remains one of my biggest challenges
in porting our components to Momentics.

->>>–Sherwood–>