Re: [fpc-pascal] Linux Linking Error]

2007-06-04 Thread Rick Seiden
(I sent this earlier today, but haven't seen it on the list.  It's been 
over 5 hours, so I'm resending.  I'm sorry if you end up getting both!)


From the FPC IDE.  I have not installed Lazarus at this point.

I'm not sure how to compile from the command line.  I'm sorry, I'm a 
lame Windows person trying to make it in the Linux world, so command 
line calls aren't second nature to me.  I can't even get the mouse to 
work in the FPC IDE!


So, if you could give me the command I should use to compile, I'd be 
happy to post the full error message.


Thanks again
Rick

Michael Van Canneyt wrote:

On Sun, 3 Jun 2007, Rick Seiden wrote:

  

Using Ubuntu 6.10 under VMWare, I get an error when I try to compile any
program.  The error is not real descriptive, and isn't really helpful.  It
puts the error at the last line (end.) in the first column, and all it says is
Error while linking.  I've googled, and it doesn't look to be a 32bit v 64bit
issue.  I ran fpc -i, and the target cpu is listed as i386.

Any help would be appreciated.



I assume you are running this from some IDE ? The text mode IDE or the Lazarus 
IDE.
It would be instructive to try and compile from the command-line, this way
you'll get the complete error message.

In the case of Lazarus, start lazarus from within a console window. The
error messages of the compiler and linker will then also be displayed on
the console window.

Michael.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal



  


--

If you never have the courage to lose sight of the shore,
You'll never know the utter terror of being forever lost at sea


--

If you never have the courage to lose sight of the shore,
You'll never know the utter terror of being forever lost at sea

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Get Timestamp since 1970 (linux)

2007-06-04 Thread patrick feillant

Hello,
You can do that with ?

MilliSecondsBetween



Calculate the number of whole milliseconds between two DateTime values.

between  encodedatetime(1970,1,1,0,0,0,0) and  Present

I don't test, but it's probably ok.

bye

2007/6/4, TOUZEAU DAVID <[EMAIL PROTECTED]>:


Dear

Is there a function that help me to calculate seconds since 1970 year ?

exactly the same of this command :

/bin/date +%s -d 20070103

best regards


--
David Touzeau -- Linux Ubuntu Dapper 6.0.6
FreePascal-Lazarus,perl,delphi,php icq:160018849
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] gdk_window_get_frame_extents

2007-06-04 Thread jasj
>   

>   
>   Yes and no. The correct fix is to declare grect as GdkRectagle, as you
>   need to pass to the function the pointer to an allocated record.
>   
Surely you're right. 

   Jan Je/lowicki
-
Department of Mathematics  Katedra Matematyki
University of Life Sciences  Uniwersytet Przyrodniczy
  Wroc/law, POLAND
-
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] [Admin] HTML email

2007-06-04 Thread Jonas Maebe


(I sent this earlier today, but haven't seen it on the list.  It's  
been over 5 hours, so I'm resending.  I'm sorry if you end up  
getting both!)


The reason is that the mail also contained an html version. All such  
mails are held for moderator approval because it stops most spam and  
viruses (just filtering on list member addresses is not enough,  
because there have been cases in the past where viruses were sent  
with the address of a subscriber forged in the from-field).


I don't mind letting such mails through every morning, but when you  
send such mails there will indeed be a delay before they appear on  
the list. If you want to turn off html mail, see the following url  
for how to do that:

http://www.expita.com/nomime.html


Jonas
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Get Timestamp since 1970 (linux)

2007-06-04 Thread TOUZEAU DAVID

Many thanks patrick i will try it !

patrick feillant a écrit :

Hello,
You can do that with ?

MilliSecondsBetween 





  




Calculate the number of whole milliseconds between two DateTime values.


between  encodedatetime(1970,1,1,0,0,0,0) and  Present

I don't test, but it's probably ok.

bye

2007/6/4, TOUZEAU DAVID <[EMAIL PROTECTED] 
>:


Dear

Is there a function that help me to calculate seconds since 1970
year ?

exactly the same of this command :

/bin/date +%s -d 20070103

best regards


--
David Touzeau -- Linux Ubuntu Dapper 6.0.6
FreePascal-Lazarus,perl,delphi,php icq:160018849
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org

http://lists.freepascal.org/mailman/listinfo/fpc-pascal




--
David Touzeau -- Linux Ubuntu Dapper 6.0.6 
FreePascal-Lazarus,perl,delphi,php icq:160018849


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Get Timestamp since 1970 (linux)

2007-06-04 Thread Henry Vermaak

On 04/06/07, TOUZEAU DAVID <[EMAIL PROTECTED]> wrote:

Dear

Is there a function that help me to calculate seconds since 1970 year ?

exactly the same of this command :

/bin/date +%s -d 20070103



this will do what you want?:

function LocalToEpoch(
 year: Word;
 month: Word;
 day: Word;
 hour: Word;
 minute: Word;
 second: Word
):LongInt;


best regards


--
David Touzeau -- Linux Ubuntu Dapper 6.0.6


henry
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] FPC only 32 bits?

2007-06-04 Thread Francisco Reyes

Marco van de Voort writes:


Yes. I tried to get it running on AMD64 (and the results are in SVN), but
the binary won't run and I don't fully understand why.


Is your work on the 2.1.4 Beta or I have to do SVN?

In particular I see sources from May 20 at 
http://sourceforge.net/project/showfiles.php?group_id=2174


What files do I need to download for the source distribution to try and 
compile/test on amd64?


I see fpc-2.1.4.source.tar.gz and fpcbuild-2.1.4.tar.gz

I may try them both tonight, but any pointers would be helpfull.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] FPC only 32 bits?

2007-06-04 Thread Marco van de Voort
> Marco van de Voort writes:
> 
> > Yes. I tried to get it running on AMD64 (and the results are in SVN), but
> > the binary won't run and I don't fully understand why.
> 
> Is your work on the 2.1.4 Beta or I have to do SVN?
> 
> In particular I see sources from May 20 at 
> http://sourceforge.net/project/showfiles.php?group_id=2174
> 
> What files do I need to download for the source distribution to try and 
> compile/test on amd64?

You can't compile on amd64, since you still have to create the compiler (and
debug the actual problem).

So you need:

- a starting compiler (2.0.4 or 2.1.4)
- a 2.3.x (development) snapshot or svn checkout, which are afaik on FTP's
  server. Note that sourceforge only contains releases, not snapshots

Then you need to crosscompile (see http://www.stack.nl/~marcov/buildfaq.pdf
) to AMD64, and fix the problems in the end.

It is possible to create a binary for amd64, but that binary doesn't work,
and I don't know why. FreeBSD keeps complaining it can't execute it.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] Using AnsiString/WideString with C Library

2007-06-04 Thread gmjimen
Hello.

I'm writing a wrapper for a C library that allows the use of UNICODE. I did
wrappers for C libraries but using only ASCII strings. I did:

UNIT example;

INTERFACE

PROCEDURE Proc (Text: ANSISTRING);

IMPLEMENTATION

  { Wrapper for the C function. }
  PROCEDURE _C_Proc_ (Text: PCHAR); CDECL; EXTERNAL 'lib.dll' NAME 'proc';

PROCEDURE Proc (Text: ANSISTRING);
BEGIN
  _C_Proc (PCHAR (Text));
END;

END.

This way I can use Pascal strings with C functions.

I've read the documentation and I find that I can use WIDESTRING in a similar
way, but I'm not sure which character codification WIDESTRING uses. The C
library uses 'standard C strings' (that is 'char *string;') an there's a
function to define the character codification to be used by the library. It's
possible to use ASCII, UTF-8, UTF-16 and UTF-32.

Can WIDESTRING use all UNICODE codifications and ASCII strings?

If it can't, is there a way to use UNICODE strings?

Thanks in advance.

Guillermo Martínez Jiménez

[p.s.] Por cierto, escribo tonterías y hago budujos que podéis ver y
   leer aquí --> http://dibujantemomar.deviantart.com/
  y aquí --> http://dibujantemomar.spaces.live.com/


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] FPC only 32 bits?

2007-06-04 Thread Florian Klaempfl
Marco van de Voort schrieb:
>> Marco van de Voort writes:
>>
>>> Yes. I tried to get it running on AMD64 (and the results are in SVN), but
>>> the binary won't run and I don't fully understand why.
>> Is your work on the 2.1.4 Beta or I have to do SVN?
>>
>> In particular I see sources from May 20 at 
>> http://sourceforge.net/project/showfiles.php?group_id=2174
>>
>> What files do I need to download for the source distribution to try and 
>> compile/test on amd64?
> 
> You can't compile on amd64, since you still have to create the compiler (and
> debug the actual problem).
> 
> So you need:
> 
> - a starting compiler (2.0.4 or 2.1.4)
> - a 2.3.x (development) snapshot or svn checkout, which are afaik on FTP's
>   server. Note that sourceforge only contains releases, not snapshots
> 
> Then you need to crosscompile (see http://www.stack.nl/~marcov/buildfaq.pdf
> ) to AMD64, and fix the problems in the end.
> 
> It is possible to create a binary for amd64, but that binary doesn't work,
> and I don't know why. FreeBSD keeps complaining it can't execute it.

.note.abi set?
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] FPC only 32 bits?

2007-06-04 Thread Marco van de Voort
> Marco van de Voort schrieb:
> > So you need:
> > 
> > - a starting compiler (2.0.4 or 2.1.4)
> > - a 2.3.x (development) snapshot or svn checkout, which are afaik on FTP's
> >   server. Note that sourceforge only contains releases, not snapshots
> > 
> > Then you need to crosscompile (see http://www.stack.nl/~marcov/buildfaq.pdf
> > ) to AMD64, and fix the problems in the end.
> > 
> > It is possible to create a binary for amd64, but that binary doesn't work,
> > and I don't know why. FreeBSD keeps complaining it can't execute it.
> 
> .note.abi set?

Yes. We even did it together.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Using AnsiString/WideString with C Library

2007-06-04 Thread Marco van de Voort
> This way I can use Pascal strings with C functions.
> 
> I've read the documentation and I find that I can use WIDESTRING in a similar
> way, but I'm not sure which character codification WIDESTRING uses

UCS2 which is a subset (more like a draft for) of UTF16.  Maybe Microsoft
has fixed this to be fully UTF16 compliant in XP+ though.

> The C library uses 'standard C strings' (that is 'char *string;') an
> there's a function to define the character codification to be used by the
> library. It's possible to use ASCII, UTF-8, UTF-16 and UTF-32.

> Can WIDESTRING use all UNICODE codifications and ASCII strings?

If there are differences, they revolve around the differences between UCS2
and UTF16. (surrogate pairs mostly, maybe endianess support)
 
> If it can't, is there a way to use UNICODE strings?

There is no such thing. There are multiple unicode encodings (UTF-*, UCS-*
etc)
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Using AnsiString/WideString with C Library

2007-06-04 Thread Daniël Mantione


Op Mon, 4 Jun 2007, schreef [EMAIL PROTECTED]:

> I've read the documentation and I find that I can use WIDESTRING in a similar
> way, but I'm not sure which character codification WIDESTRING uses. The C
> library uses 'standard C strings' (that is 'char *string;') an there's a
> function to define the character codification to be used by the library. It's
> possible to use ASCII, UTF-8, UTF-16 and UTF-32.
> 
> Can WIDESTRING use all UNICODE codifications and ASCII strings?

An ansistring uses 8 bit characters, while a widestring uses 
16-bit characters. A widestring is normally UCS-2 or UTF-16 encoded.

Assignments to and from ansistrings convert to and from the system code 
page, i.e. if the system uses an ISO-8859-1 encoding, converting 
ansistrings from/to widestring converts to/from ISO-8859-1.
Further, there is utfencode and utf8decode, which convert an utf-8 
encoded ansistring to/from a widestring.

Daniël___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Get Timestamp since 1970 (linux)

2007-06-04 Thread Seweryn Walentynowicz
On Mon, Jun 04, 2007 at 09:27:55AM +0200, patrick feillant wrote:
> MilliSecondsBetween
> 
  Maybe simpler Secondsbetween() ? :o)
 
> 2007/6/4, TOUZEAU DAVID <[EMAIL PROTECTED]>:
> >
> >Is there a function that help me to calculate seconds since 1970 year ?

-- 
   Seweryn Walentynowicz
   [EMAIL PROTECTED]
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] gdk_window_get_frame_extents

2007-06-04 Thread Airr
On Mon, 4 Jun 2007 03:37:51 -0300
"Flávio Etrusco" <[EMAIL PROTECTED]> wrote:

> On 6/4/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

> >
> > fpc header for the gdk function is
> >
> > procedure gdk_window_get_frame_extents(window:PGdkWindow;
> > rect:PGdkRectangle);
> >
> > so, having grect: pGDKRectangle declared, you should use it rather
> > by
> >
> > gdk_window_get_frame_extents(GDK_WINDOW(widget^.window),grect);
> >
> 
> Yes and no. The correct fix is to declare grect as GdkRectagle, as you
> need to pass to the function the pointer to an allocated record.
> 
> -Flávio

Thanks, everyone.


I got it working by using:

grect : TGdkRectangle;

gdk_window_get_frame_extents(GDK_WINDOW(widget^.window),@grect);

AIR.
-- 
"Programming is like Poetry. Sometimes the words just escape you..."
-me, to my manager.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Get Timestamp since 1970 (linux)

2007-06-04 Thread TOUZEAU DAVID

Many thanks Seweryn, i use it

var ANow,AThen : TDateTime;
begin

 ANow:=now;
 AThen:=EncodeDateTime(1970, 1, 1, 0, 0, 0, 0);
 result:=IntTostr(SecondsBetween(ANow,AThen)-7200);//7200 for GMT +2
  

end; 


Seweryn Walentynowicz a écrit :

On Mon, Jun 04, 2007 at 09:27:55AM +0200, patrick feillant wrote:
  

MilliSecondsBetween



  Maybe simpler Secondsbetween() ? :o)
 
  

2007/6/4, TOUZEAU DAVID <[EMAIL PROTECTED]>:


Is there a function that help me to calculate seconds since 1970 year ?
  


  


--
David Touzeau -- Linux Ubuntu Dapper 6.0.6 
FreePascal-Lazarus,perl,delphi,php icq:160018849


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] Re: fpc-pascal Digest, Vol 34, Issue 13

2007-06-04 Thread gmjimen
Thanks for the answers.

I think I'll duplicate the functions, one for ASCII (ANSISTRING) coding and
the other for UTF-8 (WIDESTRING). I think this is the best way.

But I've look for the description for UTF8Encode, UTF8Decode, UTF8ToAnsi and
UTF8ToUnicode in the documentation and I can't find it. What does they do?

Guillermo Martínez Jiménez

[p.s.] Por cierto, escribo tonterías y hago budujos que podéis ver y
   leer aquí --> http://dibujantemomar.deviantart.com/
  y aquí --> http://dibujantemomar.spaces.live.com/



> --
>
> Message: 6
> Date: Mon, 4 Jun 2007 14:11:22 +0200 (CEST)
> From: [EMAIL PROTECTED] (Marco van de Voort)
> Subject: Re: [fpc-pascal] Using AnsiString/WideString with C Library
> To: FPC-Pascal users discussions 
> Message-ID: <[EMAIL PROTECTED]>
> Content-Type: text/plain; charset="US-ASCII"
>
>> This way I can use Pascal strings with C functions.
>>
>> I've read the documentation and I find that I can use WIDESTRING in a
>> similar
>> way, but I'm not sure which character codification WIDESTRING uses
>
> UCS2 which is a subset (more like a draft for) of UTF16.  Maybe Microsoft
> has fixed this to be fully UTF16 compliant in XP+ though.
>
>> The C library uses 'standard C strings' (that is 'char *string;') an
>> there's a function to define the character codification to be used by the
>> library. It's possible to use ASCII, UTF-8, UTF-16 and UTF-32.
>
>> Can WIDESTRING use all UNICODE codifications and ASCII strings?
>
> If there are differences, they revolve around the differences between UCS2
> and UTF16. (surrogate pairs mostly, maybe endianess support)
>
>> If it can't, is there a way to use UNICODE strings?
>
> There is no such thing. There are multiple unicode encodings (UTF-*, UCS-*
> etc)
>
>
> --
>
> Message: 7
> Date: Mon, 4 Jun 2007 14:15:13 +0200 (CEST)
> From: Dani?l Mantione <[EMAIL PROTECTED]>
> Subject: Re: [fpc-pascal] Using AnsiString/WideString with C Library
> To: FPC-Pascal users discussions 
> Message-ID: <[EMAIL PROTECTED]>
> Content-Type: text/plain; charset="iso-8859-1"
>
>
>
> Op Mon, 4 Jun 2007, schreef [EMAIL PROTECTED]:
>
>> I've read the documentation and I find that I can use WIDESTRING in a sim=
> ilar
>> way, but I'm not sure which character codification WIDESTRING uses. The C
>> library uses 'standard C strings' (that is 'char *string;') an there's a
>> function to define the character codification to be used by the library. =
> It's
>> possible to use ASCII, UTF-8, UTF-16 and UTF-32.
>> =
>
>> Can WIDESTRING use all UNICODE codifications and ASCII strings?
>
> An ansistring uses 8 bit characters, while a widestring uses =
>
> 16-bit characters. A widestring is normally UCS-2 or UTF-16 encoded.
>
> Assignments to and from ansistrings convert to and from the system code =
>
> page, i.e. if the system uses an ISO-8859-1 encoding, converting =
>
> ansistrings from/to widestring converts to/from ISO-8859-1.
> Further, there is utfencode and utf8decode, which convert an utf-8 =
>
> encoded ansistring to/from a widestring.
>
> Dani=EBl
>
> --

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Re: fpc-pascal Digest, Vol 34, Issue 13

2007-06-04 Thread Felipe Monteiro de Carvalho

On 6/4/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

I think I'll duplicate the functions, one for ASCII (ANSISTRING) coding and
the other for UTF-8 (WIDESTRING). I think this is the best way.


A widestring is not suitable to hold a utf-8 string. A ansistring on
the other hand is. (ansi is just a name .. it can hold iso or utf-8
strings)

A widestring is suitable to hold ucs-2 or utf-16 strings.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] Linux Linking Error solved

2007-06-04 Thread Rick Seiden
I emailed yesterday about an error when compiling in Linux.  The error I 
received was "Error while linking."


I figured out that the permissions on /usr/bin/ld is set to root, and 
I'm logged in as a different user.  When I sudo fp to start Free Pascal, 
I am able to compile without a problem.


Just wanted to share the solution. 


Rick

--

If you never have the courage to lose sight of the shore,
You'll never know the utter terror of being forever lost at sea


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] FPC only 32 bits?

2007-06-04 Thread Francisco Reyes

Marco van de Voort writes:


- a starting compiler (2.0.4 or 2.1.4)


Have it.


- a 2.3.x (development) snapshot or svn checkout, which are afaik on FTP's
  server. Note that sourceforge only contains releases, not snapshots


Which directory?

drwxr-xr-x2 1001 1001 4096 Mar 17 20:55 i386-emx
drwxr-xr-x2 1001 1001 4096 May 31 01:22 i386-go32v2
drwxr-xr-x2 1001 1001 4096 May 31 01:40 i386-win32

drwxr-xr-x2 1001 1001 4096 Mar 18 00:03 source



The source?


Then you need to crosscompile (see http://www.stack.nl/~marcov/buildfaq.pdf
) to AMD64, and fix the problems in the end.


Ok.
Will read up the doc.

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Linux Linking Error solved

2007-06-04 Thread Micha Nelissen
Rick Seiden wrote:
> I emailed yesterday about an error when compiling in Linux.  The error I
> received was "Error while linking."
> 
> I figured out that the permissions on /usr/bin/ld is set to root, and
> I'm logged in as a different user.  When I sudo fp to start Free Pascal,
> I am able to compile without a problem.

What are the permissions exactly ? You should be able to execute ld as
normal user at least.

Micha
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] FPC only 32 bits?

2007-06-04 Thread Daniël Mantione


Op Mon, 4 Jun 2007, schreef Francisco Reyes:

> The source?

Exactly.

Daniël___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Linux Linking Error solved

2007-06-04 Thread Rick Seiden

-rwxr-xr-x 1 root root 444104 2006-06-08 04:09 ld

You would think that would allow me to execute it as a normal user.  The 
only thing I shouldn't be able to do as non-root, non-root-group member 
is write it, but...


I was going to copy and paste the output to prove that it didn't  do it, 
but when I tested it this time, it did work.  I swear that the error 
said it couldn't find /usr/bin/ld.  I just did ls, saw it there, with 
the root ownership, and then ran sudo fpc sockser.pas, and the error 
went away.


Micha Nelissen wrote:

Rick Seiden wrote:
  

I emailed yesterday about an error when compiling in Linux.  The error I
received was "Error while linking."

I figured out that the permissions on /usr/bin/ld is set to root, and
I'm logged in as a different user.  When I sudo fp to start Free Pascal,
I am able to compile without a problem.



What are the permissions exactly ? You should be able to execute ld as
normal user at least.

Micha
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal



  


--

If you never have the courage to lose sight of the shore,
You'll never know the utter terror of being forever lost at sea


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] No Browser Info Available

2007-06-04 Thread Rick Seiden
I'm having problems running fp ide under Ubuntu 6.x under VMWare 
Workstation 5.5.


I go to an xterm session, and then run fp.  The first mouse click 
generates an error that is obviously from FP.  It says


No Browser info available

with an OK "button".

After that the mouse won't work in the terminal window at all.  I've 
searched and can't find anything on this.  Anyone have any ideas?


Thanks in advance.

--

If you never have the courage to lose sight of the shore,
You'll never know the utter terror of being forever lost at sea


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] FPC only 32 bits?

2007-06-04 Thread Francisco Reyes

Marco van de Voort writes:


- a starting compiler (2.0.4 or 2.1.4)


Got 2.0.4



- a 2.3.x (development) snapshot


Got from ftp.


Then you need to crosscompile (see http://www.stack.nl/~marcov/buildfaq.pdf
) to AMD64, and fix the problems in the end.


Got it.
Trying to figure out the right parameters.

cd ~/fpc
gmake distclean
# next all on one line
gmake all install CPU_TARGET=x86_64 OS_TARGET=freebsd CROSSBINDIR=~/cross/bin 
BINUTILSPREFIX=x86_64-freebsd-INSTALL_PREFIX=/usr/local

Does the install_prefix at the end installs anything on /usr/local?
or is everything installed on ~/cross/bin
Don't want to install a chunk of am64 code on an i386 machine. :-)

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] building snapshot

2007-06-04 Thread Francisco Reyes
Although ultimately my goal is to try to cross compile to amd64 from i386 
(FreeBSD) I figure I would start easy with a "standard compile".


The process completed.
When I run compiler/utils/fpc
It reads:

Free Pascal Compiler version 2.0.4 [2007/05/25] for i386

I downloaded the 2.3 snapshot (ot at least that is what I thought).


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] Optimization levels

2007-06-04 Thread Francisco Reyes

Looking at the compiler parameters I see:

-Oggenerate smaller code
-OGgenerate faster code (default)

Is the difference in speed/size significant?

-O1level 1 optimizations (quick optimizations)
-O2level 2 optimizations (-O1 + slower optimizations)
-O3level 3 optimizations (-O2 repeatedly, max 5 times)

Is it safe to use any of those?
When, if at all, it could be a bad idea to use them? 


-Op target processor:
-Op1   set target processor to 386/486
-Op2   set target processor to Pentium/PentiumMMX (tm)
-Op3   set target processor to PPro/PII/c6x86/K6 (tm)
-Op4   set target processor to Pentium 4 (tm)
-Op5   set target processor to Pentium M (tm)

Which of those would be 586 and 686 type CPUs?
Specially AMD cpus.

Like.
CPU: AMD Duron(tm) Processor (902.05-MHz 686-class CPU)
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] When is make cycle needed?

2007-06-04 Thread Francisco Reyes
Reading the docs I see there is a "make cycle" target, but I am not sure 
when it is necessary.


For the snapshot build seems that only "make all".
So when is make cycle needed?

Perhaps it is my newbiness, but the explanation in the manual doesn't mean 
much to me.


"make cycle" is a bootstrap of the compiler, and builds the rtl and compiler 
at least three times. The only starting point prerequisites are installed 
binutils and a starting compiler.


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] When is make cycle needed?

2007-06-04 Thread Michael Van Canneyt


On Mon, 4 Jun 2007, Francisco Reyes wrote:

> Reading the docs I see there is a "make cycle" target, but I am not sure when
> it is necessary.

Whenever the compiler changes.

It's to make sure that a compiler change does not cause any errors:
the changed compiler (ppc1) must generate a compiler binary (ppc2)
which is then used to create another compiler binary (ppc3) - the 
last 2 binaries must be exactly equal.

Michael
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] building snapshot

2007-06-04 Thread Jonas Maebe


On 5 jun 2007, at 03:44, Francisco Reyes wrote:

Although ultimately my goal is to try to cross compile to amd64  
from i386 (FreeBSD) I figure I would start easy with a "standard  
compile".


The process completed.
When I run compiler/utils/fpc
It reads:

Free Pascal Compiler version 2.0.4 [2007/05/25] for i386

I downloaded the 2.3 snapshot (ot at least that is what I thought).


Try running compiler/ppc386. fpc simply executes the first  
ppc it finds in the path afaik.



Jonas
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Optimization levels

2007-06-04 Thread Jonas Maebe


On 5 jun 2007, at 03:49, Francisco Reyes wrote:


Looking at the compiler parameters I see:

-Oggenerate smaller code
-OGgenerate faster code (default)

Is the difference in speed/size significant?


Usually not.


-O1level 1 optimizations (quick optimizations)
-O2level 2 optimizations (-O1 + slower optimizations)
-O3level 3 optimizations (-O2 repeatedly, max 5 times)

Is it safe to use any of those?


Yes.


When, if at all, it could be a bad idea to use them?


When you want to debug the result, or when you want a quick compile  
(higher optimization levels take more time).



-Op target processor:
-Op1   set target processor to 386/486
-Op2   set target processor to Pentium/PentiumMMX (tm)
-Op3   set target processor to PPro/PII/c6x86/K6 (tm)
-Op4   set target processor to Pentium 4 (tm)
-Op5   set target processor to Pentium M (tm)

Which of those would be 586 and 686 type CPUs?
Specially AMD cpus.

Like.
CPU: AMD Duron(tm) Processor (902.05-MHz 686-class CPU)


-Op3. It will make very little difference though.


Jonas
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal