Open DanTheMann15 opened 4 years ago
Getting same error on clang64. I have tested mingw64, which compiled successfully (this is likely due to gcc being already installed by other packages), so this is most likely just a clang issue.
That's why you don't compile it statically :D
I believe this is caused by the PLIST_API
markers being set in the .c files vs. the public header file.
Same build static error when use msys2+ucrt64+gcc
on Windows. Use rust
language generally build with static.
this is odd. but when i attempt to compile libplist statically using clang instead of gcc, i end up with several errors like:
warning: redeclaration of 'what_to_what' should not add 'dllexport' attribute [-Wdll-attribute-on-redeclaration]
a good example of this is here, but see the full logs for more:
xplist.c:513:16: warning: redeclaration of 'plist_to_xml' should not add 'dllexport' attribute [-Wdll-attribute-on-redeclaration] PLIST_API void plist_to_xml(plist_t plist, char **plist_xml, uint32_t * length) ^ ../include\plist/plist.h:646:10: note: previous declaration is here void plist_to_xml(plist_t plist, char **plist_xml, uint32_t * length); ^ xplist.c:534:16: warning: redeclaration of 'plist_to_xml_free' should not add 'dllexport' attribute [-Wdll-attribute-on-redeclaration] PLIST_API void plist_to_xml_free(char *plist_xml) ^ ../include\plist/plist.h:653:10: note: previous declaration is here void plist_to_xml_free(char *plist_xml);
Here's my utilities for this particular problem: Host: Windows 7 (x86_64) Target: Windows (x86_64-w64-mingw32) Toolchain: MSYS2
parameters passed to configure:
./autogen.sh --host=x86_64-w64-mingw32 --enable-static --disable-shared --without-cython --prefix=/mingw64
Notes: i have both gcc and clang, when i use gcc it compiles okay but when i link a program to it (e.g tsschecker, it causes tsschecker to fail to compile with a similar error, same with libirecovery).
Full console log: make-error_20200816-0410.txt
how to repeat this using msys2 is just install msys2 like any normal person would, then install
autoconf autoconf-archive automake m4 libtool make patch ed sed
you know, the various tools you need to build stuff. then get mingw64 gcc and clang and simply try to build libplist, i guarantee the same thing will happen.