[Lazarus] Different packages for different usage

Graeme Geldenhuys mailinglists at geldenhuys.co.uk
Fri Jun 19 12:54:02 CEST 2015


On 2015-06-19 11:22, aradeonas wrote:
> About Compiler Defines,until now I couldn't make them work,I don't know
> why! can you show me an simple example?

Attached is an example which has common code (with IFDEF's), a console
Server app (non GUI), and a Client (gui) app.

Notes:
 - In both the Client and Server apps there is a IDE Macro in
   "Project Options / Compiler Options / Additions and Overrides" that
   defines the location of the common code. Change that to match your
   location. I normally set this to the root of my project directory.
 - In the Client app it defines a "ClientApp" compiler define in
   "Project Options / Compiler Options / Other". The server app doesn't
   have this, and that is what allows you to separate the dependencies
   in the common code.

No Lazarus Packages are used, other than the LCL.lpk for the client app.

Save the attachment and remove the extra extension '.RemoveMe', then
unpack as normal. The extra file extension is added to circumvent stupid
attachment rules in some email servers.

Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: exampl.tar.gz.RemoveMe
Type: application/octet-stream
Size: 2439 bytes
Desc: not available
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20150619/32b218e4/attachment-0003.obj>


More information about the Lazarus mailing list