Build failed on macOs Sierra
Closed this issue · 3 comments
crispgm commented
OS: macOS Sierra 10.14.4
Clang: 8.0.0
Error Message:
cc -shared markdown_parser.o markdown_output.o markdown_lib.o utility_functions.o parsing_functions.o odf.o -o libpeg-markdown.so
Undefined symbols for architecture x86_64:
"_g_slist_free", referenced from:
_print_element_list in markdown_output.o
"_g_slist_prepend", referenced from:
_print_html_element in markdown_output.o
"_g_slist_reverse", referenced from:
_print_element_list in markdown_output.o
"_g_string_append", referenced from:
_markdown_to_g_string in markdown_lib.o
_concat_string_list in utility_functions.o
_mk_str_from_list in utility_functions.o
"_g_string_append_printf", referenced from:
_print_element_list in markdown_output.o
_print_html_element in markdown_output.o
_print_html_string in markdown_output.o
_print_latex_element in markdown_output.o
_print_latex_string in markdown_output.o
_print_groff_mm_element in markdown_output.o
_print_odf_element in markdown_output.o
...
"_g_string_free", referenced from:
_markdown_to_g_string in markdown_lib.o
_markdown_to_string in markdown_lib.o
_mk_str_from_list in utility_functions.o
"_g_string_insert_c", referenced from:
_print_html_string in markdown_output.o
_print_latex_string in markdown_output.o
_print_groff_mm_element in markdown_output.o
_print_odf_element in markdown_output.o
_markdown_to_g_string in markdown_lib.o
"_g_string_new", referenced from:
_markdown_to_g_string in markdown_lib.o
_concat_string_list in utility_functions.o
_mk_str_from_list in utility_functions.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [library] Error 1
I have tried all possible StackOverflow answers, no one works for me.
jgm commented
It wasn't really set up to create dylibs.
I removed the build of the shared library from the Makefile,
so you should now be able to build the program and static
library.
I'd welcome a Makefile revision to create a dylib.
crispgm commented
@jgm Thanks for the reply.
But it seems that there is error occurred in linking. And I cannot build executable, either.
jgm commented
Builds fine for me on El Capitan. (Pull the latest from the repository, then try make distclean
and then make
, just to make sure.)