Recent

Author Topic: Global defines.  (Read 2615 times)

taazz

  • Hero Member
  • *****
  • Posts: 5368
Global defines.
« on: March 02, 2013, 08:18:45 am »
Where should I put my global defines?

I need to create 2 build modes 1 for debug and 1 for release actually I need 3 the last is for prerelease kind of release with debug info so I can debug any differences between optimizations.

Any ideas?
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Global defines.
« Reply #1 on: March 02, 2013, 09:26:44 am »
I'm sure you must know this answer, but...

Define 3 build modes in Lazarus project options.
For each mode in project options,other,custom options, define the relevant defines such as -dPRERELEASE -dWHATEVER -dSOMEMORE

... IIRC somebody also recently posted a method where you can use .inc files but you'd have to include these with all your source files.
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: Global defines.
« Reply #2 on: March 02, 2013, 09:39:49 am »
I have found the build modes screen and I was playing with it yes. I did know about the custom options part at all, thank you.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

 

TinyPortal © 2005-2018