- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 5.7k
 
Closed
Description
Following the article on how to embed Julia in C/C++ programs, using Windows, surfaces two problems:
- 
The article doesn't really cover using Windows / Visual Studio at all. Since it does work on Windows, I think it would be valuable to add those instructions, too.
 - 
A few of the symbols exported from libjulia.dll have "__threading" appended to their names. I found that I needed to modify my local copy of julia.h to get the program to link and run:
 
#ifndef _OS_WINDOWS_
JL_DLLEXPORT void julia_init(JL_IMAGE_SEARCH rel);
JL_DLLEXPORT void jl_init(void);
JL_DLLEXPORT void jl_init_with_image(const char *julia_bindir,
                                     const char *image_relative_path);
#else
JL_DLLEXPORT void julia_init__threading(JL_IMAGE_SEARCH rel);
JL_DLLEXPORT void jl_init__threading(void);
JL_DLLEXPORT void jl_init_with_image__threading(const char *julia_bindir,
	                                            const char *image_relative_path);
#define julia_init julia_init__threading
#define jl_init jl_init__threading
#define jl_init_with_image jl_init_with_image__threading
#endifFor jl_init(), specifically, there is also an exported symbol 'jl_init_threading' (just one underscore before 'threading').
vchuravy
Metadata
Metadata
Assignees
Labels
No labels