Skip to content
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

Static linking under OSX #96

Open
nickgian opened this issue Nov 19, 2013 · 2 comments
Open

Static linking under OSX #96

nickgian opened this issue Nov 19, 2013 · 2 comments

Comments

@nickgian
Copy link

Using OSX 10.8.3 with GCC 4.7.

I created a simply library using GCC, static linking with a C program works.

$ ocamlfind ocamlopt -cclib '-L. -lhello-static' -linkpkg -package ctypes.foreign demo.cmx -o demo.native 
$ ./demo.native
$ Fatal error: exception Dl.DL_error("dlsym(RTLD_DEFAULT, res): symbol not found")

I've seen some other issues with static linking here but most workarounds are linux-only as far as I can tell, or at least my linker doesn't support the proposed arguments.

Dynamic linking works fine.

@nickgian
Copy link
Author

#41

Also I can't follow Daniel's solution as I do not have the dylib file of the library which seems to be required in order to see which other libraries the lib links to.

@constfun
Copy link

I'm facing this issue as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants