×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Regular Contributor
    Join Date
    Dec 2009
    Posts
    71

    compilation condition

    Hi,

    I need some help to make condition of compilation.

    I have an application which I'm testing on the device and on simulator.

    I want to use some function if I use the device and others function if I use the simulator.

    I never do this before so I'm lost. I'm using QtCreator 1.3.85.
    For examples I want to do something like this :

    #ifndef SIMULATOR
    call simulator function
    else
    call device function
    #endif

    if someone can help me please.

  2. #2
    Registered User
    Join Date
    Jun 2007
    Location
    Mumbai, India
    Posts
    1,998

    Re: compilation condition

    Check this link

  3. #3
    Regular Contributor
    Join Date
    Dec 2009
    Posts
    71

    Re: compilation condition

    Thank you for the answer but I don't really understand where to put my condition.

    In the .pro file or in the makefile and where? And how the compiler will understand the condition.

    Tanks for answer.

  4. #4
    Super Contributor
    Join Date
    Mar 2009
    Posts
    1,024

    Re: compilation condition

    Quote Originally Posted by Fillinger View Post
    Thank you for the answer but I don't really understand where to put my condition.

    In the .pro file or in the makefile and where? And how the compiler will understand the condition.

    Tanks for answer.
    Makefile is generated from the project file by QMake.
    Then it's not wise to change it.
    You have to modify the project file. Take a look at http://doc.trolltech.com/4.6/qmake-tutorial.html for more info.

  5. #5
    Regular Contributor
    Join Date
    Dec 2009
    Posts
    71

    Re: compilation condition

    thanks gnuton, I will check your link. It will be helpful.

Similar Threads

  1. package() condition in PKG
    By juannoguera in forum Symbian Signed Support, Application Packaging and Distribution and Security
    Replies: 0
    Last Post: 2010-04-11, 11:27
  2. THREAD AND CONDITION
    By nicksca2002 in forum Symbian
    Replies: 1
    Last Post: 2010-04-05, 17:00
  3. Condition compilation
    By leejx in forum Symbian
    Replies: 1
    Last Post: 2008-12-24, 09:55
  4. Simulating No memory condition
    By karanala in forum Symbian
    Replies: 5
    Last Post: 2007-06-29, 06:32
  5. SQL with where condition
    By alwin2 in forum Symbian Tools & SDKs
    Replies: 4
    Last Post: 2005-01-22, 17:27

Posting Permissions

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