fn exportToCTest (i:int):int=i+1

extern fun exportToCTest(i:int):int="ext#exportToCTest"

%{$
int callAtsTest(int a)
{
    return exportToCTest(0);
}
%}
here is my test code, cant run
在2025年6月24日星期二 UTC+8 10:01:47<jin> 写道:

> i'm using ats2, and i want to use pthread, i want to call ats funtion in c 
> code, i tried the extern fun xxx="ext#xxx", but seems like c function cant 
> use the xxx to run the ats function. any way to export a ats function with 
> a global name which c can use?

-- 
You received this message because you are subscribed to the Google Groups 
"ats-lang-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/ats-lang-users/eaaf1e9e-bdb8-4f05-9c83-bfdf0611d8d6n%40googlegroups.com.

Reply via email to