When I compiled Julie with my own userimg.jl
sometimes the compile process does not create correct the DLL (System Image Building with help of createDLL.bat
). Here’s the key command.
%Pathname%\julia.exe “%workDir%build_sysimg_tim.jl” libXJZ core2 “%workDir%userimg.jl” --force
Sometimes, after compilation I can not open the final libXJZ_tim.dll
in C/C++ with the help of julia.h
(Embedding Julia). I get error in function jl_init_with_image()
respectively program only crash .
Here is the print screen
https://drive.google.com/open?id=0ByRuhkKbXjteMjctVk5MQ19qRFE
I also created mini statistics good/ bad open DLLs (Of course without changing the code, I just called the compilation script).
I created a simple demo in Visual Studio with function foo()
to control the DLL opening. Function jl_init_with_image()
calls julia_init()
where program crash. I modify jl_init_with_image
and created own version to detect the problem.
My questions are:
I. How to exit the program correctly when the function julia_init()
does not return anything and the program only crash?
(How to capture an exception?,…?)
II. How to ensure stable compilation for system image building to work every created dll?
All the necessary files with good/ bad DLL and Project Visual Studio are in Drive.
This topic is closely related “Static julia compilation with own package”
INFO:
Microsoft Visual Studio Community 2015, Version: 14.0.
On Windows 8.1
julia> versioninfo()
Julia Version 0.5.1
Commit 6445c82 (2017-03-05 13:25 UTC)
Platform Info:
OS: Windows (x86_64-w64-mingw32)
CPU: Intel® Xeon® CPU E5-2430L v2 @ 2.40GHz
WORD_SIZE: 64
BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Sandybridge)
LAPACK: libopenblas64_
LIBM: libopenlibm
LLVM: libLLVM-3.7.1(ORCJIT, ivybridge)