Project Home
Project Home
Source Code
Source Code
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Issues with Momentics: QNX C/C++ Project, Shared Library project: (7 Items)
   
Issues with Momentics: QNX C/C++ Project, Shared Library project  
I just tried creating a shared .so project in Momentics v4.7.0 on Linux for the first time. The problem I have with it 
is c/cpp source files added to the project in usual Eclipse way [Project]->Import->General->FileSystem... get added to 
the project but are excluded from the build. If I add new source files to the same project through Project->New... (e.g.
 [Project]->New->Class) those get added and also compiled/linked into my .so. 

Can anyone please shed some light over it? Spent half a day on it and still can't find what could possibly be wrong... 

Thanks
Re: Issues with Momentics: QNX C/C++ Project, Shared Library project  
Just to clarify: the problem only shows with existing source files added to the project. New project files  created 
directly in Momentics work as expected...
Re: Issues with Momentics: QNX C/C++ Project, Shared Library project  
More on this. I just noticed if I simply drag a source cpp file from nautilus right into project tree in Momentics that 
works for existing files! The problem is my project has hundreds and hundreds of files all arranged into a nice and 
clean folder structure on a disk. So I though I can do the same thing I usually do in Eclipse in such situations. I just
 use [Project]->Import->General->FileSystem, point it to the directory I want to include, select subdirs/files I want to
 include into project, give it a local Project Browser path and thats it. The whole selected tree is included into my 
project preserving directory hierarchy.

I just tried, this method seems to still work in Momentics if I go with New -> Project -> C/C++ Project. 

However if I go with New -> QNX C++ Project this method doesn't work. The source tree gets included into project but 
excluded from the build.  I'm just getting

make[2]: Nothing to be done for `all'.   

Obviously I don't wont to drag almost half a thousand of C++ files manually from Nautilus. They will all end up on one 
level in Project Explorer in Momentics. There is no chance I can quickly find anything I want in there then. So I would 
like to preserve the original directory structure on disk in Project Explorer too. Just like I can do with C/C++ project
 ...        

Any ideas how to fix this?

Thanks.
Re: Issues with Momentics: QNX C/C++ Project, Shared Library project  
You have to include folders manually in the makefile. QNX project user recursive makefiles syntax. Check the docs about 
add source folders 
Re: Issues with Momentics: QNX C/C++ Project, Shared Library project  
Thanks Elena! Can you please throw the link to the right place in documentation? I seems can't locate anything relevant 
or looking in a wrong place.
Re: Issues with Momentics: QNX C/C++ Project, Shared Library project  
Re: Issues with Momentics: QNX C/C++ Project, Shared Library project  
Thank you Elena!