[clean-list] Clean + C link
Arjen van Weelden
arjenw@cs.kun.nl
Mon, 16 Feb 2004 13:58:43 +0100
Hello,
Try using something like:
extern "C" {
void dosomething(int,int,char)
{
... your code
}
}
This should turn name mangling off.
regards,
Arjen van Weelden
Hernyák Zoltán wrote:
> In our project I have to link together some C++
> and Clean source. Since I can call a C function from
> Clean using the 'ccall' command, it seems to be simple,
> but I can say the gcc compiler re-name the C functions...
> "void dosomething(int,int,char)" goes to something like this
> '_Z09dosomethingIcI'. It can be detected, when one generate an assembly
> source from the .cc file. The real problem is, that I have to
> write this 'manned' name into the 'ccall' command - or else
> the linker would say 'there is no 'dosomething' function'.
>
> What should I do to avoid this thing? Is it the problem of
> gcc or the clean linker? Or where is the point?
>
>
> Hernyák Zoltán
> --------------
>
>
>
>
> _______________________________________________
> clean-list mailing list
> clean-list@cs.kun.nl
> http://www.cs.kun.nl/mailman/listinfo/clean-list