Newbie for calling julia c files con c and c++


#1

Hello!
I want to use julia as a scripting language on a game, im giving my first steps on trying scripting languages on c++.
Can anyone help me to compile it calling julia.h? Im on windows 7 Dev-c++ 5.11, include directories C:\Julia-1.0.0\include\julia, added ",library C:\Julia-1.0.0\lib added, “library or object” linking to Julia-1.0.0/lib/libjulia.dll.a but it gives the error main.cpp:(.text+0x17): undefined reference to `__imp_jl_init’ [Error] ld returned 1 exit status so its a link problem i guess.
The code i wanna compile is:

 #include <julia.h>
int main(int argc, char *argv[])
{
    jl_init();
    (void)jl_eval_string("println(sqrt(2.0))");
    jl_atexit_hook(0);
    return 0;
}

#2

I have the same problem in C, and a similar one with c#. Did you solve it? Thanks


#3

I just moved to lua for the task i was doing, simpler and fast. Sorry bro.