Sorry but I am not sure what you mean and how to "*evaluate your .jl file 
defining the module first*"?
(I am really new to Julia so maybe the question sounds really stupid, sorry 
for that)





On Tuesday, June 30, 2015 at 4:28:54 PM UTC+2, Isaiah wrote:
>
> `jl_new_module` creates a new module. You must evaluate your .jl file 
> defining the module first, then to get a reference to the module do:
>
> `jl_value_t* mod = jl_eval_string("MyModName");
>
> Then you can pass "mod" as the argument to `jl_get_function`.
>
> On Tue, Jun 30, 2015 at 10:16 AM, Kostas Tavlaridis-Gyparakis <
> kostas.t...@gmail.com <javascript:>> wrote:
>
>> Hello,
>> I am trying to write some function in Julia which I will be able to call 
>> inside my C++ projects in Eclipse.
>> In the documentation there is this 
>> <http://julia-demo.readthedocs.org/en/latest/manual/embedding.html#calling-julia-functions>
>>  
>> example on how to call a function of julia from an existing module.
>> So, what I have done was to create my own module where inside I included 
>> my function and then my
>> understanding is that I should be using "jl_new_module(jl_sym_t *name);" 
>> instead of jl_base_module.
>> But I am not sure (in case my assumption that this is the correct command 
>> is true) how to proper use
>> it's syntax, as what I am trying is:
>>
>>         jl_function_t * func = 
>> jl_get_function(jl_new_module(mymodule),"myfunction");
>>
>> and I tried instead of mymodule also mymodule.jl and "mymodule" and 
>> "mymodule.jl" and in all the attempts I
>> recieve an error that:
>>
>> mymodule  was not declared in this scope
>>
>>
>> Let me note beforehand that the module is being stored globaly as when I run 
>> julia on the terminal I can use it
>> through the comand using mymodule.
>> Still maybe I am trying to use the wrong command or sth, so if there is any 
>> suggestion I would be really greatful
>> to hear it.
>>
>>
>>
>>
>

Reply via email to