How to share code between projects in Momentics?

bridged with qnx.development_tools
Post Reply
Dirk Gently

How to share code between projects in Momentics?

Post by Dirk Gently » Thu Sep 02, 2004 11:00 am

Hello,

Using the Momentics 2.0 IDE, I've created multiple QNX C++ application
projects. Each is it's own subdirectory, each has its own main(). I want to
cshare code modules between the projects but I can't determine how to do
this. Under the project properties I click Project References and I put a
check mark next to the other project that I want to refer to. However when I
call a function that's defined in another project I get an unresolved symbol
error from the linker when I build the project. This is driving me nuts! Can
anyone help?

Thanks,

Bill
Cincinnati, OH USA

Chris Herborth

Re: How to share code between projects in Momentics?

Post by Chris Herborth » Thu Sep 02, 2004 2:41 pm

Dirk Gently wrote:
Using the Momentics 2.0 IDE, I've created multiple QNX C++ application
projects. Each is it's own subdirectory, each has its own main(). I want to
cshare code modules between the projects but I can't determine how to do
this. Under the project properties I click Project References and I put a
check mark next to the other project that I want to refer to. However when I
call a function that's defined in another project I get an unresolved symbol
error from the linker when I build the project. This is driving me nuts! Can
anyone help?
If I'm understanding your problem correctly, this (new! untested! let me
know if it works or if you have any problems! :-) section from the IDE
User's Guide might help you:

Linked resources

As an alternative to dragging-and-dropping, you can link files and
folders into a project. This lets you include files in your project,
even if they need to reside in a specific place on your filesystem
(because of a restrictive source control system, for example).

To add a linked resource to a project in the C/C++ Project or Navigator
view:

1. Right-click on a project, then choose File or Folder from the New
menu.

The New File or New Folder dialog appears.
2. Click the Advanced >> button, and check the Link to file in the
file system or Link to folder in the file system check box.
3. Enter the full path to the file or folder, or click the Browse...
button to select a file or folder.
4. Click Finish to link the file or folder into your project.

See Concepts-->Workbench-->Linked resources in the Workbench User Guide
for more information about linked resources.

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

Werner Benz

Re: How to share code between projects in Momentics?

Post by Werner Benz » Thu Sep 02, 2004 4:28 pm

Fine, that's what I'm looking for a long time but, and also the question to
that has not been answered in this ng before. I did not find any information
to this in the IDE User's Guide, but now with your hint in the Workbench
User Guide, which I did not browse through before.
I am working with Momentics 2.2.0, is this feature now tested and stable?
Regards, Werner

"Chris Herborth" <cherborth@qnx.com> schrieb im Newsbeitrag
news:ch7be2$l4$1@inn.qnx.com...
Dirk Gently wrote:
Using the Momentics 2.0 IDE, I've created multiple QNX C++
application
projects. Each is it's own subdirectory, each has its own main(). I want
to
cshare code modules between the projects but I can't determine how to do
this. Under the project properties I click Project References and I put
a
check mark next to the other project that I want to refer to. However
when I
call a function that's defined in another project I get an unresolved
symbol
error from the linker when I build the project. This is driving me nuts!
Can
anyone help?

If I'm understanding your problem correctly, this (new! untested! let me
know if it works or if you have any problems! :-) section from the IDE
User's Guide might help you:

Linked resources

As an alternative to dragging-and-dropping, you can link files and
folders into a project. This lets you include files in your project,
even if they need to reside in a specific place on your filesystem
(because of a restrictive source control system, for example).

To add a linked resource to a project in the C/C++ Project or Navigator
view:

1. Right-click on a project, then choose File or Folder from the New
menu.

The New File or New Folder dialog appears.
2. Click the Advanced >> button, and check the Link to file in the
file system or Link to folder in the file system check box.
3. Enter the full path to the file or folder, or click the Browse...
button to select a file or folder.
4. Click Finish to link the file or folder into your project.

See Concepts-->Workbench-->Linked resources in the Workbench User Guide
for more information about linked resources.

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

Chris Herborth

Re: How to share code between projects in Momentics?

Post by Chris Herborth » Thu Sep 02, 2004 5:22 pm

Werner Benz wrote:
Fine, that's what I'm looking for a long time but, and also the question to
that has not been answered in this ng before. I did not find any information
to this in the IDE User's Guide, but now with your hint in the Workbench
User Guide, which I did not browse through before.
I am working with Momentics 2.2.0, is this feature now tested and stable?
The feature is, but the documentation isn't... doc updates will be part
of an upcoming QNX 6 and Momentics service pack.

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

Dirk Gently

Re: How to share code between projects in Momentics?

Post by Dirk Gently » Mon Sep 06, 2004 9:25 pm

Man this is frustrating....

No, it didn't work. When I Right-Click on the project and bring up the New
File dialog, there's no Advanced button. I have 6.2.1.B according to the CD
and when I click help/about from Momentics it says Version : 2.0. I have no
idea how to upgrade either of these products form the web site because my
QNX license certificate does not have the Serial Number password
combinations that the web site calls for. I have created an account on the
web site using the online serial number and online password but apparantly
that's not enough to obtain updates. Shouldn't bug fixes be gratis? I spec'd
QNX for this project and I'm seruously starting to regret it. It was much
easier to get things done back when I used QNX 2 on my 8086 ... Arrrgh.


"Chris Herborth" <cherborth@qnx.com> wrote in message
news:ch7be2$l4$1@inn.qnx.com...
Dirk Gently wrote:
Using the Momentics 2.0 IDE, I've created multiple QNX C++
application
projects. Each is it's own subdirectory, each has its own main(). I want
to
cshare code modules between the projects but I can't determine how to do
this. Under the project properties I click Project References and I put
a
check mark next to the other project that I want to refer to. However
when I
call a function that's defined in another project I get an unresolved
symbol
error from the linker when I build the project. This is driving me nuts!
Can
anyone help?

If I'm understanding your problem correctly, this (new! untested! let me
know if it works or if you have any problems! :-) section from the IDE
User's Guide might help you:

Linked resources

As an alternative to dragging-and-dropping, you can link files and
folders into a project. This lets you include files in your project,
even if they need to reside in a specific place on your filesystem
(because of a restrictive source control system, for example).

To add a linked resource to a project in the C/C++ Project or Navigator
view:

1. Right-click on a project, then choose File or Folder from the New
menu.

The New File or New Folder dialog appears.
2. Click the Advanced >> button, and check the Link to file in the
file system or Link to folder in the file system check box.
3. Enter the full path to the file or folder, or click the Browse...
button to select a file or folder.
4. Click Finish to link the file or folder into your project.

See Concepts-->Workbench-->Linked resources in the Workbench User Guide
for more information about linked resources.

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

Aleksei Timofeyev

Re: How to share code between projects in Momentics?

Post by Aleksei Timofeyev » Tue Sep 28, 2004 8:30 am

You can try this:
1. Make new project and move all your modules you wanna share.
2. Open project properties window of your main() projects, select "QNX C/C++
Project" and go to "Compiler" tab. Then select "Extra sources paths" in
"Category" and click "Project button", then select project with shared code.


"Dirk Gently" <phony@email.com> ÓÏÏÂÝÉÌ/ÓÏÏÂÝÉÌÁ × ÎÏ×ÏÓÔÑÈ ÓÌÅÄÕÀÝÅÅ:
news:ch6rot$kao$1@inn.qnx.com...
Hello,

Using the Momentics 2.0 IDE, I've created multiple QNX C++
application
projects. Each is it's own subdirectory, each has its own main(). I want
to
cshare code modules between the projects but I can't determine how to do
this. Under the project properties I click Project References and I put a
check mark next to the other project that I want to refer to. However when
I
call a function that's defined in another project I get an unresolved
symbol
error from the linker when I build the project. This is driving me nuts!
Can
anyone help?

Thanks,

Bill
Cincinnati, OH USA


Jamie

Re: How to share code between projects in Momentics?

Post by Jamie » Wed Mar 30, 2005 4:39 pm

Hello Dirk,

Were you able to get this issue resolved? If not please let me know.

Regards,

-Jamie


"Dirk Gently" <phony@email.com> wrote in message
news:chikc8$el2$1@inn.qnx.com...
Man this is frustrating....

No, it didn't work. When I Right-Click on the project and bring up the New
File dialog, there's no Advanced button. I have 6.2.1.B according to the
CD
and when I click help/about from Momentics it says Version : 2.0. I have
no
idea how to upgrade either of these products form the web site because my
QNX license certificate does not have the Serial Number password
combinations that the web site calls for. I have created an account on the
web site using the online serial number and online password but apparantly
that's not enough to obtain updates. Shouldn't bug fixes be gratis? I
spec'd
QNX for this project and I'm seruously starting to regret it. It was much
easier to get things done back when I used QNX 2 on my 8086 ... Arrrgh.


"Chris Herborth" <cherborth@qnx.com> wrote in message
news:ch7be2$l4$1@inn.qnx.com...
Dirk Gently wrote:
Using the Momentics 2.0 IDE, I've created multiple QNX C++
application
projects. Each is it's own subdirectory, each has its own main(). I
want
to
cshare code modules between the projects but I can't determine how to
do
this. Under the project properties I click Project References and I put
a
check mark next to the other project that I want to refer to. However
when I
call a function that's defined in another project I get an unresolved
symbol
error from the linker when I build the project. This is driving me
nuts!
Can
anyone help?

If I'm understanding your problem correctly, this (new! untested! let me
know if it works or if you have any problems! :-) section from the IDE
User's Guide might help you:

Linked resources

As an alternative to dragging-and-dropping, you can link files and
folders into a project. This lets you include files in your project,
even if they need to reside in a specific place on your filesystem
(because of a restrictive source control system, for example).

To add a linked resource to a project in the C/C++ Project or Navigator
view:

1. Right-click on a project, then choose File or Folder from the New
menu.

The New File or New Folder dialog appears.
2. Click the Advanced >> button, and check the Link to file in the
file system or Link to folder in the file system check box.
3. Enter the full path to the file or folder, or click the Browse...
button to select a file or folder.
4. Click Finish to link the file or folder into your project.

See Concepts-->Workbench-->Linked resources in the Workbench User Guide
for more information about linked resources.

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

Post Reply

Return to “qnx.development_tools”