Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Oct 2004

    Multiple platforms in Carbide Express C++

    Hi all,

    I wonder if and how people are solving the problem of compiling for multiple platforms in Carbide C++? That is, when there is a common code base.

    Lets say I want to write an app which runs on S60v2.6, S60v3.0, UIQv2.1 and UIQv3.0. In this case there will be alot of common code, Symbian OS level common code, S60 common code etc so of course I would only want to maintain it in one location but in Carbide, project directories are tightly coupled to project definitions so it doesn't seem easy at all to have two projects pointing to the same source as you would naturally

    I solved the problem by having one project for each platform and in each project I define linked folders which point to the common codebase. I think define the linked folders as source folders as needed. It would be really nice to be able to define them as include folders as well!! but unfortunately that has to be done tediously.

    Would love to hear if anyone has solved this more elegantly. If anyone wants a more detailed description of my solution, let me know. Maybe I'm missing something obvious.


  2. #2
    Registered User
    Join Date
    Nov 2004

    Question Re: Multiple platforms in Carbide Express C++


    I would like to reactivate this thread. Do you have any experiences what is the best way to support S60 1st, 2nd and 3rd edition in one single code tree with Carbide 1.2? In addition different builds for phones with different display resolutions would be useful. Especially if you need different resources like images or sounds for different builds. How can you manage this in Carbide? What is the best structure for bld.inf, mmp files and makefiles. The SDK expamples are not very helpful.


  3. #3
    Regular Contributor
    Join Date
    Jan 2004
    Braunschweig, Germany

    Re: Multiple platforms in Carbide C++

    Hi !

    Carbide wants to have th project files in the directory which contains all the sources needed for the project. Carbide usually suggest a good default for this directory during import. The big problem is that this directory can only contain one project. This is a limitation which is inherited from the Eclipse environment and there is currently no way around it. It was said that this will change in a future version of Eclipse and hopefully with Carbide 1.3 as well.

    To support multiple platforms with one Carbide project, you can use #ifdef structures in your bld.inf and mmp files. The problem with this approach is that you have to find some existing defines to distinguish between different platforms and that the Carbide editors for mmp and bld.inf files becomes somewhat useless. It will be very difficult to do build variants with this approach like a landscape and a potrait version for S60 3rd edition.

    The second option is to ignore the suggestion where to put the project files and use a subdirectory in the project instead. This allows you to create multiple Carbide projects in one source tree for different platforms and for build variants. The problem with this solution is that you can only see your files in the Symbian Project Navigator (SPN). There you can see the mmp files and all the files which are included by the mmp files. The other navigator windows only show the contents of the project directory which is quite useless in this setup. For project with more that a handful of files it is not so easy to navigate in the project because the SPN shows the files in a flat structure. There are also some improvements planned for 1.3 to support groups in the SPN view.

    If someone has some better suggestions how to handle this problem, I'd be glad to hear them.

    Best regards,

  4. #4
    Regular Contributor
    Join Date
    Sep 2004

    Re: Multiple platforms in Carbide Express C++

    Any news about this topic?
    How to handle multiple platforms (multiple group-folders, each one with it's bld.inf) ?

  5. #5
    Registered User
    Join Date
    Mar 2003

    Re: Multiple platforms in Carbide Express C++

    It looks like the macro UIQ_UMTS_AVAILABLE is *the* macro that can distinguish UIQ 3.x from S60. The macro is defined in \epoc32\variant\uiq_3.x.hrh.

    Symbian uses the epoc32\tools\variants and epoc32\include\variants folder to store the defines that are available at the bld.inf/project.mmp level. For instance, the EKA2 macro is defined there, which makes it possible for bld.inf to use the EKA2 macro. Also see >> Symbian OS Tools And Utilities » Build tools guide » Build-time variants in the SDK docs.

    This means that it is possible to use a single source tree and a single Carbide c++ project to build both UIQ 3.x and S60 3rd ed versions of the same code, even when UIQ 3.x and S60 3rd ed builds differ a bit. Think of UIQ 3.x needing a recognizer to start a server on autoboot, while S60 3rd ed can use a resource file. Think of building UIQ 3.x and S60 3rd ed -specific ECOM plugins. Think of creating UIQ 3.x and S60 3rd-ed specific implementation of an abstract interface, if ECOM is overkill for your needs.

    Back to the macro, the way to use it is in the bld.inf file

    // UIQ_UMTS_AVAILABLE is defined in UIQ 3.x and not in S60

    // UIQ 3.x specific build

    // S60 3rd ed specific build


    You can then use your own MACRO's in the MMP files to distinguish between UIQ 3.x and S60, use different libraries etc. You build for UIQ 3.x by setting a UIQ 3.x SDK as the active build configuration and you build for S60 by setting a S60 SDK as the active build configuration.
    Sander van der Wal

Similar Threads

  1. Build hangs in Carbide c++ Express
    By towebi in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 15
    Last Post: 2007-08-06, 15:10
  2. Build error on carbide c++ express
    By yuichi.sakamaki in forum Symbian Tools & SDKs
    Replies: 2
    Last Post: 2007-06-25, 12:39
  3. Debugging Symbian S60 with Carbide C++ Express and NCF 1.2 Bluetooth
    By jimgilmour1 in forum Bluetooth Technology
    Replies: 4
    Last Post: 2006-09-05, 19:30
  4. Telling the EXACT version of Carbide Express
    By jasoneverson in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 1
    Last Post: 2006-05-03, 07:05
  5. Carbide express N-gage support
    By carnivash in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 7
    Last Post: 2006-04-08, 02:56

Posting Permissions

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