[fpc-devel] re: using generated obj files with vs or gcc in fpc?
Daniël Mantione
daniel.mantione at freepascal.org
Sun Mar 11 18:21:26 CET 2007
Op Sun, 11 Mar 2007, schreef Roozbeh GHolizadeh:
> >>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=EBl
>
> Well actually my problem is c object files use toupper
> function and i want to declare it in my pascal file.
> (i know it is very easy to being implemented in c..but
> now just for curusity.)
>
> so declaring external is reverse of what i want to do.
> I also tried with _toupper.didnt work,although i
> turned off underscoring of exporting function in c
> compiler.
>
> also tobjdump says unknown file.i cant dump c compiler
> generated .obj files.
Ok, that can be done too, declare it like this:
function toupper(ch : integer):integer;cdecl;public;alias:'toupper';
Daniël
More information about the fpc-devel
mailing list