1
我試圖在Mac上運行Xerces。我我們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)
我還包括在NetBeans
這裏上連接的libxerces-c.dylib
是錯誤
"/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)
任何想法如何解決這一問題?
謝謝!
你好,謝謝你的回答。我這樣做,但仍然有相同的錯誤 –
什麼目錄包含「PlatformUtils.hpp」文件?什麼-I標誌正在傳遞給編譯器? BTW'-I/opt/lib/libxerces-c.dylib'沒有任何意義,你應該把包含.h和.hpp文件的目錄放在包含路徑中,而不是.I .dylib文件。 – WillShackleford
包含PlatformUtils.hpp目錄是'/選擇/ lib目錄/ libxerces-c.dylib'我沒有看到說.H或'/ lib'以下是文件列表'libxerces-C- .HPP文件3.1.dylib''libxerces-ca''libxerces-c.dylib''libxerces-c.la' –