簡體   English   中英

編譯Ethos框架時出錯

[英]Error while compiling Ethos framework

我正在嘗試在Mac OS Lion上制作Ethos框架。 git://git.dronelabs.com/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 make,在編譯時出現錯誤:

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

我該如何解決?

我發現經過以下修改后,可以在Mac OS X 10.7上安裝Ethos:

1)編輯文件:ethos_dir / ethos / ethos_manager.c(:194):

從:

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);
  }
}

至:

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)禁止制作:ethos-dir / tests,更改Makefile.am

從:

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

至:

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

這是必要的,因為在進行處理時找不到libethos。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM