I am developing a cross platform application.
Yesterday I dropped a csvexporter on a form (and I was under win). The lazdbexport unit have been added by the IDE.
Then today, working on my Ubuntu pc at home I tried to recompile the same project and I got an error (lazdbexport unit not found), so I opened an empty project and I dropped csvexporter on the form. The IDE added the fpccsvexport unit, so I introduced the IFDEFs. I supposed that the IFDEF were in the package.
Anyway I used the csvexporter just a bit and it seems to work fine both on win and linux :).
Regards,
Andrea
Mattias G?rtner ha scritto:
Show quoted text 40 lines
Zitat von Andrea Mauri :
> Dear all,
> when I put a csvexporter on a form lazarus automatically adds to my
> project lazdbexport unit if I am under windows and fpccsvexport if I am
> under Linux.
>
I didn't try cvsexporter myself.
Correct me if I'm wrong: When you drop a cvsexporter component onto a form, the
IDE adds a unit. And this unit is different on windows and linux?
If yes, then yes, you have to do the below.
> So I have to do this:
>
> {$IFDEF WINDOWS}
> lazdbexport;
> {$ENDIF}
> {$IFDEF UNIX}
> fpcsvexport;
> {$ENDIF}
>
> Is it ok?
>
... although IMO the package should be restructured, so that the IFDEFs go into
the package instead of to the using code.
Mattias
_______________________________________________
Lazarus mailing list
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Dr. Andrea Mauri, PhD
Milano Chemometrics and QSAR Research Group
Department of Environmental Sciences
University of Milano-Bicocca
P.zza della Scienza, 1
20126 Milano - Italy
Tel: ++39 02 64482801
mailto:
http://michem.disat.unimib.it/chm/