Hi Agobin --
Hmm, that's interesting. I had a simple case that worked for me, but it
was admittedly simple:
testit.chpl:
------------
extern var printf: opaque;
extern proc callFn(f);
require "testit.h";
callFn(printf);
------------
testit.h:
---------
#define callFn(f) (f("hi there %s\n", "brad"))
---------
This is what made me optimistic that the similar approach would work for
you (since I couldn't easily test against gtk). Can you:
a) verify that the test above works for you?
b) compile your code with -g --savec output and see where the seg fault
occurs by running within gdb/lldb?
Thanks,
-Brad
On Mon, 21 Mar 2016, Agobin Fobella wrote:
> Hi Brad,
>
> Thanks very much for that idea. Although it doesn't solve my problem,
> declaring
> g_print as:
> var g_print: opaque;
> makes the program to compile without any errors, but it just doesn't do
> what it is
> intended to do. The program ends with a segmentation fault when the
> 'opaque' part
> starts to execute. I think the program ending with a segmentation fault
> might mean
> that the function wasn't actually passed.
> Thanks again for the idea and please for more suggestions as I try to
> figure one
> out myself.
>
> Agobin.
>
------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
_______________________________________________
Chapel-bugs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/chapel-bugs