2011-10-01 69 views
0

我試圖在Mac OS Lion上製作Ethos框架。 混帳://git.dronelabs.com/ethos編譯Ethos框架時出錯

這裏的./configure的結果:

Ethos 0.2.3 
    Prefix...................: /usr/local 
    Debug level..............: minimum 
    Maintainer Compiler flags: no 
    Build API reference......: no 
    Enable test suite........: yes 
Bindings 
    GObject Introspection....: no 
    Vala Bindings............: no 
    Python Bindings..........: no 
    Javascript Bindings......: no 
Now type `make' to compile ethos 

然後我做sudo的化妝,並在編譯時出現錯誤:

Making all in c-plugins 
CC libsample.so 
Undefined symbols for architecture x86_64: 
"_ethos_plugin_get_type", referenced from: 
    _my_plugin_get_type in cc3gPLKS.o 
    _my_plugin_class_init in cc3gPLKS.o 
ld: symbol(s) not found for architecture x86_64 
collect2: ld returned 1 exit status 
make[3]: *** [libsample.so] Error 1 
make[2]: *** [all-recursive] Error 1 
make[1]: *** [all-recursive] Error 1 
make: *** [all] Error 2 

我該如何解決它?

回答

0

我發現風氣可以在Mac OS X 10.7以下修改後安裝:

1)編輯的文件:ethos_dir /風氣/ ethos_manager.c(:194):

FROM:

while (NULL != (filename = g_dir_read_name (dir))) { 
    if (g_str_has_suffix (filename, "." G_MODULE_SUFFIX)) { 
    abspath = g_build_filename (loaders_dir, filename, NULL); 
    loader = ethos_manager_create_plugin_loader (manager, abspath); 
    if (loader != NULL) 
     loaders = g_list_prepend (loaders, loader); 
    g_free (abspath); 
    } 
} 

TO:

while (NULL != (filename = g_dir_read_name (dir))) { 
#ifdef __APPLE__ 
    gchar* suffix = "dylib"; // to able find ethos-plugin-loader 
#else 
    gchar* suffix = ("." G_MODULE_SUFFIX); 
#endif 
    if (g_str_has_suffix (filename, suffix)) { 
    abspath = g_build_filename (loaders_dir, filename, NULL); 
    loader = ethos_manager_create_plugin_loader (manager, abspath); 
    if (loader != NULL) 
     loaders = g_list_prepend (loaders, loader); 
    g_free (abspath); 
    } 
} 

2)使製造用於:風氣-DIR /測試, 變化Makefile.am

FROM:

line#: contents 
02: SUBDIRS = c-plugins manager-dep 
30: manager_sources = manager.c 
31: plugin_info_sources = plugin-info.c 

TO:

02: #SUBDIRS = c-plugins manager-dep 
30: #manager_sources = manager.c 
31: #plugin_info_sources = plugin-info.c 

這是必要的,因爲,在制定過程中無法找到libethos。