I try to run code for embedding julia in C with msys2 system environment:

#include <julia.h>

int main(int argc, char *argv[])
{
    /* required: setup the julia context */
    jl_init(NULL);

    printf("Calling julia from C:\n");
    /* run julia commands */
    jl_eval_string("print(sqrt(2.0))");

    /* strongly recommended: notify julia that the
         program is about to terminate. this allows
         julia time to cleanup pending write requests
         and run all finalizers
    */
    jl_atexit_hook(0);
    printf("\n");
    return 0;
}

try to compile with:
$gcc -o test test.c -fPIC -I$JULIA_DIR/src/ -I$JULIA_DIR/src/support 
-L/usr/lib/libjulia.dll  -L/usr/lib/x86_64-linux-gnu/libstc++-6.dll -ljulia
test.c:1:0: aviso: se descarta -fPIC para el objetivo (todo el código es 
independiente de posición)
 #include <julia.h>
 ^
In file included from /c/src/julia/src/support/ios.h:7:0,
                 from /c/src/julia/src/support/libsupport.h:14,
                 from /c/src/julia/src/julia.h:12,
                 from test.c:1:
/usr/include/uv.h:65:22: error fatal: uv-unix.h: No such file or directory
compilación terminada.

only exists uv-win.h
How I specifie my SO to Julia?

Reply via email to