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:
Just ran into the same issue after upgrading to Julia 1.1 from 0.6.4 on Windows 10 (mingw toolchain). Investigating now… any tips on what changed in 1.0+ welcome!
solved - need to #define JULIA_ENABLE_THREADING before #include <julia.h> on Windows. Not very intuitive… identified in https://github.com/JuliaLang/julia/issues/28969. The related documentation PR seems to be merged, although it only mentions Visual Studio which might throw some people off.