Re: [Lazarus] multiple versions and portable lazarus

2011-06-01 Thread Graeme Geldenhuys
On 31/05/2011 22:23, Roberto Padovani wrote:

 
 Good new, I only have to work around the fact that I cannot access svn
 from work.

Then try the git mirrors. They can be access via the 'git' or 'https'
protocols. No sane firewall setup blocks the latter.



Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Looking for vectors library

2011-06-01 Thread Mattias Gaertner
On Tue, 31 May 2011 22:41:32 -0300
Leonardo M. Ramé l.r...@griensu.com wrote:

 Hi, I'm looking for a vector library that should be able to:
 
 1 - Draw over TCustomCanvas descendants.
 2 - Draw at least lines, circles and text.
 3 - Map world coordinates to screen.
 4 - Let me define a viewport on world then draw it to canvas.
 5 - Zoom in/out.
 6 - It must work in x86-64, i386, Win/Linux.
 7 - Open Source.
 
 Does anyone kowns if such library exists?.
 
 P.S.:
 
 I gave a try to AggPas, but it seems to work only on i386.

Big parts of the code were already updated for 64bit. You may want to
give it a try to test and update the rest.

Mattias
 

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] English lazarus book available.

2011-06-01 Thread Graeme Geldenhuys
On 31/05/2011 21:10, Hans-Peter Diettrich wrote:
 
 I don't see such costs.

Time is money.


 I don't  see a need  for publishers  nowadays, when everything  can be
 done

Well  if you  want a  professional and  high quality  book that  is well
designed and laid out etc., then a publishers help is invaluable.

I have  seem many self published  ebooks that just look  crap; have no
logical order  etc. Professionalism comes with experience  - which these
self publishers will probably not have.

I see  nothing wrong with  authors releasing additional  information and
books  about projects  like Lazarus  or  FPC. Just look  at the  volumes
already written about  C/C++, C#, Java etc... It's time  FPC and Lazarus
joins that list.

Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] multiple versions and portable lazarus

2011-06-01 Thread Vincent Snijders
2011/6/1 Graeme Geldenhuys graemeg.li...@gmail.com:
 On 31/05/2011 22:23, Roberto Padovani wrote:


 Good new, I only have to work around the fact that I cannot access svn
 from work.

 Then try the git mirrors. They can be access via the 'git' or 'https'
 protocols. No sane firewall setup blocks the latter.

If https works, try:
https://lazarus.svn.sourceforge.net/svnroot/lazarus/trunk/

If you don't have a svn client at work, you can download a source snapshot from:
http://www.hu.freepascal.org/lazarus/
or
ftp://ftp.hu.freepascal.org/pub/lazarus/snapshots/

Vincent

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Looking for vectors library

2011-06-01 Thread Alexander Klenin
On Wed, Jun 1, 2011 at 02:29, Mattias Gaertner
nc-gaert...@netcologne.de wrote:
 Hi, I'm looking for a vector library that should be able to:

 1 - Draw over TCustomCanvas descendants.
 2 - Draw at least lines, circles and text.
 3 - Map world coordinates to screen.
 4 - Let me define a viewport on world then draw it to canvas.
 5 - Zoom in/out.
 6 - It must work in x86-64, i386, Win/Linux.
 7 - Open Source.

 Does anyone kowns if such library exists?.

 P.S.:

 I gave a try to AggPas, but it seems to work only on i386.

 Big parts of the code were already updated for 64bit. You may want to
 give it a try to test and update the rest.

As far as I know, AggPas is a raster-based library,
so maybe you want to try fpvectorial (note that it is very
new, so you should use the version from CCR, not the one
that comes with FPC).

-- 
Alexander S. Klenin

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Using Visual C++ .libs?

2011-06-01 Thread Felipe Monteiro de Carvalho
On Tue, May 31, 2011 at 6:18 PM, Prado, Renato (R.P.) rpr...@visteon.comwrote:

 Long question: how? :-P


Does the library export classes or only procedures?

-- 
Felipe Monteiro de Carvalho
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Looking for vectors library

2011-06-01 Thread Graeme Geldenhuys
On 01/06/2011 08:59, Alexander Klenin wrote:
 
 As far as I know, AggPas is a raster-based library,


Correct, but AggPas has support for SVG too. SVG being vector based
images. See the AggPas demos for more info. I don't know if that has
been ported to LCL's aggpas code though - probably is.


Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] English lazarus book available.

2011-06-01 Thread michael . vancanneyt



On Tue, 31 May 2011, Hans-Peter Diettrich wrote:


michael.vancann...@wisa.be schrieb:

The main argument contra - as I recall it - was that PDFs can be 
illegally

copied, and this was used to wipe away all the possible advantages.


That's true only for people that make their living from writing and 
selling books. When a program/project is available for free, why shouldn't 
the documentation come for free as well? There is no real need that the 
book writers should earn money, while the coders should not.


Publishing a book costs money. Be it in PDF or printed.


I don't see such costs. Webspace is needed for the documentation as well as 
for the project itself, and an advertisement can be put into the project's 
homepage.


Selling copies is more complicated, but not a real cost factor.


You obviously don't have a clue about how to create and sell quality books.
Actually selling copies is the biggest cost.

Here are some of the costs involved:
* Professional translation of a book costs 17 EUR/Page in western europe.
  There are nearly 800 pages, go count what it would cost.
  (Luckily, in the case of the Lazarus book, some of the authors translated
   their own text - for free)
* Translation must be checked, because technical publications use very
  specific terms. 
* Professional layout and editing of a book costs up to a month of work of a

  skilled person. Cover design takes work and takes money.
* Printing (depending on the volume) costs anywhere between 6-12 EUR/book.
* The books must be transported to a storage facility.
* The distributor takes half the price of the selling price of the book (or 
more).

And I'm probably forgetting some...

You see that I didn't include any author's fee yet. After all the above
costs, not much is left. The author gets the smallest part of the book's
price.

You can of course cut some corners, but then you'll end up with the kind
of pulp that Lulu sells: printing on demand. Low quality paper, bad binding,
bad resolution print, no layout, no editing whatever.

Yes, you even don't have some of the above costs with PDF (as you propose). 
But then, all you have in the end is just a PDF.


One can of course ask whether all this is worth it for a technical publication. 
A rightful question. The answer is a very personal decision, and that is the 
risk the editor takes when (s)he decides to publish a book: it may or may 
not sell. The costs remain the same.


Just to show that there is more than meets the eye in publishing a book...

Michael.

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] multiple versions and portable lazarus

2011-06-01 Thread Marco van de Voort
On Tue, May 31, 2011 at 11:37:35PM +0200, Mattias Gaertner wrote:
  Lazarus overrides that by generating and passing an own fpc.cfg. Not unlike
  Delphi with dcc32.cfg btw. The info for that comes from Lazarus' own
  configuration.
 
 Lazarus does not generate a fpc.cfg. In fact it uses the values given
 by the compiler, so Lazarus uses the standard fpc.cfg too.

Then I'm slightly surprised that the stick edition worked. It could be that
the app simply overwrites the fpc.cfg on startup, and Detlev already solved
that.

(it doesn't seem to use environment variables, a nicer choice, since that
would allow a batchfile to fix that)

Grr, I really need to create a new batchfile for the portable version.

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] multiple versions and portable lazarus

2011-06-01 Thread Marco van de Voort
On Tue, May 31, 2011 at 11:37:35PM +0200, Mattias Gaertner wrote:
  I do agree that installers should ask if the old config should be reused.
  They seem to be versioned, so that should be possible.
 
 The version is for the format. The IDE upgrades automatically old
 configs. But it does not automatically change paths.
 The problem is that some 0.9.30 installers install Lazarus and/or FPC to
 another directory than the 0.9.28 installers, but do not adapt the
 paths in the configs.
 Therefore 0.9.31 now checks a few more things and
 shows a setup dialog.

Good. It bit me several times that I put a lazarus on some machine that had
Lazarus before, and it would refuse to start (since the version the config
was from had packages installed that were not installed in the new version,
don't exist anymore, or were 3rd party)
 

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Looking for vectors library

2011-06-01 Thread Felipe Monteiro de Carvalho
On Wed, Jun 1, 2011 at 3:41 AM, Leonardo M. Ramé l.r...@griensu.com wrote:

 Hi, I'm looking for a vector library that should be able to:

 1 - Draw over TCustomCanvas descendants.
 2 - Draw at least lines, circles and text.
 3 - Map world coordinates to screen.
 4 - Let me define a viewport on world then draw it to canvas.
 5 - Zoom in/out.
 6 - It must work in x86-64, i386, Win/Linux.
 7 - Open Source.


fpvectorial does all of that:

http://wiki.lazarus.freepascal.org/fpvectorial

-- 
Felipe Monteiro de Carvalho
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Looking for vectors library

2011-06-01 Thread Felipe Monteiro de Carvalho
On Wed, Jun 1, 2011 at 9:14 AM, Graeme Geldenhuys
graemeg.li...@gmail.comwrote:

 Correct, but AggPas has support for SVG too. SVG being vector based
 images. See the AggPas demos for more info. I don't know if that has
 been ported to LCL's aggpas code though - probably is.


I don't know AggPas, but simply being able to import from SVG is not really
the same as being a vector graphics library.

-- 
Felipe Monteiro de Carvalho
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Compiling lazarus in ubuntu

2011-06-01 Thread Max Vlasov
On Wed, Jun 1, 2011 at 2:00 AM, Henry Vermaak henry.verm...@gmail.comwrote:

 2011/5/31 Max Vlasov max.vla...@gmail.com:
 
  As Henry suggested I probably should do make install, I will try
 tomorrow,

 It's the custom on linux to install the stuff that you build from
 source into /usr/local/.  The debs will install into /usr, so you will
 have to doctor your fpc.cfg, which will point to /usr by default.  You
 can, however, use the INSTALL_PREFIX variable on the make command line
 to change the default install prefix.


Thanks, Henry, I did as you suggested and everything worked fine. Now when
I'm a little more familiar with how it's all working on linux I understand
that actually http://wiki.lazarus.freepascal.org and mail-list search
results contains all necessary information (so I probably could not bother
you and others), just that if I did this without your help I had to collect
pieces from different places.

Max
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Using Visual C++ .libs?

2011-06-01 Thread Massimo Soricetti
Il 31/05/2011 16:27, Prado, Renato (R.P.) ha scritto:
 Quick question: is it possible to use a .lib to be used with Visual C++?
 I only have the .h and the .lib (commercial library).

C++ does not have a binary standard, so I guess your library is a simple
C library.

Is it clearly possible to compile a C++ library, but that lib could be
linked only with obj files compiled with the particular compiler (name
and version) used for building the lib. So, since you say it's a
commercial product, I doubt they had locked themselves to a single
compiler (and a specific version of it, moreover).



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Looking for vectors library

2011-06-01 Thread Marc Weustink

Alexander Klenin wrote:

On Wed, Jun 1, 2011 at 02:29, Mattias Gaertner
nc-gaert...@netcologne.de  wrote:

Hi, I'm looking for a vector library that should be able to:

1 - Draw over TCustomCanvas descendants.
2 - Draw at least lines, circles and text.
3 - Map world coordinates to screen.
4 - Let me define a viewport on world then draw it to canvas.
5 - Zoom in/out.
6 - It must work in x86-64, i386, Win/Linux.
7 - Open Source.

Does anyone kowns if such library exists?.

P.S.:

I gave a try to AggPas, but it seems to work only on i386.


Big parts of the code were already updated for 64bit. You may want to
give it a try to test and update the rest.


As far as I know, AggPas is a raster-based library,
so maybe you want to try fpvectorial (note that it is very
new, so you should use the version from CCR, not the one
that comes with FPC).



AGG is vector based, the moment you want to draw the vectors it is 
rasterized :)


Marc


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] English lazarus book available.

2011-06-01 Thread Hans-Peter Diettrich

michael.vancann...@wisa.be schrieb:


Publishing a book costs money. Be it in PDF or printed.


I don't see such costs. Webspace is needed for the documentation as 
well as for the project itself, and an advertisement can be put into 
the project's homepage.


Selling copies is more complicated, but not a real cost factor.


You obviously don't have a clue about how to create and sell quality books.
Actually selling copies is the biggest cost.


Sorry for my inprecise formulation. I meant selling in contrast to 
giving away for free, and copies only instead of downloads.



Here are some of the costs involved:

[...]

You see that I didn't include any author's fee yet. After all the above
costs, not much is left. The author gets the smallest part of the book's
price.


ACK :-(

I'd assign most of the work to the authors, because structuring 
*technical* content and translations IMO can not be done by somebody 
else, regardless of according skills. In detail translations should be 
done by the community, where native speakers also are familiar with the 
technical details of the text. The community also can contribute to the 
structure of a book, because the users (readers) often have needs or 
expectations *different* from the insiders view on the topics.


Yes, you even don't have some of the above costs with PDF (as you 
propose). But then, all you have in the end is just a PDF.


PDF was not my idea, and in that particular format I miss means for 
updates or personal notes or extensions. Wiki format lacks any 
structure, what makes it very hard to find or collect specific 
documentation in dedicated places. I'd be happier with HTML, where it's 
easier to update and reorganize the entire book, but this again 
doesn't allow for book-style sequential reading. Dunno about eBook 
features at all.


One can of course ask whether all this is worth it for a technical 
publication. A rightful question. The answer is a very personal 
decision, and that is the risk the editor takes when (s)he decides to 
publish a book: it may or may not sell. The costs remain the same.


That's the difference between commercial and free projects/products: A 
commercial application only sells with adequate documentation, not for 
its outstanding technical features. It also sells only when it's easy to 
install and configure. This is what not only I miss with FPC and Lazarus.


DoDi


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Compiling lazarus in ubuntu

2011-06-01 Thread Rafael Tuim Elias
A few days ago I had the same problem. I solved remaking the FPC.CFG file
with /usr/bin/fpcmkcfg, and change this line in the new fpc.cfg file:

-Fu~/fpc/packages/base/*/units/;~/fpc/fcl/units/;~fpc/rtl/units/

to this

-Fu /usr/lib/fpc/2.5.1/units/*

I dont know if it's correct, but worked.

I'm using FPC 2.5.1 and Lazarus 0.9.31 30371 on Ubuntu 11.04.

-- 
___

* **Rafael Tuim Elias*
lazarus-cgi.co.cc
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] English lazarus book available.

2011-06-01 Thread Lukasz Sokol
On 01/06/2011 11:44, Hans-Peter Diettrich wrote:

 I'd assign most of the work to the authors, because structuring
 *technical* content and translations IMO can not be done by somebody
 else, regardless of according skills. In detail translations should
 be done by the community, where native speakers also are familiar
 with the technical details of the text. The community also can
 contribute to the structure of a book, because the users (readers)
 often have needs or expectations *different* from the insiders view
 on the topics.

The editors may actually come (and probably, most of the time they do) with 
better ideas w/r/t layout and proofread even if they only collaborate with the
actual authors, so that the book looks consistent...
And these people do know something, they've read it all ;P and know 
that book layout and look count no less than actual content...
I think with something as large as this book is, involving different
authors and aimed at large audience (large in means of starting level
as well as size) you can't possibly cut editors out... 
(I've read a Delphi book in the time of Delphi 7 'Holy Book', there is
no way one man can do that in reasonable time...)

(I am 95% decided to buy it!)
L.


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Compiling lazarus in ubuntu

2011-06-01 Thread Mattias Gaertner




 Rafael Tuim Elias rafaeltuimel...@gmail.com hat am 1. Juni 2011 um 12:42
geschrieben:


 A fewdaysagoIhadthesameproblem. I solved remaking the FPC.CFG file with
 /usr/bin/fpcmkcfg, and change this line in the new fpc.cfg file:
 
  -Fu~/fpc/packages/base/*/units/;~/fpc/fcl/units/;~fpc/rtl/units/
 
These are the sources. It's a bad idea to add source directories to the fpc.cfg,
because they can create conflicts.
 
 


  to this
 
  -Fu /usr/lib/fpc/2.5.1/units/*
 
Yes, this is the normal way.
 


 
  I dont know if it's correct, but worked.
 
  I'm using FPC 2.5.1 and Lazarus 0.9.31 30371 on Ubuntu 11.04.
 



 Mattias--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] English lazarus book available.

2011-06-01 Thread Graeme Geldenhuys
On 01/06/2011 12:44, Hans-Peter Diettrich wrote:
 I'd assign most of the work to the authors, because structuring 
 *technical* content and translations IMO can not be done by somebody 
 else, regardless of according skills.

Lukasz mentioned a very valid  point. If you have multiple authors, then
consistency across chapters are very  important to the book layout. That
includes  styling, screenshots,  code samples  etc... So somebody  would
have sit down and develop a chapter style template using OpenOffice or
LaTeX or whatever  the authors use. Once all chapters  are written, then
comes the book  layout, table of content, index etc...  by that time the
authors  of the  chapters are  probably  not interested  in that  boring
bit. All things that  a editor can do... Yes, with eBooks  there role is
becoming less important, but they are still needed to some degree.


 technical details of the text. The community also can contribute to the 
 structure of a book, because the users (readers) often have needs or 
 expectations *different* from the insiders view on the topics.

Then maybe the community must start creating a community driven Lazarus
book. Judging by how small the FPC or Lazarus community is, compared to
other Open Source projects  - I doubt that will ever  get off the ground
though.


 documentation in dedicated places. I'd be happier with HTML, where it's 
 easier to update and reorganize the entire book, but this again 
 doesn't allow for book-style sequential reading. Dunno about eBook 
 features at all.

I personally hate  HTML books. Rather give me a PDF,  EPUB, CHM or INF
book. For a community book I would  suggest writing it in some text file
format that allows for revision control, and then later the final output
can  be  generated from  that  book  source. Many such  formats  already
exist: DocBook, LaTeX, IPF, AsciiDoc etc..

Anyway, I wish the authors well  and hope their efforts with the Lazarus
book has  good returns. I sure hope  a digital version will  also become
available -  maybe the authors can  then get a larger  percentage of the
profits too.


Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] multiple versions and portable lazarus

2011-06-01 Thread Roberto Padovani
2011/6/1 Vincent Snijders vincent.snijd...@gmail.com:
 2011/6/1 Graeme Geldenhuys graemeg.li...@gmail.com:
 On 31/05/2011 22:23, Roberto Padovani wrote:


 Good new, I only have to work around the fact that I cannot access svn
 from work.

 Then try the git mirrors. They can be access via the 'git' or 'https'
 protocols. No sane firewall setup blocks the latter.

 If https works, try:
 https://lazarus.svn.sourceforge.net/svnroot/lazarus/trunk/

https works fine and I got a lazarus trunk.
But what is the https URL of the fpc sources?


 If you don't have a svn client at work, you can download a source snapshot 
 from:
 http://www.hu.freepascal.org/lazarus/
 or
 ftp://ftp.hu.freepascal.org/pub/lazarus/snapshots/

ftp does not work either.

Roberto

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] multiple versions and portable lazarus

2011-06-01 Thread Graeme Geldenhuys
On 01/06/2011 13:35, Roberto Padovani wrote:
 
 https works fine and I got a lazarus trunk.
 But what is the https URL of the fpc sources?


From the FPC website:

  svn checkout http://svn.freepascal.org/svn/fpc/trunk fpc


Yes it  isn't HTTPS, but  only HTTP. Though I  can't image that  HTTP is
blocked on a firewall either - after all, most admins think of that port
as the be-all, end-all of ports.


Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] multiple versions and portable lazarus

2011-06-01 Thread Vincent Snijders


 Yes it  isn't HTTPS, but  only HTTP. Though I  can't image that  HTTP is
 blocked on a firewall either - after all, most admins think of that port
 as the be-all, end-all of ports.

At our office, http is not blocked, but the transparent proxy is not
transparent enough to pass webdav requests uses by svn over http.

Vincent

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Using Visual C++ .libs?

2011-06-01 Thread Prado, Renato (R.P.)
 You'll have to implement an wrapper, that allows to access the objects
 and their methods by mere (non-OO) subroutines. That wrapper will have
 to be written in the language of the library (here: C++), so that it
can
 use the objects provided by the library, and can call their methods.
The
 headers of the wrapper have to be converted into a unit (library?),
for
 use from OPL code.
 
 DoDi
By wrapper you mean generating a unit translating the interface from the
.h right? After I got the unit, how can I link the .lib into my project?
I would not like to create a DLL in Visual C++ with the .lib inside just
to be able to use the .lib functions within Lazarus.

Thanks for the help.

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] multiple versions and portable lazarus

2011-06-01 Thread Graeme Geldenhuys
On 01/06/2011 14:00, Vincent Snijders wrote:
 
 At our office, http is not blocked, but the transparent proxy is not
 transparent enough to pass webdav requests uses by svn over http.

Ah  yes, I  forgot about  that. I  had the  same problem  with my  ISP's
transparent proxy a  few years back. I think back  then Michael helped
me, by letting the subversion server  listen to an alternative port, and
I believe that solved my problem back then. I can't remember the details
though.


Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Using Visual C++ .libs?

2011-06-01 Thread Prado, Renato (R.P.)
Only ANSI C functions, I guess this makes the effort quite easier due to
the absence of name mangling.

 



From: Felipe Monteiro de Carvalho
[mailto:felipemonteiro.carva...@gmail.com] 
Sent: Wednesday, June 01, 2011 4:08 AM
To: Lazarus mailing list
Subject: Re: [Lazarus] Using Visual C++ .libs?

 

On Tue, May 31, 2011 at 6:18 PM, Prado, Renato (R.P.)
rpr...@visteon.com wrote:

Long question: how? :-P


Does the library export classes or only procedures?

-- 
Felipe Monteiro de Carvalho

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Using Visual C++ .libs?

2011-06-01 Thread Prado, Renato (R.P.)
 Is it clearly possible to compile a C++ library, but that lib could be
 linked only with obj files compiled with the particular compiler (name
 and version) used for building the lib. So, since you say it's a
 commercial product, I doubt they had locked themselves to a single
 compiler (and a specific version of it, moreover).
The lib is quite simples (only C functions), in its documentation it
refers to Visual C++ as the supported compiler, alongside its
proprietary CVI (National Instruments)

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] multiple versions and portable lazarus

2011-06-01 Thread Roberto Padovani
2011/6/1 Graeme Geldenhuys graemeg.li...@gmail.com:
 On 01/06/2011 13:35, Roberto Padovani wrote:

 https works fine and I got a lazarus trunk.
 But what is the https URL of the fpc sources?


 From the FPC website:

  svn checkout http://svn.freepascal.org/svn/fpc/trunk fpc


 Yes it  isn't HTTPS, but  only HTTP. Though I  can't image that  HTTP is
 blocked on a firewall either - after all, most admins think of that port
 as the be-all, end-all of ports.


You can't imagine like our admins... try to imagine http being
blocked, because that's it.
SVN (and all the other git, mercurial, ...) work only through https.

[OT: begin]
As a bonus, our proxy runs a huge regular expression on the URLs to
filter out whatever seems to be suspect.
For example, the domain download.microsoft.com is filtered out, like
anything social network, image share network, needless to say any URL
that contains sexual content.
For example I cannot download
http://www.nirsoft.net/utils/resources_extract.html  because the zip
file has no underline, so that you get  resourceSEXtract.
The same is true for a URL that contained  DocumentsExplorer  
can you spot the sex in it ?? :-(
[end;]


 Regards,
  - Graeme -

 --
 fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
 http://fpgui.sourceforge.net/


 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] multiple versions and portable lazarus

2011-06-01 Thread Marcos Douglas
On Tue, May 31, 2011 at 5:23 PM, Roberto Padovani padovan...@gmail.com wrote:

 2011/5/31 Marcos Douglas m...@delfire.net:
  On Tue, May 31, 2011 at 4:34 PM, Roberto Padovani padovan...@gmail.com 
  wrote:
 
  [snip]
 
  Generally speaking, why do I have to _install_ (in the win32 sense)
  lazarus? Isn't it possible to have a portable installation?
  If I compile it from scratch, set a few environment options and
  register some extension, should it work?
  The same is true for FPC, can it be portable?
 
  Do you not need to install.
  I use the FPC/Lazarus in an external HD without problems, but you need
  to get FPC and Lazarus from SVN (or Git, if you prefer).
  I made this tutorial a few months ago, see:
  http://wiki.freepascal.org/Installing_Lazarus#Compiling.2Finstalling_FPC_and_Lazarus_from_Sources_of_SVN_.28Win32.29
 
  ...that is the tutorial I used to install FPC/Lazarus in 3 machines
  (home, work and external HD to use in any machine).
 

 Good new, I only have to work around the fact that I cannot access svn
 from work.

 thanks!

Do you have a pendriver? Get the sources in your home and copy to the pendriver.
I forgot to tell about parameters of Marco van de Voort said: -pcp and
--lazarus-dir. To use Lazarus in a pendriver, you need to study this
parameters, ok?

Marcos Douglas

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Compiling lazarus in ubuntu

2011-06-01 Thread Rafael Tuim Elias
  -Fu~/fpc/packages/base/*/units/;~/fpc/fcl/units/;~fpc/rtl/units/

These are the sources. It's a bad idea to add source directories to the
fpc.cfg,
because they can create conflicts.

  to this

  -Fu /usr/lib/fpc/2.5.1/units/*

Yes, this is the normal way.




  I dont know if it's correct, but worked.

  I'm using FPC 2.5.1 and Lazarus 0.9.31 30371 on Ubuntu 11.04.


when i remade the fpc.cfg with fpcmkcfg, this line
-Fu~/fpc/packages/base/*/units/;~/fpc/fcl/units/;~fpc/rtl/units/ been
generated automaticaly, but dont worked, to work correctly i needed to
change to  -Fu /usr/lib/fpc/2.5.1/units/*

sorry to my poor english

-- 
___

* **Rafael Tuim Elias*
lazarus-cgi.co.cc
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Looking for vectors library

2011-06-01 Thread Felipe Monteiro de Carvalho
On Wed, Jun 1, 2011 at 2:11 PM, Leonardo M. Ramé l.r...@griensu.com wrote:
 Felipe, I can't find the functions/methods to map world coordinates to
 screen

In fpvectorial all coordinates are in milimiters.

When rendering on Screen you can use the unit fpvtocanvas and this function:

procedure DrawFPVectorialToCanvas(ASource: TvVectorialDocument;
  {$ifdef USE_LCL_CANVAS}ADest: TCanvas;{$else}ADest: TFPCustomCanvas;{$endif}
  ADestX: Integer = 0; ADestY: Integer = 0; AMulX: Double = 1.0;
AMulY: Double = 1.0);

Which allows you to set a multiplier to be applied in the coordinates.
1.0 means that there is 1 pixel per milimiter. 2.0 means 2 pixels per
milimiter, etc.

This function also allows you to set where the drawing will be placed,
which is the viewport (ADestX, ADestY)

 nor to create a viewport on the drawing. Does fpVectorial
 includes that?.

What do you mean by create a viewport on the drawing?

In fpvectorial the drawing itself has no viewport, but you can set a
viewport for the whole drawing when rendering on screen, which is
(ADestX, ADestY)

--
Felipe Monteiro de Carvalho

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Using Visual C++ .libs?

2011-06-01 Thread Hans-Peter Diettrich

Prado, Renato (R.P.) schrieb:

You'll have to implement an wrapper, that allows to access the objects
and their methods by mere (non-OO) subroutines. That wrapper will have
to be written in the language of the library (here: C++), so that it

can

use the objects provided by the library, and can call their methods.

The

headers of the wrapper have to be converted into a unit (library?),

for

use from OPL code.

DoDi

By wrapper you mean generating a unit translating the interface from the
.h right?


A C++ library requires real code, that allows for communication with the 
C++ objects. But if the header files already contain a C style 
interface, no such wrapper code is required; in this case only a 
translation from .h into .pas is required.



After I got the unit, how can I link the .lib into my project?


I have no experience in mixing FPC and C/C++ code into one executable. 
Both languages come with their own RTL and other libraries, which can 
not always coexist (initialization issues...). When the linker does not 
reqest more C-specific modules than available with FPC, it might work.


The linker also must understand the object format of the compiled library.


I would not like to create a DLL in Visual C++ with the .lib inside just
to be able to use the .lib functions within Lazarus.


A DLL can be built with the Visual C++ linker, so that above issues go away.

DoDi


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Using Visual C++ .libs?

2011-06-01 Thread Prado, Renato (R.P.)
 A C++ library requires real code, that allows for communication with
the
 C++ objects. But if the header files already contain a C style
 interface, no such wrapper code is required; in this case only a
 translation from .h into .pas is required.
Yep, that is probably the case

 I have no experience in mixing FPC and C/C++ code into one executable.
 Both languages come with their own RTL and other libraries, which can
 not always coexist (initialization issues...). When the linker does
not
 reqest more C-specific modules than available with FPC, it might work.
That's the main point

 A DLL can be built with the Visual C++ linker, so that above issues go
 away.
I think that will be the plan then, thanks again

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Using Visual C++ .libs?

2011-06-01 Thread Felipe Monteiro de Carvalho
2011/6/1 Prado, Renato (R.P.) rpr...@visteon.com:
 Only ANSI C functions, I guess this makes the effort quite easier due to the
 absence of name mangling.

In this case you just need to translate the .h file. No intermediary
library and no C++ programming is required.

-- 
Felipe Monteiro de Carvalho

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Looking for vectors library

2011-06-01 Thread Leonardo M . Ramé
On 2011-06-01 14:38:34 +0200, Felipe Monteiro de Carvalho wrote:
 On Wed, Jun 1, 2011 at 2:11 PM, Leonardo M. Ramé l.r...@griensu.com wrote:
  Felipe, I can't find the functions/methods to map world coordinates to
  screen
 
 In fpvectorial all coordinates are in milimiters.
 
 When rendering on Screen you can use the unit fpvtocanvas and this function:
 
 procedure DrawFPVectorialToCanvas(ASource: TvVectorialDocument;
   {$ifdef USE_LCL_CANVAS}ADest: TCanvas;{$else}ADest: TFPCustomCanvas;{$endif}
   ADestX: Integer = 0; ADestY: Integer = 0; AMulX: Double = 1.0;
 AMulY: Double = 1.0);
 
 Which allows you to set a multiplier to be applied in the coordinates.
 1.0 means that there is 1 pixel per milimiter. 2.0 means 2 pixels per
 milimiter, etc.
 
 This function also allows you to set where the drawing will be placed,
 which is the viewport (ADestX, ADestY)
 
  nor to create a viewport on the drawing. Does fpVectorial
  includes that?.
 
 What do you mean by create a viewport on the drawing?
 
 In fpvectorial the drawing itself has no viewport, but you can set a
 viewport for the whole drawing when rendering on screen, which is
 (ADestX, ADestY)
 

To me a viewport is a window that let you see an area of the drawing, just
like any vector drawing app does.

I thing DrawFPVectorialToCanvas does what I want. Let me try to
understand what it does.

For example, you have drawing of 1000 x 1000 mm, but you want to show in
a canvas an area of 100 x 100 pixels, starting from the point 50, 50. To
do this, you have to call DrawFPVectorialToCanvas(source, dest, 50, 50);

To zoom in/out you have to change AMultX and AMultY.

Am I right?.

-- 
Leonardo M. Ramé
http://leonardorame.blogspot.com

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Looking for vectors library

2011-06-01 Thread Alexander Klenin
On Wed, Jun 1, 2011 at 04:43, Marc Weustink marc.weust...@cuperus.nl wrote:
 As far as I know, AggPas is a raster-based library,
 so maybe you want to try fpvectorial (note that it is very
 new, so you should use the version from CCR, not the one
 that comes with FPC).


 AGG is vector based, the moment you want to draw the vectors it is
 rasterized :)

That's interesting. Felipe, you might then consider expanding/fixing
AggPas instead of re-implementing it in fpvectorial.

-- 
Alexander S. Klenin

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Looking for vectors library

2011-06-01 Thread Felipe Monteiro de Carvalho
On Wed, Jun 1, 2011 at 3:45 PM, Alexander Klenin kle...@gmail.com wrote:
 That's interesting. Felipe, you might then consider expanding/fixing
 AggPas instead of re-implementing it in fpvectorial.

I took a quick look and AggPas is very different from fpvectorial.
fpvectorial is focused on modular support for readers / writers and on
having the hability to modify elements.

AggPas says that it is a vectorial library, but I couldn't find any
API in http://www.crossgl.com/aggpas/documentation/index.html to
modify already added elements, only to remove all. It seams that in
AggPas one will simply add all elements and then afterwards one can
render this finished image many times. It seams to be really focused
on drawing.

Of course I could have heavily modified AggPas instead of starting
fpvectorial, but if that would be an option something like 4 years ago
when I started fpvectorial, there is no chance of doing that now that
I have many apps that use it, published articles about it and even
clients.

Anyway both libraries are very different, so I don't see much
duplication here. In fact, AggPas could be added to fpvectorial as a
new Canvas outputter. This should make fpvectorial rendering much
better.

Does anyone know if AggPas is able to render only the visible
elements? (which means that in a drawing with 10.000 elements it will
save time by only drawing the 100 visible elements). Or if it is fast
enough to be used in the OnPaint event? That would be excelent, I
already wanted since some time of a better renderer for fpvectorial
and AggPas could be it.

-- 
Felipe Monteiro de Carvalho

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Looking for vectors library

2011-06-01 Thread Leonardo M . Ramé
On 2011-06-01 10:44:40 -0300, Leonardo M. Ramé wrote:
 On 2011-06-01 14:38:34 +0200, Felipe Monteiro de Carvalho wrote:
  On Wed, Jun 1, 2011 at 2:11 PM, Leonardo M. Ramé l.r...@griensu.com wrote:
   Felipe, I can't find the functions/methods to map world coordinates to
   screen
  
  In fpvectorial all coordinates are in milimiters.
  
  When rendering on Screen you can use the unit fpvtocanvas and this function:
  
  procedure DrawFPVectorialToCanvas(ASource: TvVectorialDocument;
{$ifdef USE_LCL_CANVAS}ADest: TCanvas;{$else}ADest: 
  TFPCustomCanvas;{$endif}
ADestX: Integer = 0; ADestY: Integer = 0; AMulX: Double = 1.0;
  AMulY: Double = 1.0);
  
  Which allows you to set a multiplier to be applied in the coordinates.
  1.0 means that there is 1 pixel per milimiter. 2.0 means 2 pixels per
  milimiter, etc.
  
  This function also allows you to set where the drawing will be placed,
  which is the viewport (ADestX, ADestY)
  
   nor to create a viewport on the drawing. Does fpVectorial
   includes that?.
  
  What do you mean by create a viewport on the drawing?
  
  In fpvectorial the drawing itself has no viewport, but you can set a
  viewport for the whole drawing when rendering on screen, which is
  (ADestX, ADestY)
  
 
 To me a viewport is a window that let you see an area of the drawing, just
 like any vector drawing app does.
 
 I thing DrawFPVectorialToCanvas does what I want. Let me try to
 understand what it does.
 
 For example, you have drawing of 1000 x 1000 mm, but you want to show in
 a canvas an area of 100 x 100 pixels, starting from the point 50, 50. To
 do this, you have to call DrawFPVectorialToCanvas(source, dest, 50, 50);
 
 To zoom in/out you have to change AMultX and AMultY.
 
 Am I right?.
 

Felipe, it seems to work as I thought!.

A new question. How can I check for mouse click on vectors?

-- 
Leonardo M. Ramé
http://leonardorame.blogspot.com

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Looking for vectors library

2011-06-01 Thread Felipe Monteiro de Carvalho
On Wed, Jun 1, 2011 at 3:44 PM, Leonardo M. Ramé l.r...@griensu.com wrote:
 procedure DrawFPVectorialToCanvas(ASource: TvVectorialDocument;
   {$ifdef USE_LCL_CANVAS}ADest: TCanvas;{$else}ADest: 
 TFPCustomCanvas;{$endif}
   ADestX: Integer = 0; ADestY: Integer = 0; AMulX: Double = 1.0;
 AMulY: Double = 1.0);

 For example, you have drawing of 1000 x 1000 mm, but you want to show in
 a canvas an area of 100 x 100 pixels, starting from the point 50, 50. To
 do this, you have to call DrawFPVectorialToCanvas(source, dest, 50, 50);

The Canvas Y coordinate is inverted in relation to how fpvectorial
defines it, so the most usual way to achieve what you want is:

DrawFPVectorialToCanvas(source, dest, 0, dest.height, 0.1, -0.1);

-- 
Felipe Monteiro de Carvalho

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Looking for vectors library

2011-06-01 Thread Felipe Monteiro de Carvalho
On Wed, Jun 1, 2011 at 5:51 PM, Leonardo M. Ramé l.r...@griensu.com wrote:
 A new question. How can I check for mouse click on vectors?

There is ready-made routine for that at the moment ... contributions
are welcome =)

Basically you have to iterate through all items and check their
coordinates against the mouse ones with the appropriate conversions,
probably with an error margin of around 5 pixels.

This could be slow if the drawing has 1s of elements, in that case
I suppose that some kind of optimization would be necessary, like the
following idea: When drawing check which elements are visible and make
a list with pointers to them. On click check only that list.

-- 
Felipe Monteiro de Carvalho

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] English lazarus book available.

2011-06-01 Thread waldo kitty

On 5/31/2011 21:02, Michael Joyner wrote:

$100 us dollars?


i didn't see that when i visited the site... i saw euros... 55, 60 and 
70something i think... they must have placed a conversion for $US?



Is there a epub or pdf version available?

On Mon, May 30, 2011 at 5:18 PM, Michael Van Canneyt mich...@freepascal.org 
wrote:


Hello,

For the interested:

I got news from the editor (chairman of the Dutch Pascal User Group) that
the Lazarus book Lazarus Complete Guide is now available for sale.

It can be purchased on-line from:

http://www.blaisepascal.eu/index.php?actie=./subscribers/subscription_mainpageUKPaypalPage2

It is a translation of the original German Lazarus book, published by CL
(which is by now in its second edition!).

Several of the core FPC/Lazarus developers have participated in the writing
of this book.


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Embweb lpk?

2011-06-01 Thread Leonardo M . Ramé
On 2011-06-01 10:21:31 -0700, leledumbo wrote:
 Have you configured your fppkg? Check the wiki entry for fppkg
 

Thanks, adding FPMakeOptions=--lazarusdir=/path/to/lazarus fixed my
problem.

-- 
Leonardo M. Ramé
http://leonardorame.blogspot.com

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Using Visual C++ .libs?

2011-06-01 Thread Malcolm Poole

On 01/06/11 13:13, Prado, Renato (R.P.) wrote:

You'll have to implement an wrapper, that allows to access the objects
and their methods by mere (non-OO) subroutines. That wrapper will have
to be written in the language of the library (here: C++), so that it

can

use the objects provided by the library, and can call their methods.

The

headers of the wrapper have to be converted into a unit (library?),


By wrapper you mean generating a unit translating the interface from the
.h right? After I got the unit, how can I link the .lib into my project?
I would not like to create a DLL in Visual C++ with the .lib inside just
to be able to use the .lib functions within Lazarus.
I can recommend the guide to using C in Freepascal projects at 
ftp://ftp.freepascal.org/pub/fpc/docs-pdf/CinFreePascal.pdf


I used it as a manual when writing a simple interface to the tesseract 
OCR library, which is also a C++ library.


Malcolm

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Using Visual C++ .libs?

2011-06-01 Thread Prado, Renato (R.P.)
 I can recommend the guide to using C in Freepascal projects at
 ftp://ftp.freepascal.org/pub/fpc/docs-pdf/CinFreePascal.pdf
I wasn't able to download the PDF, do you happen to have a copy to send
me, please?

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] NETDB ResolveName unstable on Debian? Affects Indy 10.2.0.3 - causes intermittent EIdResolveError

2011-06-01 Thread Joshua Lim

Hi,

I've been trying to use Indy indy10.2.0.3 on Debian and after sometime I 
noticed intermittent EIdResolveError, which doesn't happen on the 
Windows host - I'm running Debian as Guest on Virtualbox.  This problem 
affects all Indy components that need to resolve dns.


After debugging Indy, I realized that the problem is with NETDB's 
ResolveName.  Indy calls ResolveName inside IdStackUnix.pas - see 
below.  LRetVal returns -1 or 0 (can't remember which) intermittently 
even though network is up all the time.


The intermittent failure aside, another problem is if network is down 
before the program calls ResolveName, every subsequent calls of 
ResolveName will fail - NetAddr will always return 0.0.0.0.  Is there 
something which I need to do to free ResolveName?


I've also created a test program, details below.  Any thoughts will be 
appreciated.  Thanks.



function TIdStackUnix.HostByName(const AHostName: string;
 const AIPVersion: TIdIPVersion = ID_DEFAULT_IP_VERSION): string;
var
 LI4 : array of THostAddr;
 LH4 : THostEntry;
 LI6 : array of THostAddr6;
 LRetVal : Integer;
begin
 case AIPVersion of
   ID_IPv4 :
   begin
 if GetHostByName(AHostName,LH4) then
 begin
   Result := HostAddrToStr( LH4.Addr );
   exit;
 end
 else
 begin
   SetLength(LI4, 10);
   LRetVal := ResolveName(AHostName, LI4);
   if LRetVal  1 then begin
 raise EIdResolveError.CreateFmt(RSResolveError, [AHostName, 
'Error', LRetVal]); {do not localize}

   end;
   Result := NetAddrToStr(LI4[0]);
 end;
   end;
   ID_IPv6 :
   begin
 SetLength(LI6, 10);
 LRetVal :=  ResolveName6(AHostName, LI6);
 if LRetVal  1 then begin
   raise EIdResolveError.CreateFmt(RSResolveError, [AHostName, 
LRetVal]);

 end;
 Result := NetAddrToStr6(LI6[0]);
   end;
 end;
end;


Indy Trace:

2011-06-01 22:47:01 stacktrace:
class: EIdResolveError
message: Error resolving host ismsgateway.com: Error (-1)
 $0814DFB2  TIDSTACKUNIX__HOSTBYNAME,  line 410 of 
/home/joshua/Desktop/Data/send_20110421/indy/IdStackUnix.pas
 $0814C3F6  TIDSTACK__RESOLVEHOST,  line 518 of 
/home/joshua/Desktop/Data/send_20110421/indy/IdStack.pas
 $08165DF1  TIDIOHANDLERSTACK__CONNECTCLIENT,  line 315 of 
/home/joshua/Desktop/Data/send_20110421/indy/IdIOHandlerStack.pas
 $08165514  TIDIOHANDLERSOCKET__OPEN,  line 330 of 
/home/joshua/Desktop/Data/send_20110421/indy/IdIOHandlerSocket.pas
 $0815C5E4  TIDTCPCLIENTCUSTOM__CONNECT,  line 305 of 
/home/joshua/Desktop/Data/send_20110421/indy/IdTCPClient.pas
 $081BDAB4  TIDTELNET__CONNECT,  line 376 of 
/home/joshua/Desktop/Data/send_20110421/indy/IdTelnet.pas

 $08074EA6  TINDYTELNETTHREAD__ONTIMER,  line 382 of indytelnetthread.pp


To confirm that this is not an Indy issue, I created a test console to 
verify that ResolveName is the one that is giving problems.  Download 
full app source (inclusive of indy) from:- 
http://www.2shared.com/file/S1U0A5zw/test_app.html


 procedure TMyApplication.DoRun;
 var
   i: integer;
 LI4 : array of THostAddr;
  LRetVal : Integer;
 begin
   try
 i := 1;
 while i  1000 do
 begin
   try
 SetLength(LI4, 10);
 LRetVal := ResolveName('google.com', LI4);
  if LRetVal  1 then writeln('Failed to retrieve address!');
 writeln('NetAddr:'+NetAddrToStr(LI4[0]));
   except
 on E: Exception do  begin
   DumpException(E);
 end;
   end;
 //  sleep(100);
   Inc(i);
 end;
   finally
   end;
   // stop program loop
   Terminate;
 end; 



Here's the output from the console.  You can also find a screen capture 
here showing that PING works while the DNS resolve failed - 
http://www.imageupload.org/?d=C894B4BF1


root@debian:/home/joshua/Desktop/Data/testapps/testpingclientconsole# 
./project1

NetAddr:209.191.122.70
NetAddr:67.195.160.76
NetAddr:98.137.149.56
...repeat
NetAddr:67.195.160.76
NetAddr:209.191.122.70
NetAddr:98.137.149.56
NetAddr:69.147.125.65
Failed to retrieve address!
NetAddr:69.147.125.65
NetAddr:72.30.2.43
NetAddr:98.137.149.56
NetAddr:98.137.149.56
...repeat
NetAddr:98.137.149.56
NetAddr:69.147.125.65
NetAddr:98.137.149.56
Heap dump by heaptrc unit
753 memory blocks allocated : 23777/28248
753 memory blocks freed : 23777/28248
0 unfreed memory blocks : 0
True heap size : 131072
True free heap : 131072
root@debian:/home/joshua/Desktop/Data/testapps/testpingclientconsole#


Output from the console if network is down before console is launched, 
and then network is reinstated, but ResolveName does not recover:-


joshua@debian:~/Desktop/Data/testapps/testresolvenameconsole$ ./project1
Failed to retrieve address!
NetAddr:0.0.0.0
Failed to retrieve address!
NetAddr:0.0.0.0
Failed to retrieve address!
NetAddr:0.0.0.0
Failed to retrieve address!
NetAddr:0.0.0.0
Failed to retrieve address!
NetAddr:0.0.0.0
Failed to retrieve address!
NetAddr:0.0.0.0
Failed to 

[Lazarus] Any profiler?

2011-06-01 Thread Kostas Michalopoulos

Hi all,

Is there some sort of profiler i can use under Windows/Lazarus 0.9.30? I 
would prefer something like Mac OS X's Shark (ie. a sampling based 
profiler) if possible :-P.


I tried building the project with Generate code for gprof but it 
complained about missing libraries like c, gmon, cygwin, user32, 
kernel32, gcc, etc and beyond that gprof usually adds a lot of overhead 
that i would like to avoid.


Do you have anything in mind? I wonder how hard would it be to make 
Lazarus/FreePascal work with OpenWatcom's profiler (which, like Shark, 
is a sampling based profiler). The sampler seems to work but the 
profiler (they are two separate programs) cannot read the debugging 
symbols (most likely OW uses some other format for debugging symbols 
than FreePascal).


Kostas Bad Sector Michalopoulos

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] error compiling latest SVN laz...

2011-06-01 Thread waldo kitty


FPC 2.4.5 r17621 (17628??) svn.freepascal.org/svn/fpc/branches/fixes_2_4
LAZ 0.9.31 r31002 svn.freepascal.org/svn/lazarus/trunk

i wiped my existing svn installs, ran an svn update on both, then did the make 
thing... i'm following the Installing_Lazarus page from the wiki and have to 
start all over each time for some reason but that's another thread... in any 
case, my OS is w2ksp4 (Microsoft (R) Windows Version 5.0 (Build 2195; Service 
Pack 4))... here's the logged output...


[...]
Compiling cleandirdlg.pas
Compiling showdeletingfilesdlg.pas
Compiling compatibilityrestrictions.pas
Compiling restrictionbrowser.pas
Compiling projectwizarddlg.pas
Compiling idecmdline.pas
Compiling resource ..\units\i386-win32\lazarus.or
Linking ..\lazarus.exe
Fatal: Compilation aborted
An unhandled exception occurred at $00420D86 :
Exception : Unknown Run-Time error : 112
  $00420D86
  $0044FC4C
  $0044FAD8
  $00401836

make[2]: *** [lazarus.exe] Error 217
make[2]: Leaving directory `C:/freepascal/laz/ide'
make[1]: *** [ide] Error 2
make[1]: Leaving directory `C:/freepascal/laz/ide'
make: *** [ide] Error 2

C:\freepascal\lazcd \freepascal


i have complete compile logs for both, FPC and LAZ... these include both stdout 
and stderr output... what else do you need to know to help me get back to a 
working LAZ??



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus