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
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
> 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
> 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
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
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