Project Home
Project Home
Trackers
Trackers
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Building project in momentics: (15 Items)
   
Building project in momentics  
I have created QNX C project, I want to keep all the project files(.mk, Makefil, .cproject etc), output object files, 
final executables in different folders(one for each). Also I don't want any extra folders(like folder created for 'build
 variants'). I dont want to use the managed project as it requires us to write make file manually etc ...

Any guidlines ?
Re: Building project in momentics  
QNX C project uses recursive make infrastructure which relies on files being in certain places. If you don't like this 
structure use standard make project,
and you can do whatever you want.
Files .project, .cproject has to be always in the root of the project for any type of project, this is how project is 
identified in eclipse.
If you have standard make project you can put makefile in any other folder and change builder to call it from other 
location.
See http://community.qnx.com/sf/wiki/do/viewPage/projects.ide/wiki/ProjectsBuildAndIDE about how to setup projects

On 03/09/10 10:40 AM, Girisha SG wrote:
> I have created QNX C project, I want to keep all the project files(.mk, Makefil, .cproject etc), output object files, 
final executables in different folders(one for each). Also I don't want any extra folders(like folder created for 'build
 variants'). I dont want to use the managed project as it requires us to write make file manually etc ...
> 
> Any guidlines ?
> 
> 
> 
> _______________________________________________
> 
> General
> http://community.qnx.com/sf/go/post65898
> 
Re: Building project in momentics  
Thanks for your inputs.
I am not very familiar with writing the makefiles and hence wantd to avaois this option ! is there any other option in 
which makefile gets generated automatically but we can create rules to create folders in the required diretory structure
 and copy the compilation outputs to specific directories.

Also can you share the link for writing the make files for QNX C make file project.
Re: Building project in momentics  
Link http://www.qnx.com/developers/docs/6.4.1/neutrino/prog/make_convent.html

The link I send previous - the wiki about how to setup project in IDE contains overview of all the options, including 
ones that generate makefiles.
If you just want to copy generated outputs to other folder you can do it in QNX project too - there are POSTBUILD 
actions in the Linker tab (drop down).

On 06/09/10 04:30 AM, Girisha SG wrote:
> Thanks for your inputs.
> I am not very familiar with writing the makefiles and hence wantd to avaois this option ! is there any other option in
 which makefile gets generated automatically but we can create rules to create folders in the required diretory 
structure and copy the compilation outputs to specific directories.
> 
> Also can you share the link for writing the make files for QNX C make file project.
> 
> 
> 
> _______________________________________________
> 
> General
> http://community.qnx.com/sf/go/post66039
> 
Re: Building project in momentics  
Directory structure is already defined and same is being used with CCS and VC++ IDE's hence,
1. I want all the object files in /generated/Momentics/object
2. I want the libraries in /generated/Momentics/lib
3. I have the source files in /private/ and include files in /public/inc/*
4 . As we need to use the same project to run using CCS/VC/Momentics I expect any files/folders related to momentics to 
appear only in /generated/Momentics folder.
Re: Building project in momentics  
Try managed project. You can use eclipse links but in this case you cannot really build it using make, if you even want 
to build from command line
you would have to use eclipse headless build. I am not sure you can separate objects from libs right in the 
configuration though, you may have to do some post-actions for this. 
Makefile (for standard makefile project) should not a big deal though - this is very simple project layout.

This is approximate steps for manage project (I did not double checked it - some names/menu locations may be wrong)

For managed project, select New->C Project (or C++)
Select Empty Project, on the right select QNX toolchain. Finish.
In project create link folders to source, includes, and momentics outputs (New -> Folder -> Advanced...).
In project properties for C/C++ select configuration - for example x86-Release.
In project configuration remove src as source folder and add sources and includes.
In path and symbols add includes folder path.
In output folder add your output folder. Try to build.

On 07/09/10 08:25 AM, Girisha SG wrote:
> Directory structure is already defined and same is being used with CCS and VC++ IDE's hence,
> 1. I want all the object files in /generated/Momentics/object
> 2. I want the libraries in /generated/Momentics/lib
> 3. I have the source files in /private/ and include files in /public/inc/*
> 4 . As we need to use the same project to run using CCS/VC/Momentics I expect any files/folders related to momentics 
to appear only in /generated/Momentics folder.
> 
> 
> 
> _______________________________________________
> 
> General
> http://community.qnx.com/sf/go/post66104
> 
Re: Building project in momentics  
Thanks a lot
I will try writing make file as it seems to be the best approach !(As I might have to delete some of the folders, have 
to move some of the object and library files to different folders as a part of post processing step)
Where can I get what is -DVARIANT_le, -DVARIANT_v7 etc
why we have to pass -EL option to qcc compiler etc
Re: Building project in momentics  
If you use qcc with proper variant -D would be set automatically, don't know what is -EL.

On 07/09/10 09:06 AM, Girisha SG wrote:
> Thanks a lot
> I will try writing make file as it seems to be the best approach !(As I might have to delete some of the folders, have
 to move some of the object and library files to different folders as a part of post processing step)
> Where can I get what is -DVARIANT_le, -DVARIANT_v7 etc
> why we have to pass -EL option to qcc compiler etc
> 
> 
> 
> _______________________________________________
> 
> General
> http://community.qnx.com/sf/go/post66115
> 
Re: Building project in momentics  
On 10-09-07 09:10 AM, Elena Laskavaia wrote:
> If you use qcc with proper variant -D would be set automatically, don't know what is -EL.

-EL specifies little endian. -EB is for big endian.

Regards,

Ryan Mansfield
Re: Building project in momentics  
So it will be automatically too if you use qcc

On 07/09/10 09:12 AM, Ryan Mansfield wrote:
> On 10-09-07 09:10 AM, Elena Laskavaia wrote:
>> If you use qcc with proper variant -D would be set automatically, don't know what is -EL.
> 
> -EL specifies little endian. -EB is for big endian.
> 
> Regards,
> 
> Ryan Mansfield
> 
> 
> 
> _______________________________________________
> 
> General
> http://community.qnx.com/sf/go/post66118
> 
Re: Building project in momentics  
what does -DVARIANT_le, -DVARIANT_v7 & -g options to compiler and linker indicates(theses are after -EL option)

i.e
qcc -Vgcc_ntoarmv7 ..... -EL -DVARIANT_le -DVARIANT_v7 -DBUILDENV_qss

qcc -Vgcc_ntoarmv7 -Wl,--no-keep-memory   ..... -EL -g     
Re: Building project in momentics  
Also If I create makefile project will I be able to move .cproject & .project files too from the root of the directory ?
Re: Building project in momentics  
No. This is the definition of the project. If you create managed project you can keep it separate from the sources 
thought.
Technically same as makefile, you can just create a project for eclipse to see stuff, all files that you need does not 
have to be in this project.

On 07/09/10 09:23 AM, Girisha SG wrote:
> Also If I create makefile project will I be able to move .cproject & .project files too from the root of the directory ?
> 
> 
> 
> _______________________________________________
> 
> General
> http://community.qnx.com/sf/go/post66124
> 
Re: Building project in momentics  
I have created all three types of projects and I have observed
1. For the managed project it is creating a new folder Debug at the root and .cproject & .project at the root of the 
project.
2. For the normal QNX C project it creates .project, .cproject, MakeFile, and *.mk file at the root folder
3. Forthe make file project only .project & .cproject are at the root of the folder.
Re: Building project in momentics  
On 10-09-07 09:21 AM, Girisha SG wrote:
> what does -DVARIANT_le, -DVARIANT_v7&  -g options to compiler and linker indicates(theses are after -EL option)

-D options are defines for VARIANT_le and VARIANT_v7.
-g is for debugging.

All of these options include -EL are documented.

http://www.qnx.com/developers/docs/6.4.1/neutrino/utilities/q/qcc.html

Please read the documentation.

Regards,

Ryan Mansfield