Skip to content

Shouldn't have to specify julia path in jl_init. #9691

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
twadleigh opened this issue Jan 9, 2015 · 4 comments
Closed

Shouldn't have to specify julia path in jl_init. #9691

twadleigh opened this issue Jan 9, 2015 · 4 comments
Labels
embedding Embedding Julia using the C API

Comments

@twadleigh
Copy link
Contributor

As it stands, if a path is not passed to jl_init, the default logic in _julia_init is used. There, if jl_compileropts.julia_home and the JULIA_HOME environment variable are not set, it derives the julia path from that of the current executable. When embedding, though, that's likely not the right place.

jl_init should use analogous logic, but derive the default path from the executing julia shared library.

@stevengj
Copy link
Member

stevengj commented Jan 9, 2015

See also JuliaLang/IJulia.jl#206 and #7801.

@stevengj stevengj added the embedding Embedding Julia using the C API label Jan 9, 2015
@tknopp
Copy link
Contributor

tknopp commented Jan 9, 2015

@twadleigh I also run into similar problems when using the embedding stuff under windows and had the idea that #5045 could make this more robust.

@stevengj
Copy link
Member

stevengj commented Jan 9, 2015

On MacOS and Linux, we can use dladdr to find the libjulia path. On Windows, maybe GetModuleFileName? (See also here.) Ah, I see that's precisely what you did in #5045.

@twadleigh
Copy link
Contributor Author

Closing this. Most likely way out of date.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
embedding Embedding Julia using the C API
Projects
None yet
Development

No branches or pull requests

3 participants