Re: [fpc-pascal] Linux library access violation

2006-10-29 Thread Leducq Dominique
Le Lundi 30 Octobre 2006 01:13, Chris a écrit : > I get an "Access violation" when I call a function from a C library. > > Not sure if I can explain well enough, so I will just post the code: > > The C library: > #include > #include > > int testreturn(const char *thename, char *rcity, char *rstat

Re: [fpc-pascal] Linux Install: Is it me or the documentation? ;-)

2006-10-29 Thread Alain Vitry
Lev, You installed as root. The demo folders have root permissions. Then you tried to compile as a user, and indeed permission to write the object was denied. So you tried a sudo, which was a good idea, but all the environment information is not set properly in that case. You may copy the

Re: [fpc-pascal] Linux library access violation

2006-10-29 Thread L505
> int testreturn(const char *thename, char *rcity, char *rstate) > { > > memcpy (rcity,"Boston",7); > memcpy (rstate,"Massachusetts",14); > > return strlen(thename); > } First thing to check is it declared CDECL or STDCALL in the C library? I think the default C declaration mode is C

Re: [fpc-pascal] Linux library access violation

2006-10-29 Thread L
> int testreturn(const char *thename, char *rcity, char *rstate) > { > > memcpy (rcity,"Boston",7); > memcpy (rstate,"Massachusetts",14); > > return strlen(thename); > } First thing to check is it declared CDECL or STDCALL in the C library? > I click OK and its fine. It returns ev

[fpc-pascal] Linux library access violation

2006-10-29 Thread Chris
I get an "Access violation" when I call a function from a C library. Not sure if I can explain well enough, so I will just post the code: The C library: #include #include int testreturn(const char *thename, char *rcity, char *rstate) { memcpy (rcity,"Boston",7); memcpy (rstate,"Massa

Re: [fpc-pascal] Linux Install: Is it me or the documentation? ;-)

2006-10-29 Thread Lev Lafayette
On Sat, 2006-10-28 at 15:58 +0200, Michael Van Canneyt wrote: > > On Sat, 28 Oct 2006, Lev Lafayette wrote: > > > > > First let me say how pleased I am to discover FreePascal. 'Twas my > > favourite programming language way back around 1988-89, being the last > > time I put my serious programmin