Discussion Board

Results 1 to 5 of 5
  1. #1
    Regular Contributor Fillinger's Avatar
    Join Date
    Dec 2009
    Posts
    71
    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 kamalakshan's Avatar
    Join Date
    Jun 2007
    Location
    Mumbai, India
    Posts
    1,998
    Check this link

  3. #3
    Regular Contributor Fillinger's Avatar
    Join Date
    Dec 2009
    Posts
    71
    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
    Nokia Developer Moderator gnuton's Avatar
    Join Date
    Mar 2009
    Posts
    1,024
    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 Fillinger's Avatar
    Join Date
    Dec 2009
    Posts
    71
    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 Python
    Replies: 1
    Last Post: 2010-04-05, 17:00
  3. Condition compilation
    By leejx in forum Symbian C++
    Replies: 1
    Last Post: 2008-12-24, 09:55
  4. Simulating No memory condition
    By karanala in forum Symbian C++
    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
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved