Xerces安装后找不到库

克林·永旺帕比恩

我正在尝试在Mac上运行Xerces。我我们

 ./configure CFLAGS="-arch x86_64" CXXFLAGS="-arch x86_64" 
./configure --prefix=/opt
        sudo make (this builds the library)
        sudo make install (this installs the library)

我还将libxerces-c.dylibNetBeans中on链接器包括在内

这是错误

 "/Applications/Xcode.app/Contents/Developer/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
"/Applications/Xcode.app/Contents/Developer/usr/bin/make"  -f nbproject/Makefile-Debug.mk dist/Debug/GNU-MacOSX/xerces
mkdir -p build/Debug/GNU-MacOSX/_ext/619588065
rm -f "build/Debug/GNU-MacOSX/_ext/619588065/SAXCount.o.d"
g++    -c -g -I/opt/lib/libxerces-c.dylib -MMD -MP -MF "build/Debug/GNU-MacOSX/_ext/619588065/SAXCount.o.d" -o build/Debug/GNU-MacOSX/_ext/619588065/SAXCount.o ../../Documents/xerces-c-3.1.2/samples/src/SAXCount/SAXCount.cpp
In file included from ../../Documents/xerces-c-3.1.2/samples/src/SAXCount/SAXCount.cpp:26:
../../Documents/xerces-c-3.1.2/samples/src/SAXCount/SAXCount.hpp:26:10: fatal error: 'xercesc/util/PlatformUtils.hpp' file not found
#include <xercesc/util/PlatformUtils.hpp>
         ^
1 error generated.
make[2]: *** [build/Debug/GNU-MacOSX/_ext/619588065/SAXCount.o] Error 1
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2

BUILD FAILED (exit value 2, total time: 128ms)

任何想法如何解决这个问题?

谢谢!

威尔·沙克福德
  1. 在项目窗口中选择项目。
  2. 右键单击以弹出菜单。
  3. 选择Properties在弹出菜单中。
  4. C++ CompilerBuild对话框左侧的“类别”列表中选择
  5. 将目录添加到Include Directories新目录应在该xercesc/util/目录的子目录中包含PlatformUtils.hpp 根据您的选择,我猜/opt/include/

更新

解决

ld:找不到-lxerces-c的库

  1. LinkerBuild对话框左侧的“类别”列表中选择
  2. 添加包含libxerces-c.dylib和/或libxerces-c.a似乎要/opt/lib/的目录Additional Library Directories

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章