platform_vars_macos.mk可能不正确

时间:2013-12-23 01:13:41

标签: gracenote

我已下载GNSDK ver.3.2.0.422。

我尝试构建一些示例应用程序。但我有同样的错误,如下所示...

gcc  -arch i386 -m64 -mmacosx-version-min=10.5  -lstdc++  -o sample _output/mac_x86-64/debug/main.o libgnsdk_link.3.2.0.dylib libgnsdk_lookup_local.3.2.0.dylib libgnsdk_storage_sqlite.3.2.0.dylib libgnsdk_manager.3.2.0.dylib  -lstdc++ -lpthread -ldl
ld: warning: ld: warning: ignoring file libgnsdk_lookup_local.3.2.0.dylib, file was built for x86_64 which is not the architecture being linked (i386): libgnsdk_lookup_local.3.2.0.dylibignoring file libgnsdk_link.3.2.0.dylib, file was built for x86_64 which is not the architecture being linked (i386): libgnsdk_link.3.2.0.dylib

ld: warning: ignoring file libgnsdk_storage_sqlite.3.2.0.dylib, file was built for x86_64 which is not the architecture being linked (i386): libgnsdk_storage_sqlite.3.2.0.dylib
ld: warning: ignoring file libgnsdk_manager.3.2.0.dylib, file was built for x86_64 which is not the architecture being linked (i386): libgnsdk_manager.3.2.0.dylib
Undefined symbols for architecture i386:
    "_gnsdk_link_initialize", referenced from:
  __init_gnsdk in main.o
    "_gnsdk_link_query_content_free", referenced from:
  __fetch_image in main.o
    "_gnsdk_link_query_content_retrieve", referenced from:
  __fetch_image in main.o
    "_gnsdk_link_query_create", referenced from:
  __perform_sample_query in main.o
    "_gnsdk_link_query_option_set", referenced from:
  __perform_sample_query in main.o
    "_gnsdk_link_query_release", referenced from:
  __perform_sample_query in main.o
    "_gnsdk_link_query_set_gdo", referenced from:
  __perform_sample_query in main.o
    "_gnsdk_link_shutdown", referenced from:
  __shutdown_gnsdk in main.o
    "_gnsdk_manager_error_info", referenced from:
  __display_error in main.o
    "_gnsdk_manager_gdo_deserialize", referenced from:
  __perform_sample_query in main.o
    "_gnsdk_manager_gdo_release", referenced from:
  __perform_sample_query in main.o
    "_gnsdk_manager_get_build_date", referenced from:
  __display_gnsdk_product_info in main.o
    "_gnsdk_manager_get_product_version", referenced from:
  __display_gnsdk_product_info in main.o
    "_gnsdk_manager_initialize", referenced from:
  __init_gnsdk in main.o
    "_gnsdk_manager_locale_load", referenced from:
  __set_locale in main.o
    "_gnsdk_manager_locale_release", referenced from:
  __set_locale in main.o
    "_gnsdk_manager_locale_set_group_default", referenced from:
  __set_locale in main.o
    "_gnsdk_manager_logging_enable", referenced from:
  __enable_logging in main.o
    "_gnsdk_manager_shutdown", referenced from:
  __shutdown_gnsdk in main.o
    "_gnsdk_manager_string_free", referenced from:
  __shutdown_gnsdk in main.o
    "_gnsdk_manager_user_create", referenced from:
  __get_user_handle in main.o
    "_gnsdk_manager_user_create_new", referenced from:
  __get_user_handle in main.o
    "_gnsdk_manager_user_release", referenced from:
  __shutdown_gnsdk in main.o
    "_gnsdk_storage_sqlite_initialize", referenced from:
  __init_gnsdk in main.o
    "_gnsdk_storage_sqlite_shutdown", referenced from:
  __shutdown_gnsdk in main.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [sample-debug] Error 1

我检查了makefile,发现platform_vars_macos.mk可能不正确。他们是......

# check cross-compiling setting
ifeq ($(ARCH),)
    IMPLDIR = mac
    IMPLARCH = x86-64
    ARCHFLAGS = -arch i386 -m64 $(MIN_VERSION_OSX_FLAG)

else ifneq ($(filter x86_64 x86-64 x64,$(ARCH)),)
    IMPLDIR = mac
    IMPLARCH = x86-64
    ARCHFLAGS = -arch i386 -m64 $(MIN_VERSION_OSX_FLAG)

我认为他们应该......

# check cross-compiling setting
ifeq ($(ARCH),)
    IMPLDIR = mac
    IMPLARCH = x86-64
    ARCHFLAGS = -arch x86_64 -m64 $(MIN_VERSION_OSX_FLAG)

else ifneq ($(filter x86_64 x86-64 x64,$(ARCH)),)
    IMPLDIR = mac
    IMPLARCH = x86-64
    ARCHFLAGS = -arch x86_64 -m64 $(MIN_VERSION_OSX_FLAG)

如果我的想法是正确的,请在下一个版本中修复它们。

0 个答案:

没有答案