Op Sun, 11 Mar 2007, schreef Roozbeh GHolizadeh:
> Well everything is now ok,but in my .c source i've
> used 'toupper' function,
> now when i try to declare it in my pascal file like
>
> function toupper(ch : integer):integer;cdecl;
>
> still i get undefined symbol toupper error from
> compiler.
> i guess there is a problem in linker,ie you cant use
> external pascal functions in c sources.
The problem is the name mangling. Try to declare it like:
function toupper(ch : integer):integer;cdecl;external name 'toupper';
... if the external name is 'toupper'. It might also be '_toupper'. You
can check this with objdump.
Daniël
_______________________________________________
fpc-devel maillist - fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel