libimobiledevice / libplist

A library to handle Apple Property List format in binary or XML
https://libimobiledevice.org
GNU Lesser General Public License v2.1
548 stars 304 forks source link

fails with several errors to compile when using clang on msys2 #169

Open DanTheMann15 opened 4 years ago

DanTheMann15 commented 4 years ago

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.

Merculous commented 1 year 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.

nikias commented 1 year ago

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.

neheb commented 1 year ago

related: https://github.com/libimobiledevice/libimobiledevice/pull/1156

cxfksword commented 1 year ago

Same build static error when use msys2+ucrt64+gcc on Windows. Use rust language generally build with static.

make error logs ``` // opening make all-recursive make[1]: 进入目录“/d/dev/libplist” Making all in libcnary make[2]: 进入目录“/d/dev/libplist/libcnary” CC node.lo CC node_list.lo CCLD libcnary.la make[2]: 离开目录“/d/dev/libplist/libcnary” Making all in src make[2]: 进入目录“/d/dev/libplist/src” CC base64.lo CC bytearray.lo CC hashtable.lo CC ptrarray.lo CC time64.lo CC xplist.lo xplist.c:532:13: warning: 'plist_to_xml' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 532 | plist_err_t plist_to_xml(plist_t plist, char **plist_xml, uint32_t * length) | ^~~~~~~~~~~~ xplist.c:1474:13: warning: 'plist_from_xml' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 1474 | plist_err_t plist_from_xml(const char *plist_xml, uint32_t length, plist_t * plist) | ^~~~~~~~~~~~~~ CC bplist.lo bplist.c:787:13: warning: 'plist_from_bin' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 787 | plist_err_t plist_from_bin(const char *plist_bin, uint32_t length, plist_t * plist) | ^~~~~~~~~~~~~~ bplist.c:1197:13: warning: 'plist_to_bin' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 1197 | plist_err_t plist_to_bin(plist_t plist, char **plist_bin, uint32_t * length) | ^~~~~~~~~~~~ CC jsmn.lo CC jplist.lo jplist.c:401:13: warning: 'plist_to_json' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 401 | plist_err_t plist_to_json(plist_t plist, char **plist_json, uint32_t* length, int prettify) | ^~~~~~~~~~~~~ jplist.c:785:13: warning: 'plist_from_json' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 785 | plist_err_t plist_from_json(const char *json, uint32_t length, plist_t * plist) | ^~~~~~~~~~~~~~~ CC oplist.lo oplist.c:445:13: warning: 'plist_to_openstep' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 445 | plist_err_t plist_to_openstep(plist_t plist, char **openstep, uint32_t* length, int prettify) | ^~~~~~~~~~~~~~~~~ oplist.c:898:13: warning: 'plist_from_openstep' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 898 | plist_err_t plist_from_openstep(const char *plist_ostep, uint32_t length, plist_t * plist) | ^~~~~~~~~~~~~~~~~~~ CC out-default.lo CC out-plutil.lo CC out-limd.lo CC plist.lo plist.c:190:5: warning: 'plist_is_binary' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 190 | int plist_is_binary(const char *plist_data, uint32_t length) | ^~~~~~~~~~~~~~~ plist.c:204:13: warning: 'plist_from_memory' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 204 | plist_err_t plist_from_memory(const char *plist_data, uint32_t length, plist_t *plist, plist_format_t *format) | ^~~~~~~~~~~~~~~~~ plist.c:273:13: warning: 'plist_read_from_file' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 273 | plist_err_t plist_read_from_file(const char *filename, plist_t *plist, plist_format_t *format) | ^~~~~~~~~~~~~~~~~~~~ plist.c:403:9: warning: 'plist_new_dict' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 403 | plist_t plist_new_dict(void) | ^~~~~~~~~~~~~~ plist.c:410:9: warning: 'plist_new_array' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 410 | plist_t plist_new_array(void) | ^~~~~~~~~~~~~~~ plist.c:427:9: warning: 'plist_new_string' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 427 | plist_t plist_new_string(const char *val) | ^~~~~~~~~~~~~~~~ plist.c:436:9: warning: 'plist_new_bool' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 436 | plist_t plist_new_bool(uint8_t val) | ^~~~~~~~~~~~~~ plist.c:445:9: warning: 'plist_new_uint' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 445 | plist_t plist_new_uint(uint64_t val) | ^~~~~~~~~~~~~~ plist.c:454:9: warning: 'plist_new_int' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 454 | plist_t plist_new_int(int64_t val) | ^~~~~~~~~~~~~ plist.c:463:9: warning: 'plist_new_uid' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 463 | plist_t plist_new_uid(uint64_t val) | ^~~~~~~~~~~~~ plist.c:472:9: warning: 'plist_new_real' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 472 | plist_t plist_new_real(double val) | ^~~~~~~~~~~~~~ plist.c:481:9: warning: 'plist_new_data' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 481 | plist_t plist_new_data(const char *val, uint64_t length) | ^~~~~~~~~~~~~~ plist.c:491:9: warning: 'plist_new_date' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 491 | plist_t plist_new_date(int32_t sec, int32_t usec) | ^~~~~~~~~~~~~~ plist.c:500:9: warning: 'plist_new_null' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 500 | plist_t plist_new_null(void) | ^~~~~~~~~~~~~~ plist.c:509:6: warning: 'plist_free' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 509 | void plist_free(plist_t plist) | ^~~~~~~~~~ plist.c:517:6: warning: 'plist_mem_free' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 517 | void plist_mem_free(void* ptr) | ^~~~~~~~~~~~~~ plist.c:593:9: warning: 'plist_copy' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 593 | plist_t plist_copy(plist_t node) | ^~~~~~~~~~ plist.c:598:10: warning: 'plist_array_get_size' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 598 | uint32_t plist_array_get_size(plist_t node) | ^~~~~~~~~~~~~~~~~~~~ plist.c:608:9: warning: 'plist_array_get_item' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 608 | plist_t plist_array_get_item(plist_t node, uint32_t n) | ^~~~~~~~~~~~~~~~~~~~ plist.c:623:10: warning: 'plist_array_get_item_index' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 623 | uint32_t plist_array_get_item_index(plist_t node) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ plist.c:655:6: warning: 'plist_array_set_item' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 655 | void plist_array_set_item(plist_t node, plist_t item, uint32_t n) | ^~~~~~~~~~~~~~~~~~~~ plist.c:676:6: warning: 'plist_array_append_item' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 676 | void plist_array_append_item(plist_t node, plist_t item) | ^~~~~~~~~~~~~~~~~~~~~~~ plist.c:685:6: warning: 'plist_array_insert_item' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 685 | void plist_array_insert_item(plist_t node, plist_t item, uint32_t n) | ^~~~~~~~~~~~~~~~~~~~~~~ plist.c:694:6: warning: 'plist_array_remove_item' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 694 | void plist_array_remove_item(plist_t node, uint32_t n) | ^~~~~~~~~~~~~~~~~~~~~~~ plist.c:710:6: warning: 'plist_array_item_remove' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 710 | void plist_array_item_remove(plist_t node) | ^~~~~~~~~~~~~~~~~~~~~~~ plist.c:725:6: warning: 'plist_array_new_iter' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 725 | void plist_array_new_iter(plist_t node, plist_array_iter *iter) | ^~~~~~~~~~~~~~~~~~~~ plist.c:734:6: warning: 'plist_array_next_item' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 734 | void plist_array_next_item(plist_t node, plist_array_iter iter, plist_t *item) | ^~~~~~~~~~~~~~~~~~~~~ plist.c:753:10: warning: 'plist_dict_get_size' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 753 | uint32_t plist_dict_get_size(plist_t node) | ^~~~~~~~~~~~~~~~~~~ plist.c:763:6: warning: 'plist_dict_new_iter' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 763 | void plist_dict_new_iter(plist_t node, plist_dict_iter *iter) | ^~~~~~~~~~~~~~~~~~~ plist.c:772:6: warning: 'plist_dict_next_item' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 772 | void plist_dict_next_item(plist_t node, plist_dict_iter iter, char **key, plist_t *val) | ^~~~~~~~~~~~~~~~~~~~ plist.c:800:6: warning: 'plist_dict_get_item_key' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 800 | void plist_dict_get_item_key(plist_t node, char **key) | ^~~~~~~~~~~~~~~~~~~~~~~ plist.c:809:9: warning: 'plist_dict_item_get_key' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 809 | plist_t plist_dict_item_get_key(plist_t node) | ^~~~~~~~~~~~~~~~~~~~~~~ plist.c:820:9: warning: 'plist_dict_get_item' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 820 | plist_t plist_dict_get_item(plist_t node, const char* key) | ^~~~~~~~~~~~~~~~~~~ plist.c:853:6: warning: 'plist_dict_set_item' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 853 | void plist_dict_set_item(plist_t node, const char* key, plist_t item) | ^~~~~~~~~~~~~~~~~~~ plist.c:894:6: warning: 'plist_dict_remove_item' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 894 | void plist_dict_remove_item(plist_t node, const char* key) | ^~~~~~~~~~~~~~~~~~~~~~ plist.c:912:6: warning: 'plist_dict_merge' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 912 | void plist_dict_merge(plist_t *target, plist_t source) | ^~~~~~~~~~~~~~~~ plist.c:936:9: warning: 'plist_access_pathv' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 936 | plist_t plist_access_pathv(plist_t plist, uint32_t length, va_list v) | ^~~~~~~~~~~~~~~~~~ plist.c:960:9: warning: 'plist_access_path' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 960 | plist_t plist_access_path(plist_t plist, uint32_t length, ...) | ^~~~~~~~~~~~~~~~~ plist.c:1011:9: warning: 'plist_get_parent' redeclared without dllimport attribute after being referenced with dll linkage 1011 | plist_t plist_get_parent(plist_t node) | ^~~~~~~~~~~~~~~~ plist.c:1016:12: warning: 'plist_get_node_type' redeclared without dllimport attribute after being referenced with dll linkage 1016 | plist_type plist_get_node_type(plist_t node) | ^~~~~~~~~~~~~~~~~~~ plist.c:1027:6: warning: 'plist_get_key_val' redeclared without dllimport attribute after being referenced with dll linkage 1027 | void plist_get_key_val(plist_t node, char **val) | ^~~~~~~~~~~~~~~~~ plist.c:1041:6: warning: 'plist_get_string_val' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 1041 | void plist_get_string_val(plist_t node, char **val) | ^~~~~~~~~~~~~~~~~~~~ plist.c:1055:13: warning: 'plist_get_string_ptr' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 1055 | const char* plist_get_string_ptr(plist_t node, uint64_t* length) | ^~~~~~~~~~~~~~~~~~~~ plist.c:1068:6: warning: 'plist_get_bool_val' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 1068 | void plist_get_bool_val(plist_t node, uint8_t * val) | ^~~~~~~~~~~~~~~~~~ plist.c:1080:6: warning: 'plist_get_uint_val' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 1080 | void plist_get_uint_val(plist_t node, uint64_t * val) | ^~~~~~~~~~~~~~~~~~ plist.c:1092:6: warning: 'plist_get_int_val' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 1092 | void plist_get_int_val(plist_t node, int64_t * val) | ^~~~~~~~~~~~~~~~~ plist.c:1097:6: warning: 'plist_get_uid_val' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 1097 | void plist_get_uid_val(plist_t node, uint64_t * val) | ^~~~~~~~~~~~~~~~~ plist.c:1109:6: warning: 'plist_get_real_val' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 1109 | void plist_get_real_val(plist_t node, double *val) | ^~~~~~~~~~~~~~~~~~ plist.c:1121:6: warning: 'plist_get_data_val' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 1121 | void plist_get_data_val(plist_t node, char **val, uint64_t * length) | ^~~~~~~~~~~~~~~~~~ plist.c:1131:13: warning: 'plist_get_data_ptr' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 1131 | const char* plist_get_data_ptr(plist_t node, uint64_t* length) | ^~~~~~~~~~~~~~~~~~ plist.c:1143:6: warning: 'plist_get_date_val' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 1143 | void plist_get_date_val(plist_t node, int32_t * sec, int32_t * usec) | ^~~~~~~~~~~~~~~~~~ plist.c:1212:6: warning: 'plist_compare_node_value' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 1212 | char plist_compare_node_value(plist_t node_l, plist_t node_r) | ^~~~~~~~~~~~~~~~~~~~~~~~ plist.c:1271:6: warning: 'plist_set_key_val' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 1271 | void plist_set_key_val(plist_t node, const char *val) | ^~~~~~~~~~~~~~~~~ plist.c:1281:6: warning: 'plist_set_string_val' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 1281 | void plist_set_string_val(plist_t node, const char *val) | ^~~~~~~~~~~~~~~~~~~~ plist.c:1286:6: warning: 'plist_set_bool_val' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 1286 | void plist_set_bool_val(plist_t node, uint8_t val) | ^~~~~~~~~~~~~~~~~~ plist.c:1291:6: warning: 'plist_set_uint_val' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 1291 | void plist_set_uint_val(plist_t node, uint64_t val) | ^~~~~~~~~~~~~~~~~~ plist.c:1296:6: warning: 'plist_set_int_val' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 1296 | void plist_set_int_val(plist_t node, int64_t val) | ^~~~~~~~~~~~~~~~~ plist.c:1301:6: warning: 'plist_set_uid_val' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 1301 | void plist_set_uid_val(plist_t node, uint64_t val) | ^~~~~~~~~~~~~~~~~ plist.c:1306:6: warning: 'plist_set_real_val' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 1306 | void plist_set_real_val(plist_t node, double val) | ^~~~~~~~~~~~~~~~~~ plist.c:1311:6: warning: 'plist_set_data_val' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 1311 | void plist_set_data_val(plist_t node, const char *val, uint64_t length) | ^~~~~~~~~~~~~~~~~~ plist.c:1316:6: warning: 'plist_set_date_val' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 1316 | void plist_set_date_val(plist_t node, int32_t sec, int32_t usec) | ^~~~~~~~~~~~~~~~~~ plist.c:1322:5: warning: 'plist_bool_val_is_true' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 1322 | int plist_bool_val_is_true(plist_t boolnode) | ^~~~~~~~~~~~~~~~~~~~~~ plist.c:1332:5: warning: 'plist_int_val_is_negative' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 1332 | int plist_int_val_is_negative(plist_t intnode) | ^~~~~~~~~~~~~~~~~~~~~~~~~ plist.c:1347:5: warning: 'plist_int_val_compare' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 1347 | int plist_int_val_compare(plist_t uintnode, int64_t cmpval) | ^~~~~~~~~~~~~~~~~~~~~ plist.c:1365:5: warning: 'plist_uint_val_compare' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 1365 | int plist_uint_val_compare(plist_t uintnode, uint64_t cmpval) | ^~~~~~~~~~~~~~~~~~~~~~ plist.c:1383:5: warning: 'plist_uid_val_compare' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 1383 | int plist_uid_val_compare(plist_t uidnode, uint64_t cmpval) | ^~~~~~~~~~~~~~~~~~~~~ plist.c:1401:5: warning: 'plist_real_val_compare' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 1401 | int plist_real_val_compare(plist_t realnode, double cmpval) | ^~~~~~~~~~~~~~~~~~~~~~ plist.c:1436:5: warning: 'plist_date_val_compare' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 1436 | int plist_date_val_compare(plist_t datenode, int32_t cmpsec, int32_t cmpusec) | ^~~~~~~~~~~~~~~~~~~~~~ plist.c:1457:5: warning: 'plist_string_val_compare' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 1457 | int plist_string_val_compare(plist_t strnode, const char* cmpval) | ^~~~~~~~~~~~~~~~~~~~~~~~ plist.c:1466:5: warning: 'plist_string_val_compare_with_size' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 1466 | int plist_string_val_compare_with_size(plist_t strnode, const char* cmpval, size_t n) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ plist.c:1475:5: warning: 'plist_string_val_contains' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 1475 | int plist_string_val_contains(plist_t strnode, const char* substr) | ^~~~~~~~~~~~~~~~~~~~~~~~~ plist.c:1484:5: warning: 'plist_key_val_compare' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 1484 | int plist_key_val_compare(plist_t keynode, const char* cmpval) | ^~~~~~~~~~~~~~~~~~~~~ plist.c:1493:5: warning: 'plist_key_val_compare_with_size' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 1493 | int plist_key_val_compare_with_size(plist_t keynode, const char* cmpval, size_t n) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ plist.c:1502:5: warning: 'plist_key_val_contains' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 1502 | int plist_key_val_contains(plist_t keynode, const char* substr) | ^~~~~~~~~~~~~~~~~~~~~~ plist.c:1511:5: warning: 'plist_data_val_compare' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 1511 | int plist_data_val_compare(plist_t datanode, const uint8_t* cmpval, size_t n) | ^~~~~~~~~~~~~~~~~~~~~~ plist.c:1528:5: warning: 'plist_data_val_compare_with_size' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 1528 | int plist_data_val_compare_with_size(plist_t datanode, const uint8_t* cmpval, size_t n) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ plist.c:1540:5: warning: 'plist_data_val_contains' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 1540 | int plist_data_val_contains(plist_t datanode, const uint8_t* cmpval, size_t n) | ^~~~~~~~~~~~~~~~~~~~~~~ plist.c:1554:6: warning: 'plist_set_debug' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 1554 | void plist_set_debug(int debug) | ^~~~~~~~~~~~~~~ plist.c:1562:6: warning: 'plist_sort' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 1562 | void plist_sort(plist_t plist) | ^~~~~~~~~~ plist.c:1626:13: warning: 'plist_write_to_string' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 1626 | plist_err_t plist_write_to_string(plist_t plist, char **output, uint32_t* length, plist_format_t format, plist_write_options_t options) | ^~~~~~~~~~~~~~~~~~~~~ plist.c:1656:13: warning: 'plist_write_to_stream' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 1656 | plist_err_t plist_write_to_stream(plist_t plist, FILE *stream, plist_format_t format, plist_write_options_t options) | ^~~~~~~~~~~~~~~~~~~~~ plist.c:1699:13: warning: 'plist_write_to_file' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 1699 | plist_err_t plist_write_to_file(plist_t plist, const char* filename, plist_format_t format, plist_write_options_t options) | ^~~~~~~~~~~~~~~~~~~ plist.c:1713:6: warning: 'plist_print' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 1713 | void plist_print(plist_t plist) | ^~~~~~~~~~~ CCLD libplist-2.0.la CXX Node.lo CXX Structure.lo CXX Array.lo CXX Boolean.lo CXX Data.lo CXX Date.lo CXX Dictionary.lo CXX Integer.lo CXX Key.lo CXX Real.lo CXX String.lo CXX Uid.lo CXXLD libplist++-2.0.la make[2]: 离开目录“/d/dev/libplist/src” Making all in include make[2]: 进入目录“/d/dev/libplist/include” make[2]: 对“all”无需做任何事。 make[2]: 离开目录“/d/dev/libplist/include” Making all in tools make[2]: 进入目录“/d/dev/libplist/tools” CC plistutil.o CCLD plistutil.exe C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: plistutil.o: in function `main': D:/dev/libplist/tools/plistutil.c:285: undefined reference to `__imp_plist_is_binary' C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/dev/libplist/tools/plistutil.c:287: undefined reference to `__imp_plist_from_bin' C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/dev/libplist/tools/plistutil.c:316: undefined reference to `__imp_plist_to_xml' C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/dev/libplist/tools/plistutil.c:330: undefined reference to `__imp_plist_free' C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/dev/libplist/tools/plistutil.c:330: undefined reference to `__imp_plist_free' C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/dev/libplist/tools/plistutil.c:308: undefined reference to `__imp_plist_from_memory' C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/dev/libplist/tools/plistutil.c:320: undefined reference to `__imp_plist_to_openstep' C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/dev/libplist/tools/plistutil.c:210: undefined reference to `__imp_plist_set_debug' C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/dev/libplist/tools/plistutil.c:297: undefined reference to `__imp_plist_from_xml' C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/dev/libplist/tools/plistutil.c:314: undefined reference to `__imp_plist_to_bin' C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/dev/libplist/tools/plistutil.c:311: undefined reference to `__imp_plist_sort' C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/dev/libplist/tools/plistutil.c:322: undefined reference to `__imp_plist_write_to_stream' C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/dev/libplist/tools/plistutil.c:323: undefined reference to `__imp_plist_free' C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/dev/libplist/tools/plistutil.c:290: undefined reference to `__imp_plist_sort' C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/dev/libplist/tools/plistutil.c:300: undefined reference to `__imp_plist_sort' C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/dev/libplist/tools/plistutil.c:318: undefined reference to `__imp_plist_to_json' collect2.exe: error: ld returned 1 exit status make[2]: *** [Makefile:426:plistutil.exe] 错误 1 make[2]: 离开目录“/d/dev/libplist/tools” make[1]: *** [Makefile:449:all-recursive] 错误 1 make[1]: 离开目录“/d/dev/libplist” make: *** [Makefile:379:all] 错误 2 ``` // closing