Thanks for the reply. After changing the compiler flags etc. the symbols 
now seem to be exported but i get the same error. Here is the nm output

nm ../usr/bin/embedding | grep my
0000000000601da0 t __frame_dummy_init_array_entry
0000000000400f10 t frame_dummy
0000000000400f40 T my_c_sqrt


On Saturday, 9 July 2016 17:38:23 UTC+5:30, Isaiah wrote:
>
> The symbol exists but is not exported (t vs T). Try adding DLLEXPORT in 
> front of the function declaration. On 0.4 it appears to have had a 
> Windows-only export declaration.
>
> On Saturday, July 9, 2016, Sourabh Chadha <sourabh...@gmail.com 
> <javascript:>> wrote:
>
>> I am new to Julia and have been trying to use ccall to call C functions 
>> in embedded mode but i am unable to even successfully run the example 
>> embedding.c that is in package. The example file define a 
>> function my_c_sqrt and then tries to call it using jl_eval_string("println( 
>> ccall( :my_c_sqrt, Float64, (Float64,), 2.0 ) )");. This doesnt work and if 
>> i trace the issue by printing errors i get ErrorException("ccall: could not 
>> find function my_c_sqrt").
>>
>> I have tried checking eveything. nm on the executble gives this.
>> nm ../usr/bin/embedding | grep my
>> 0000000000601d80 t __frame_dummy_init_array_entry
>> 0000000000400f60 t frame_dummy
>> 0000000000400f90 t my_c_sqrt
>>
>> so the symbol is available.
>>
>> I am running Red Hat Enterprise Linux Workstation release 7.0 (Maipo) nd 
>> hve compiled julia Version 0.4.6 from scratch.
>>
>> any help would be really appreciated
>>
>>

Reply via email to