Hello,
I have 3 projects which have some common files. These common files are in one folder. Where can I set the path to include these files when I 'make' the project?
I am using CodeWarrior.
Please advice.
Tejaswini
Hello,
I have 3 projects which have some common files. These common files are in one folder. Where can I set the path to include these files when I 'make' the project?
I am using CodeWarrior.
Please advice.
Tejaswini
In the .mmp, you can add a new USERINCLUDE line, and a new SOURCEPATH-SOURCE block.
For example:Code:... SOURCEPATH ..\src SOURCE a.cpp SOURCE b.cpp SOURCEPATH ..\..\common\src SOURCE common1.cpp USERINCLUDE ..\inc USERINCLUCE ..\..\common\inc ...
Is there a good (and by "good" I mean built-in, not hacktastic) way of managing Carbide.c++ projects so they can reference each other, auto-update exported headers and libs and be moved together (ala Visual Studio's "solution")?
I'm doing this using linked folders in Carbide.c++ but they are hard links to directories on the disk, so if you move (rename) the base folders all the links get broken :-(
Suggestion of Wizard_hu can be implemented in Carbide.c++ too since the 'update symbian mmp file' facility is made available in the version 1.1.Originally Posted by sysctl
Am not sure if you might call it 'good' or 'hacktastic'(and by "good" I mean built-in, not hacktastic)
cheers
Neil
- Neil R.Bhasme -
Twitter: @Symbian_Neil
Sorry I missed your post. And this won't work for me as I use Carbide itself for build (and it completely ignores the MMP file).
Carbide.c++ express v 1.1 is what I was refering toOriginally Posted by sysctl
- Neil R.Bhasme -
Twitter: @Symbian_Neil
Yes, but it doesn't use MMP file to build the project, and you suggest updating MMP file. Updating MMP would have no effect on build process.Originally Posted by Symbian_Neil
Do we have a working solution to this issue..?
Cheers
mayank
You can share header files by placing a relative directory entry in user include path in Carbide project properties (e.g. if you had something like ${ProjDirPath}\inc, you also add extra ${ProjDirPath}\..\proj2\inc). Which is still a rather bad solution (you need to do it for every build configuration), but a working one. No solution for sharing CPP files in Carbide 1.1. Either build from command line, or subscribe to Carbide 1.2 Beta, it supports MMP files.
Hi everybody!
Sharing CPP/C between multiple projects in Carbide 1.1 is possible.
Here's my solution:
Let's say we have 2 projects c:\workspace\proj1 and c:\workspace\proj2.
We have some cpp and h files we want to share between these projects, let's sey we put them in "c:\workspace\shared\inc" and "c:\workspace\shared\src".
To share all files from these 2 folders we have to make links to them.
To do this edit .project file and add following xml sections
[...]HTML Code:<linkedResources> [...] <link> <name>shared_inc</name> <type>2</type> <location>c:/workspace/shared/inc</location> </link> <link> <name>shared_src</name> <type>2</type> <location>c:/workspace/shared/src</location> </link> [...] </linkedResources>
(shared_inc and shared_src are any names you like)
Now you should see the folders in your project. To notify carbide that the folders are source folders edit .cdtproject file adding following lines:
The last thing is adding User Include Paths to shared_inc folder. You can do this from Carbide Properties: c/c++ Build -> System Options ->User Include Paths -> Add -> "c:\workspace\shared\inc".HTML Code:<item id="org.eclipse.cdt.core.pathentry"> [...] <pathentry kind="src" path="shared_inc"/> <pathentry kind="src" path="shared_src"/> [...] </item>
That's all. Now you can successfully compile your project with shared files
Cheers
Tums
Last edited by tums; 2007-04-12 at 10:26.
That is one way and the other way is :-
File->New->File->Advanced>> Check "Link to file in the file system" and create the link, so the file gets included as an external link and for the .h follow the steps as tums mentions and you are done..:-)
Cheers
mayank
This is looking promising!
Will this work for any file/folder location, or must the files be located in the workspace, or in another Carbide project ?
BR
Björn
It could be anywhere..for instance I link files like this which is platform independent..and doesnt really belong to any carbide project/workspace at all.
Cheers
mayank
P.S. I wanted to know though ..just like Windows Mobile can we specify the output directory as well with Carbide..for instance can i specify where the lib files should be placed..where the exe and stuff like that..for instance right now the lib files go to epoc32/release/armv5/urel by default for GCCE and winscw/udeb for Emulator builds?
Thank you so much for this information, I am sorry I cannot help you with your output problem. I can however report that
1. The <link> method worked in Carbide.c++ Express 1.0 also
2. However, only complete absolute paths seemed to work, not paths relative to the .project file location
3. And sadly, the project built ok, but couldn't be opened properly in the C/C++ Project Explorer in Carbide.c++. Clicking the '+' sign for the project accomplished nothing.
But I guess two steps forward and only one back counts as progress! :-)
Thanks again, Cheers!
/Björn
Last edited by scalado-bjorna; 2007-04-16 at 13:06.