×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Dec 2004
    Posts
    42

    problem with Carbide when use #ifdef

    Hi everybody,

    I used some set of constant to build my project.

    I declare these constant in common header file as follows

    file name : constant.h

    #define __BUILDDEBUG__
    // #define __BUILDRELEASE__


    I include this file in mmp and used it as follows

    I want to include my some header and source files depend up the macro enabled.

    #ifdef __BUILDDEBUG __
    USERINCLUDE ..\Common\DebugFiles
    #endif

    #ifdef __BUILDRELEASE __
    USERINCLUDE ..\Common\Partner\ReleaseFiles
    #endif


    It work fine in second edition and in 3rd edition using code worrier.

    But if I use carbide ( Dot Net IDE ) it gives error, cant found header files etc.

    Can you please help me to solve this problem ?

    Regards,
    Dip

  2. #2
    Super Contributor
    Join Date
    Sep 2004
    Posts
    1,048

    Re: problem with Carbide when use #ifdef

    If you use Carbide.vs then .mmp file preprocessing is not really supported (GCCE builds would follow the .mmp file but not WINSCW builds). The way to handle this in Carbide.vs is to use 2 different .mmp files and then change the active mmp file in the Carbide.vs properties.

  3. #3
    Registered User
    Join Date
    Dec 2004
    Posts
    42

    Re: problem with Carbide when use #ifdef

    Thank you very much for quick reply.

    I want to maintain application structure in same way as i did in second edition.

    I can't maintain separate mmp files for every directive constant .

    Is their any no more hopes to solve out this problem. Any Fix ?

    Can you please suggest me another solution or option ?

    Regards,
    Dip

  4. #4
    Super Contributor
    Join Date
    Sep 2004
    Posts
    1,048

    Re: problem with Carbide when use #ifdef

    Well, your example suggested that you wanted to maintain 2 different configs, one for debug and one for release which I think is reasonably well supported by having 2 different .mmp files, each with no IFDEF's inside. Note also that you need to disable automatic .mmp file update.

  5. #5
    Registered User
    Join Date
    Dec 2004
    Posts
    42

    Re: problem with Carbide when use #ifdef

    Yes you understand properly.

    Whatever i used constant above is just for examples purpose only.

    Actually i have number of clients for one application.

    The application user interface changed only depend up on client requirment and not application engine (contains exes, dlls etc).

    For application i have more than 10 client and i declared one new constant for new client.

    I have separated source and header and mmp files related to one client, so i dont have any problem.

    But i have lot of exe's which is common for all clients, but the constants which i declared in Constant.h is common again in all exes which located in client name directories. e.g. common\XXX\Constant.h , common\XXX1\ Constant.h

    now whenever i have to work for client i just enabled that constant and all my exes take proper constant from mmp file as i set user include path.

    Maintaining separated mmp for every directive constant is really impossible for me.

    Can u suggest me anything different ?

  6. #6
    Super Contributor
    Join Date
    Sep 2004
    Posts
    1,048

    Re: problem with Carbide when use #ifdef

    Sorry, no, easily switching between .mmp and .pkg files was the main intended way to support multiple configurations for same product.

Similar Threads

  1. Problem with eglSwapBuffers and heap corruption
    By greatape in forum Symbian Media (Closed)
    Replies: 2
    Last Post: 2007-05-24, 03:35
  2. Carbide C++ Express Problem...
    By sujith in forum Symbian Tools & SDKs
    Replies: 14
    Last Post: 2006-11-30, 07:21
  3. Carbide and Nokia problem!!!
    By Magrip in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 2
    Last Post: 2006-08-19, 13:01
  4. Problem: S60 SDK for CW in PC with .NET
    By anttij in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 1
    Last Post: 2005-02-28, 11:36

Posting Permissions

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