×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Jan 2007
    Posts
    3

    Adding existing source files to a Carbide project without copying them

    How do I add an existing file to a carbide project without ending up with a duplicate file. I have a Symbian project in which I need to use a large section of shared code (The shared code mainly consists of utility classes that are shared across different projects on different Operating Systems)

    If I import the files (using file->import) I end up with duplicate files (the importer copies the files which is wrong as I end up with multiple copies of the shared code files which defeats the whole point of code sharing)

    If I create a link, the file appears in the project view but nowhere else (the mmp file is not told about it. And when I do tell the MMP file about it using carbide it gets the path completely wrong)

    This should be very simple but I have spent three hours on this.

    In visual Studio I would simply I would simply do "Add->Existing Item"

  2. #2
    Super Contributor
    Join Date
    Mar 2004
    Location
    Bangalore,India
    Posts
    2,146

    Re: Adding existing source files to a Carbide project without copying them

    Which version of Carbide are you using..?

    In 1.2 you can use the USERINCLUDE for .h files and SOURCEINCLUDE for .cpp files which u want to link from outside your project..what i mean is for instance if u want to share some files from a particular directory/path without copying/duplicating them..u can just specify the path of that directory in your mmp file.

    In 1.1 you can link files New->Other->General->File/Folder->Advanced(check the checkbox "link to file in file system") and then specify the filename..so the tool would create an external linkage to that file without copying it over to your project..

    hope that helps..

    cheers
    mayank

  3. #3
    Registered User
    Join Date
    Jan 2007
    Posts
    3

    Re: Adding existing source files to a Carbide project without copying them

    Mayank,

    Thanks that works. I saw the SOURCEPATH and SOURCE statements in the MMP file but I didn't realize that I was meant to edit it manually (especially since Carbide is making changes to it too. Carbide and me having responsibility for the same file makes me very nervous...)

    The remaining annoyance is that using SOURCEPATH does not make the files visible in the IDE (for that I still have to create the external linkage using Carbide 1.1 method but NOT allowing Carbide to add it to the MMP file because is gets the path wrong)

    Jani

  4. #4
    Super Contributor
    Join Date
    Mar 2004
    Location
    Bangalore,India
    Posts
    2,146

    Re: Adding existing source files to a Carbide project without copying them

    Well...u should import using bld.inf file after updating the mmp file..and when the ide asks u for the root directory..instead of going up to the group folder where your bld.inf file resides..give the root path..for instance c:\yourapp\somelib instead of c:\yourapp\somelib\symbian\group.

    Hope that helps..

    cheers
    mayank

Similar Threads

  1. carbide 1.2 indexer indexes the wrong files
    By alldiss in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 1
    Last Post: 2007-07-27, 19:33
  2. Adding new source files does not update make file.
    By akrapacs in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 0
    Last Post: 2006-12-02, 15:59
  3. Adding assembly (.s) source files
    By aehrath in forum Symbian Tools & SDKs
    Replies: 2
    Last Post: 2003-06-27, 23:05
  4. Adding assembly (.s) source files
    By aehrath in forum Symbian
    Replies: 0
    Last Post: 2003-06-24, 21:16

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •