gpt4 book ai didi

c - 无法在 Mac OS X 10.8.2 上编译 Gammu

转载 作者:太空宇宙 更新时间:2023-11-04 04:51:24 26 4
gpt4 key购买 nike

我正在尝试在我的 Mac 机器上安装 Gammu。我已经安装了 cmake 以及 Apple Developer Command Line Tools。

当我运行 ./configure 时,我得到以下信息:

Avi-MacBook-Pro:gammu-1.32.0 avi$ ./configure
Wrapper script for configuring CMake for Gammu.

This provides limited compatibility with configure, if you want full
configuration control, use directly CMake. More information about CMake
is available at <http://www.cmake.org>.

-- Configuring Gammu 1.32.0
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
-- Could NOT find Threads (missing: Threads_FOUND)
-- MySQL not found.
-- Found PostgreSQL: /usr/include, /usr/lib/libpq.dylib
-- libdbi not found.
-- Could NOT find Libintl (missing: LIBINTL_INCLUDE_DIR LIBINTL_LIB_FOUND)
-- glib-2.0 not found.
-- gobject-2.0 not found.
-- Bluez not found.
-- Using OSX Bluetooth stack
-- Bluetooth support enabled
-- libusb-1.0 not found.
-- Nokia support enabled
-- Nokia MBUS2 protocol enabled
-- Nokia FBUS2 protocol enabled
-- Nokia FBUS2DLR3 protocol enabled
-- Nokia DKU2PHONET protocol enabled
-- Nokia DKU2AT protocol enabled
-- Nokia DKU5FBUS2 protocol enabled
-- Nokia FBUS2PL2303 protocol enabled
-- Nokia FBUS2BLUE protocol enabled
-- Nokia PHONETBLUE protocol enabled
-- Nokia BLUEFBUS2 protocol enabled
-- Nokia BLUEPHONET protocol enabled
-- Nokia 3320 and compatible phones support enabled
-- Nokia 650 and compatible phones support enabled
-- Nokia 61xx and compatible phones support enabled
-- Nokia 6510 and compatible phones support enabled
-- Force using 6210 frames for calendar for DCT4 phones disabled
-- Nokia 7110 and compatible phones support enabled
-- Nokia 9210 and compatible phones support enabled
-- Nokia 3650 and compatible phones support enabled
-- AT support enabled
-- AT protocol enabled
-- AT protocol over Bluetooth enabled
-- AT phones support enabled
-- Alcatel support enabled
-- Alcatel protocol enabled
-- Alcatel phones support enabled
-- OBEX compatible phones support enabled
-- OBEX protocol over Bluetooth enabled
-- Generic OBEX phones support enabled
-- AT with OBEX phones support enabled
-- Symbian phones support (S60) enabled
-- Symbian phones support (gnapplet) enabled
-- GNAPBUS protocol over Bluetooth enabled
-- Gnapplet phones support enabled
-- S60 phones support enabled
-- Cell Broadcast messages support enabled
-- Backup/Restore functions enabled
/var/lock is not writable, skipping locking tests!
-- Init script not being installed, install it by -DINSTALL_LSB_INIT=ON
-- Udev rules not being installed, install it by -DINSTALL_UDEV_RULES=ON
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/avi/Desktop/gam/gammu-1.32.0/build-configure

当我运行 make 时,出现错误:

Avi-MacBook-Pro:gammu-1.32.0 avi$ make
make -C build-configure
[ 1%] Building C object helper/CMakeFiles/string.dir/string.o
In file included from /Users/avi/Desktop/gam/gammu-1.32.0/helper/string.c:1:
/Users/avi/Desktop/gam/gammu-1.32.0/helper/string.h:14:10: error: 'string.h'
file not found with <angled> include; use "quotes" instead
#include <string.h>
^~~~~~~~~~
"string.h"
/Users/avi/Desktop/gam/gammu-1.32.0/helper/string.h:39:57: error: unknown type
name 'size_t'
extern int strncasecmp (const char *s1, const char *s2, size_t n);
^
/Users/avi/Desktop/gam/gammu-1.32.0/helper/string.h:58:1: error: unknown type
name 'wchar_t'
wchar_t towlower (wchar_t c);
^
/Users/avi/Desktop/gam/gammu-1.32.0/helper/string.h:58:22: error: unknown type
name 'wchar_t'
wchar_t towlower (wchar_t c);
^
In file included from /Users/avi/Desktop/gam/gammu-1.32.0/helper/string.c:3:
/Users/avi/Desktop/gam/gammu-1.32.0/build-configure/helper/../include/gammu-unicode.h:18:10: fatal error:
'wchar.h' file not found
#include <wchar.h>
^
5 errors generated.
make[3]: *** [helper/CMakeFiles/string.dir/string.o] Error 1
make[2]: *** [helper/CMakeFiles/string.dir/all] Error 2
make[1]: *** [all] Error 2
make: *** [all] Error 2

最佳答案

您的问题与 CMake 无关。您的 C 编译器找不到 C 标准中定义的某些 header 。这很奇怪,可能与 Gammu 无关。

你能检查一下你是否可以编译一个简单的 hello word C 测试程序,其中包括 ?如果失败,则必须修复编译器。

关于c - 无法在 Mac OS X 10.8.2 上编译 Gammu,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14659547/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com