Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2008-12

csvexporter

8 messages · 4 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

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.
So I have to do this:

  {$IFDEF WINDOWS}
  lazdbexport;
  {$ENDIF}
  {$IFDEF UNIX}
  fpcsvexport;
  {$ENDIF}

Is it ok?
Andrea

Reply by email

Andrea Mauri
to Mattias Gärtner

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/

Reply by email

Michael Van Canneyt
to Andrea Mauri
Andrea Mauri wrote 8 lines
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.

There are none ? There is no OS-dependent code in the exporters.

Anyway I used the csvexporter just a bit and it seems to work fine both on win and linux :).

This is strange, because the unit is called "fpcsvexport.pp" ?

Michael.

Reply by email

Vincent Snijders
to Andrea Mauri: I am developing a cross platform application. Yesterday I dropped a csvexporter on a form…
Andrea Mauri wrote 10 lines
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 :).

Do you use the same lazarus/fpc versions on both windows and linux?

Vincent

Reply by email

Andrea Mauri
to Michael Van Canneyt: There are none ? There is no OS-dependent code in the exporters. This is strange, because…

Michael Van Canneyt ha scritto:

Show quoted text 15 lines
On Tue, 16 Dec 2008, Andrea Mauri wrote: > 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. > There are none ? There is no OS-dependent code in the exporters.

I didn't explore the source code of the exporters, sorry.

Show quoted text 14 lines
> Anyway I used the csvexporter just a bit and it seems to work fine both > on win and linux :). > This is strange, because the unit is called "fpcsvexport.pp" ? Michael. _______________________________________________ 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/

Reply by email

Andrea Mauri
to Vincent Snijders: Do you use the same lazarus/fpc versions on both windows and linux? Vincent

Yes, fpc 2.2.2 and lazarus svn
andrea

Vincent Snijders ha scritto:

Show quoted text 22 lines
Andrea Mauri schreef: > 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 :). > Do you use the same lazarus/fpc versions on both windows and linux? Vincent _______________________________________________ Lazarus mailing list http://www.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email

Andrea Mauri
to Andrea Mauri

Dear all,
I have to correct my thread. I checked again both on win and on linux. Both under win and linux when I put a csvexporter on a form Lazarus adds lazdbexport unit in the uses clause of the project (lpr) and fpcsvexport in the uses clause of the form unit.
I misunderstood the lazarus behaviour because Lazarus failed to compile my project under linux saying that "Lazarus can't find unit lazdbexport used by...".
Now I added a new csvexporter to my form, I compiled my project and deleted the new csvexporter and compiled again, and it works. I am not able to understand exactly what is the problem I suppose it is related to something in the lpi file.
I am sorry for my mistake.
Andrea

Andrea Mauri ha scritto:

Show quoted text 37 lines
Yes, fpc 2.2.2 and lazarus svn andrea Vincent Snijders ha scritto: > Andrea Mauri schreef: > > >> 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 :). >> >> > Do you use the same lazarus/fpc versions on both windows and linux? > > Vincent > _______________________________________________ > Lazarus mailing list > > http://www.lazarus.freepascal.org/mailman/listinfo/lazarus > > > _______________________________________________ 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/

Reply by email