Mike Lorenz
|
Re: Include existing source tree into QNX C++ Project in Momentics v4.7.0, Linux
|
Mike Lorenz
02/20/2013 10:39 AM
post99380
|
Re: Include existing source tree into QNX C++ Project in Momentics v4.7.0, Linux
Hi!
Maybe I have one possible sollution for you.
If you have used makefiles in your project your want to import, you can do :
1. set the workspace-directory of momentics on directory 1 level below all of your source code
2. create a new common C or C++ Project (not QNX-C Project) for each makefile. Chose "Empty Makefile Project" and "QNX
Toolchain" . Name the project like the subdirectory where the makefile and sources lies (ignore the warning of existing
directory)
3. create your own make targets e.g. "all" , "clean" etc. in the ShowView "Make Targets"
4. maybe you have to change/configure your makefile e.g. CC=qcc -lang-c ...
Example:
workspace dir : "xxxsrc"
xxxsrc/p1/makefile and sources for binary1 or objects -> new C-Project named p1
xxxsrc/p2/makefile and sources for binary2 or objects -> new C-Project named p2
... etc.
you can choose different workspaces too
there is also another possible sollution importing or linking your files from somewhere (Import... - General - File
System ...) after creating a new "C Project" in a totally different workspace.
|
|
|
Julien Lemaitre
|
Re: Include existing source tree into QNX C++ Project in Momentics v4.7.0, Linux
|
Julien Lemaitre
07/12/2013 7:31 PM
post103163
|
Re: Include existing source tree into QNX C++ Project in Momentics v4.7.0, Linux
Hi,
I ran into the exact same problem described by the OP.
After importing, the tree structure in a QNX C/C++ Project, I had to manually add each sub-folder ONE BY ONE to the
project's "Extra Source Path" list. Eventually, Momentics consented taking my files into account for the build. FYI,
this option is located in:
Project's preferences -> QNX C/C++ Project -> Compiler -> Category: Extra Source Path -> Add from: Project -> <select
your folders>
Why do I have to tell the IDE to take into account the file I just imported? What is the point of importing my tree
structure then?
Moreover, it seems that each sub-folder gets added to the include path, which I do NOT want.
Also, the solution presented by Mike Lorenz seems weird: What is the point of using an IDE with an import feature if I
have to hack the Makefiles?
Can Momentics import source files and also take them into account during the build in one operation?
Thanks and regards
Julien Lemaitre
|
|
|