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

Doesn't compile anymore – CLANG error #19

Open
juanandresgs opened this issue Sep 19, 2016 · 2 comments
Open

Doesn't compile anymore – CLANG error #19

juanandresgs opened this issue Sep 19, 2016 · 2 comments

Comments

@juanandresgs
Copy link

Hey, looks like something has changed in OSX but neither the examples from the book (starting w/ ex32) nor the code in the git repo will compile. Error below:

Undefined symbols for architecture x86_64:
"_List_merge", referenced from:
_List_merge_sort in liblcthw.a(list_algos.o)
(maybe you meant: _List_merge_sort)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [tests/list_algos_tests] Error 1

@juanandresgs
Copy link
Author

To add some context, it looks like it's an issue with imports on OSX10.11 w/ XCode 8 (clang-800.0.38). Homebrew community is going apeshit trying to fix this [-no_weak_imports –https://github.com/golang/go/issues/16770]

@juanandresgs
Copy link
Author

For anyone else hounded by this problem, the ex32 List_merge function requires a function declaration as detailed here:
https://stackoverflow.com/questions/23851098/c-compile-errors-learn-c-the-hard-way-ex-32

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

No branches or pull requests

1 participant