I've managed to generate a Pkg-Config makefile using MSYS in the configure process and when I've tried to build
it I've got the below errors. I'm thinking there might be a basked meaning for these kinds of errors. Any clues as to what it is. This is for pkg-config 0.27.1 ?

pkg.c:246: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'initted'
pkg.c:246: error: 'initted' undeclared (first use in this function)
pkg.c:246: error: 'FALSE' undeclared (first use in this function)
pkg.c:250: error: 'TRUE' undeclared (first use in this function)
pkg.c:252: error: 'packages' undeclared (first use in this function)
pkg.c:252: error: 'g_str_hash' undeclared (first use in this function)
pkg.c:252: error: 'g_str_equal' undeclared (first use in this function)
pkg.c:253: error: 'locations' undeclared (first use in this function)
pkg.c:254: error: 'path_positions' undeclared (first use in this function)
pkg.c:258: warning: implicit declaration of function 'g_slist_foreach'
pkg.c:258: error: 'search_dirs' undeclared (first use in this function)
pkg.c:258: error: 'GFunc' undeclared (first use in this function)
pkg.c:258: error: expected ')' before 'scan_dir'
pkg.c: At top level:
pkg.c:263: error: expected declaration specifiers or '...' before 'gboolean'
pkg.c: In function 'internal_get_package':
pkg.c:268: error: 'packages' undeclared (first use in this function)
pkg.c:268: warning: assignment makes pointer from integer without a cast
pkg.c:284: error: 'disable_uninstalled' undeclared (first use in this function)
pkg.c:285: warning: implicit declaration of function 'name_ends_in_uninstalled'
pkg.c:289: warning: implicit declaration of function 'g_strconcat'
pkg.c:289: warning: assignment makes pointer from integer without a cast
pkg.c:291: error: 'FALSE' undeclared (first use in this function)
pkg.c:291: error: too many arguments to function 'internal_get_package'
pkg.c:302: error: 'locations' undeclared (first use in this function)
pkg.c:302: warning: assignment makes pointer from integer without a cast
pkg.c:307: error: 'warn' undeclared (first use in this function)
pkg.c:317: error: 'ignore_requires' undeclared (first use in this function)
pkg.c:317: error: 'ignore_private_libs' undeclared (first use in this function)
pkg.c:318: error: 'ignore_requires_private' undeclared (first use in this function)
pkg.c:318: error: too many arguments to function 'parse_package_file'
pkg.c:327: error: 'Package' has no member named 'uninstalled'
pkg.c:327: error: 'TRUE' undeclared (first use in this function)
pkg.c:330: warning: assignment makes pointer from integer without a cast
pkg.c:338: error: 'G_DIR_SEPARATOR' undeclared (first use in this function)
pkg.c:341: warning: implicit declaration of function 'g_assert'
pkg.c:343: warning: implicit declaration of function 'g_strndup'
pkg.c:343: warning: assignment makes pointer from integer without a cast
pkg.c:346: error: 'Package' has no member named 'path_position'
pkg.c:347: warning: implicit declaration of function 'GPOINTER_TO_INT'
pkg.c:347: error: 'path_positions' undeclared (first use in this function)
pkg.c:350: error: 'Package' has no member named 'path_position'
pkg.c: In function 'get_package':
pkg.c:365: error: 'TRUE' undeclared (first use in this function)
pkg.c:365: error: too many arguments to function 'internal_get_package'
pkg.c: In function 'get_package_quiet':
pkg.c:371: error: 'FALSE' undeclared (first use in this function)
pkg.c:371: error: too many arguments to function 'internal_get_package'
pkg.c: At top level:
pkg.c:374: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
pkg.c:406: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
pkg.c:443: error: expected ')' before '*' token
pkg.c:473: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
pkg.c:475: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
pkg.c:481: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
pkg.c:487: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
pkg.c:493: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
pkg.c:499: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
pkg.c:505: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
pkg.c:511: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
pkg.c:517: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
pkg.c:524: error: expected ')' before 'a'
pkg.c:539: error: expected declaration specifiers or '...' before 'GSList'
pkg.c: In function 'spew_package_list':
pkg.c:541: error: 'GSList' undeclared (first use in this function)
pkg.c:541: error: 'tmp' undeclared (first use in this function)
pkg.c:545: error: 'list' undeclared (first use in this function)
pkg.c: At top level:
pkg.c:556: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
pkg.c:563: error: expected declaration specifiers or '...' before 'GetListFunc'
pkg.c:563: error: expected declaration specifiers or '...' before 'GSList'
pkg.c: In function 'fill_one_level':
pkg.c:565: error: 'GSList' undeclared (first use in this function)
pkg.c:565: error: 'copy' undeclared (first use in this function)
pkg.c:567: warning: implicit declaration of function 'g_slist_copy'
pkg.c:567: error: 'func' undeclared (first use in this function)
pkg.c:569: error: 'listp' undeclared (first use in this function)
pkg.c:569: warning: implicit declaration of function 'g_slist_concat'
pkg.c: At top level:
pkg.c:573: error: expected declaration specifiers or '...' before 'GetListFunc'
pkg.c:573: error: expected declaration specifiers or '...' before 'GSList'
pkg.c: In function 'recursive_fill_list':
pkg.c:575: error: 'GSList' undeclared (first use in this function)
pkg.c:575: error: 'tmp' undeclared (first use in this function)
pkg.c:577: error: 'func' undeclared (first use in this function)
pkg.c:577: error: 'listp' undeclared (first use in this function)
pkg.c:577: error: too many arguments to function 'fill_one_level'
pkg.c:583: error: too many arguments to function 'recursive_fill_list'
pkg.c:585: warning: implicit declaration of function 'g_slist_next'
pkg.c: At top level:
pkg.c:590: error: expected declaration specifiers or '...' before 'GetListFunc'
pkg.c:591: error: expected declaration specifiers or '...' before 'GSList'
pkg.c:591: error: expected declaration specifiers or '...' before 'gboolean'
pkg.c:592: error: expected declaration specifiers or '...' before 'gboolean'
pkg.c: In function 'fill_list_single_package':
pkg.c:597: error: 'GSList' undeclared (first use in this function)
pkg.c:597: error: 'packages' undeclared (first use in this function)
pkg.c:598: error: 'tmp' undeclared (first use in this function)
pkg.c:604: error: 'include_private' undeclared (first use in this function)
pkg.c:604: error: 'get_requires_private' undeclared (first use in this function)
pkg.c:604: error: 'get_requires' undeclared (first use in this function)
pkg.c:605: error: too many arguments to function 'recursive_fill_list'
pkg.c:607: error: 'in_path_order' undeclared (first use in this function)
pkg.c:609: error: too many arguments to function 'spew_package_list'
pkg.c:611: warning: implicit declaration of function 'packages_sort_by_path_position'
pkg.c:613: error: too many arguments to function 'spew_package_list'
pkg.c:620: error: 'func' undeclared (first use in this function)
pkg.c:620: error: 'listp' undeclared (first use in this function)
pkg.c:620: error: too many arguments to function 'fill_one_level'
pkg.c:625: warning: implicit declaration of function 'g_slist_free'
pkg.c: At top level:
pkg.c:629: error: expected ')' before '*' token
pkg.c:667: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
pkg.c: In function 'verify_package':
pkg.c:686: error: 'GSList' undeclared (first use in this function)
pkg.c:686: error: 'requires' undeclared (first use in this function)
pkg.c:687: error: 'conflicts' undeclared (first use in this function)
pkg.c:688: error: 'system_directories' undeclared (first use in this function)
pkg.c:689: error: 'iter' undeclared (first use in this function)
pkg.c:690: error: 'requires_iter' undeclared (first use in this function)
pkg.c:691: error: 'conflicts_iter' undeclared (first use in this function)
pkg.c:692: error: 'system_dir_iter' undeclared (first use in this function)
pkg.c:694: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
pkg.c:694: error: 'search_path' undeclared (first use in this function)
pkg.c:728: error: 'Package' has no member named 'requires_private'
pkg.c:735: error: 'Package' has no member named 'required_versions'
pkg.c:736: error: 'Package' has no member named 'required_versions'
pkg.c:737: warning: assignment makes pointer from integer without a cast
pkg.c:741: warning: implicit declaration of function 'version_test'
pkg.c:764: error: 'get_requires_private' undeclared (first use in this function)
pkg.c:764: error: too many arguments to function 'recursive_fill_list'
pkg.c:765: warning: implicit declaration of function 'get_conflicts'
pkg.c:807: warning: implicit declaration of function 'g_getenv'
pkg.c:811:21: warning: unknown escape sequence '\/'
pkg.c:811:21: warning: unknown escape sequence '\/'
pkg.c:814: warning: implicit declaration of function 'add_env_variable_to_list'
pkg.c:829: error: 'Package' has no member named 'I_cflags'
pkg.c:832: error: 'gint' undeclared (first use in this function)
pkg.c:832: error: expected ';' before 'offset'
pkg.c:836: error: 'offset' undeclared (first use in this function)
pkg.c:852: error: 'gchar' undeclared (first use in this function)
pkg.c:852: error: expected expression before ')' token
pkg.c:853: warning: comparison between pointer and integer
pkg.c:871: error: 'Package' has no member named 'I_cflags'
pkg.c:871: warning: implicit declaration of function 'g_slist_remove'
pkg.c:871: error: 'Package' has no member named 'I_cflags'
pkg.c:875: error: 'GFunc' undeclared (first use in this function)
pkg.c:875: error: expected ')' before 'g_free'
pkg.c:884:21: warning: unknown escape sequence '\/'
pkg.c:884:21: warning: unknown escape sequence '\/'
pkg.c:890: error: 'Package' has no member named 'L_libs'
pkg.c:897: error: 'gboolean' undeclared (first use in this function)
pkg.c:897: error: expected ';' before 'is_system'
pkg.c:903: error: 'is_system' undeclared (first use in this function)
pkg.c:903: error: 'TRUE' undeclared (first use in this function)
pkg.c:911: warning: comparison between pointer and integer
pkg.c:927: error: 'Package' has no member named 'L_libs'
pkg.c:927: error: 'Package' has no member named 'L_libs'
pkg.c: At top level:
pkg.c:933: error: expected declaration specifiers or '...' before 'GetListFunc'
pkg.c:933: error: expected declaration specifiers or '...' before 'gboolean'
pkg.c:934: error: expected declaration specifiers or '...' before 'gboolean'
pkg.c: In function 'get_merged':
pkg.c:936: error: 'GSList' undeclared (first use in this function)
pkg.c:936: error: 'list' undeclared (first use in this function)
pkg.c:937: error: 'dups_list' undeclared (first use in this function)
pkg.c:940: error: 'func' undeclared (first use in this function)
pkg.c:940: error: 'in_path_order' undeclared (first use in this function)
pkg.c:941: error: 'include_private' undeclared (first use in this function)
pkg.c:941: error: too many arguments to function 'fill_list_single_package'
pkg.c:943: warning: implicit declaration of function 'string_list_strip_duplicates'
pkg.c:947: warning: implicit declaration of function 'string_list_to_string'
pkg.c:947: warning: assignment makes pointer from integer without a cast
pkg.c: At top level:
pkg.c:955: error: expected declaration specifiers or '...' before 'GetListFunc'
pkg.c:955: error: expected declaration specifiers or '...' before 'gboolean'
pkg.c:956: error: expected declaration specifiers or '...' before 'gboolean'
pkg.c: In function 'get_merged_from_back':
pkg.c:958: error: 'GSList' undeclared (first use in this function)
pkg.c:958: error: 'list' undeclared (first use in this function)
pkg.c:959: error: 'dups_list' undeclared (first use in this function)
pkg.c:962: error: 'func' undeclared (first use in this function)
pkg.c:962: error: 'in_path_order' undeclared (first use in this function)
pkg.c:963: error: 'include_private' undeclared (first use in this function)
pkg.c:963: error: too many arguments to function 'fill_list_single_package'
pkg.c:965: warning: implicit declaration of function 'string_list_strip_duplicates_from_back'
pkg.c:969: warning: assignment makes pointer from integer without a cast
pkg.c: At top level:
pkg.c:977: error: expected ')' before '*' token
pkg.c:998: error: expected ')' before '*' token
pkg.c: In function 'package_get_l_libs':
pkg.c:1024: error: 'Package' has no member named 'l_libs_merged'
pkg.c:1025: error: 'Package' has no member named 'l_libs_merged'
pkg.c:1025: error: 'get_l_libs' undeclared (first use in this function)
pkg.c:1025: error: 'FALSE' undeclared (first use in this function)
pkg.c:1026: error: 'ignore_private_libs' undeclared (first use in this function)
pkg.c:1026: error: too many arguments to function 'get_merged_from_back'
pkg.c:1028: error: 'Package' has no member named 'l_libs_merged'
pkg.c: At top level:
pkg.c:1032: error: expected ')' before '*' token
pkg.c: In function 'package_get_L_libs':
pkg.c:1042: error: 'Package' has no member named 'L_libs_merged'
pkg.c:1043: error: 'Package' has no member named 'L_libs_merged'
pkg.c:1043: error: 'get_L_libs' undeclared (first use in this function)
pkg.c:1043: error: 'TRUE' undeclared (first use in this function)
pkg.c:1044: error: 'ignore_private_libs' undeclared (first use in this function)
pkg.c:1044: error: too many arguments to function 'get_merged'
pkg.c:1046: error: 'Package' has no member named 'L_libs_merged'
pkg.c: At top level:
pkg.c:1050: error: expected ')' before '*' token
pkg.c: In function 'package_get_other_libs':
pkg.c:1058: error: 'Package' has no member named 'other_libs_merged'
pkg.c:1059: error: 'Package' has no member named 'other_libs_merged'
pkg.c:1059: error: 'get_other_libs' undeclared (first use in this function)
pkg.c:1059: error: 'TRUE' undeclared (first use in this function)
pkg.c:1060: error: 'ignore_private_libs' undeclared (first use in this function)
pkg.c:1060: error: too many arguments to function 'get_merged'
pkg.c:1062: error: 'Package' has no member named 'other_libs_merged'
pkg.c: At top level:
pkg.c:1066: error: expected ')' before '*' token
pkg.c:1072: error: expected ')' before '*' token
pkg.c: In function 'package_get_I_cflags':
pkg.c:1110: error: 'Package' has no member named 'I_cflags_merged'
pkg.c:1111: error: 'Package' has no member named 'I_cflags_merged'
pkg.c:1111: error: 'get_I_cflags' undeclared (first use in this function)
pkg.c:1111: error: 'TRUE' undeclared (first use in this function)
pkg.c:1111: error: 'FALSE' undeclared (first use in this function)
pkg.c:1111: error: too many arguments to function 'get_merged'
pkg.c:1113: error: 'Package' has no member named 'I_cflags_merged'
pkg.c: At top level:
pkg.c:1117: error: expected ')' before '*' token
pkg.c: In function 'package_get_other_cflags':
pkg.c:1126: error: 'Package' has no member named 'other_cflags_merged'
pkg.c:1127: error: 'Package' has no member named 'other_cflags_merged'
pkg.c:1127: error: 'get_other_cflags' undeclared (first use in this function)
pkg.c:1127: error: 'TRUE' undeclared (first use in this function)
pkg.c:1127: error: too many arguments to function 'get_merged'
pkg.c:1129: error: 'Package' has no member named 'other_cflags_merged'
pkg.c: At top level:
pkg.c:1133: error: expected ')' before '*' token
pkg.c: In function 'package_get_cflags':
pkg.c:1142: warning: implicit declaration of function 'g_assert_not_reached'
pkg.c: At top level:
pkg.c:1147: error: expected ')' before '*' token
pkg.c: In function 'define_global_variable':
pkg.c:1180: error: 'globals' undeclared (first use in this function)
pkg.c:1181: error: 'g_str_hash' undeclared (first use in this function)
pkg.c:1181: error: 'g_str_equal' undeclared (first use in this function)
pkg.c: In function 'package_get_var':
pkg.c:1201: error: 'globals' undeclared (first use in this function)
pkg.c:1202: warning: assignment makes pointer from integer without a cast
pkg.c:1204: error: 'Package' has no member named 'vars'
pkg.c:1205: error: 'Package' has no member named 'vars'
pkg.c:1205: warning: assignment makes pointer from integer without a cast
pkg.c:1209: warning: assignment makes pointer from integer without a cast
pkg.c: At top level:
pkg.c:1215: error: expected ')' before '*' token
pkg.c: In function 'rpmvercmp':
pkg.c:1271: warning: implicit declaration of function 'g_alloca'
pkg.c:1271: warning: assignment makes pointer from integer without a cast
pkg.c:1272: warning: assignment makes pointer from integer without a cast
pkg.c:1282: error: 'guchar' undeclared (first use in this function)
pkg.c: At top level:
pkg.c:1361: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'version_test'
pkg.c:1445: error: expected ')' before 'key'
pkg.c:1453: error: expected ')' before 'key'
pkg.c: In function 'print_package_list':
pkg.c:1475: error: 'ignore_requires' undeclared (first use in this function)
pkg.c:1475: error: 'TRUE' undeclared (first use in this function)
pkg.c:1476: error: 'ignore_requires_private' undeclared (first use in this function)
pkg.c:1478: warning: implicit declaration of function 'g_hash_table_foreach'
pkg.c:1478: error: 'locations' undeclared (first use in this function)
pkg.c:1478: error: 'max_len_foreach' undeclared (first use in this function)
pkg.c:1479: error: 'packages_foreach' undeclared (first use in this function)
pkg.c: In function 'enable_private_libs':
pkg.c:1485: error: 'ignore_private_libs' undeclared (first use in this function)
pkg.c:1485: error: 'FALSE' undeclared (first use in this function)
pkg.c: In function 'disable_private_libs':
pkg.c:1491: error: 'ignore_private_libs' undeclared (first use in this function)
pkg.c:1491: error: 'TRUE' undeclared (first use in this function)
pkg.c: In function 'enable_requires':
pkg.c:1497: error: 'ignore_requires' undeclared (first use in this function)
pkg.c:1497: error: 'FALSE' undeclared (first use in this function)
pkg.c: In function 'disable_requires':
pkg.c:1503: error: 'ignore_requires' undeclared (first use in this function)
pkg.c:1503: error: 'TRUE' undeclared (first use in this function)
pkg.c: In function 'enable_requires_private':
pkg.c:1509: error: 'ignore_requires_private' undeclared (first use in this function)
pkg.c:1509: error: 'FALSE' undeclared (first use in this function)
pkg.c: In function 'disable_requires_private':
pkg.c:1515: error: 'ignore_requires_private' undeclared (first use in this function)
pkg.c:1515: error: 'TRUE' undeclared (first use in this function)
make[2]: *** [pkg.o] Error 1
make[2]: Leaving directory `/c/pkg-config-0.27.1'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/c/pkg-config-0.27.1'
make: *** [all] Error 2

xxxx@XXXX-E0A0BDAF9E /c/pkg-config-0.27.1
$

Edited 4 Years Ago by daino: correction

pkg.c:246: error: expected '=', ',', ';', 'asm' or 'attribute' before 'initted'

line 246 from pkg.c, it seems that the expression is not valid, check again that code.
Also, when dealing with large errors, look at the first errors, because some of the other errors are derived from the 1st ones.

This article has been dead for over six months. Start a new discussion instead.