프로젝트에 C++ 웹 프레임 워크를 사용하고 있습니다. gitmodel 예제에 인증을 추가하려고합니다.Wt 예제와 결합시 연결된 오류가 발생했습니다.
나는 다음과 같은 오류가 점점 오전 :
../hangman/CMakeFiles/hangman.wt.dir/Session.o: In function `Session::Session()': /home/s/Downloads/wt-3.2.3/examples/hangman/Session.C:101: undefined reference to `void Wt::Dbo::Session::mapClass<User>(char const*)'
../hangman/CMakeFiles/hangman.wt.dir/Session.o: In function `Wt::Auth::Dbo::AuthInfo<User>::user() const': /home/s/Downloads/wt-3.2.3/src/Wt/Auth/Dbo/AuthInfo:94: undefined reference to `Wt::Dbo::ptr<User>::ptr(Wt::Dbo::ptr<User> const&)'
../hangman/CMakeFiles/hangman.wt.dir/Session.o: In function `Session::user() const': /home/s/Downloads/wt-3.2.3/examples/hangman/Session.C:138: undefined reference to `Wt::Dbo::ptr<User>::operator bool() const'
/home/s/Downloads/wt-3.2.3/examples/hangman/Session.C:139: undefined reference to `User::User()'
/home/s/Downloads/wt-3.2.3/examples/hangman/Session.C:139: undefined reference to `Wt::Dbo::ptr<User> Wt::Dbo::Session::add<User>(User*)'
/home/s/Downloads/wt-3.2.3/examples/hangman/Session.C:139: undefined reference to `Wt::Dbo::ptr<User>::operator=(Wt::Dbo::ptr<User> const&)'
전체 오류 목록 : http://pastie.org/5469803
내가 메이크 생성 된 cmake를 사용했습니다. 추적 후,이 링커 오류는 CMakeFiles 디렉토리 아래에서 link.txt를 실행 한 후에 나타납니다. hangman이 인증을하기 때문에 gitmodel 예제와 행맨 예제의 link.txt를 결합하려고했습니다. 여기 내 link.txt입니다 :
/usr/bin/c++ -O2 -g ../hangman/CMakeFiles/hangman.wt.dir/Session.o CMakeFiles/gitview.wt.dir/Git.o CMakeFiles/gitview.wt.dir/GitModel.o CMakeFiles/gitview.wt.dir/__/wt-homepage/SourceView.o CMakeFiles/gitview.wt.dir/GitView.o -o gitview.wt -rdynamic -L/home/s/Downloads/wt-3.2.3/build/src/http -L/home/s/Downloads/wt-3.2.3/build/src -L/home/s/Downloads/wt-3.2.3/build/src/Wt/Dbo -L/home/s/Downloads/wt-3.2.3/build/src/Wt/Dbo/backend -lcrypt -L/usr/local/lib ../../src/http/libwthttp.so.3.2.3 ../../src/libwt.so.3.2.3 ../../src/Wt/Dbo/libwtdbo.so.3.2.3 ../../src/Wt/Dbo/backend/libwtdbosqlite3.so.3.2.3 /usr/local/lib/libboost_filesystem.so /usr/local/lib/libboost_random.so /usr/local/lib/libboost_regex.so /usr/local/lib/libboost_signals.so /usr/local/lib/libboost_system.so /usr/local/lib/libboost_filesystem.so -lz -lssl -lcrypto ../../src/Wt/Dbo/libwtdbo.so.3.2.3 /usr/local/lib/libboost_thread.so /usr/local/lib/libboost_program_options.so /usr/local/lib/libboost_date_time.so -lpthread -ldl -Wl,-rpath,/home/s/Downloads/wt-3.2.3/build/src/http:/home/s/Downloads/wt-3.2.3/build/src:/home/s/Downloads/wt-3.2.3/build/src/Wt/Dbo:/home/s/Downloads/wt-3.2.3/build/src/Wt/Dbo/backend:/usr/local/lib
Pastie 링크 : http://pastie.org/5469815
사람이 내 연결 명령을 사용하여 문제가 있는지 알려 주시기 바랍니다 수 있습니까? 실행 cmake에
, 나는 그것은 DBO 기호를 찾는되지 링커처럼 보이는
/home/s/Downloads/wt-3.2.3/examples/gitmodel on master ✗ at 1:24PM
➜ BOOST_FS_LIB=/usr/local/lib/libboost_filesystem.so cmake .
-- ** Not building gitmodel example: requires boost_filesystem library.
CMake Warning (dev) in CMakeLists.txt:
No cmake_minimum_required command is present. A line of code such as
cmake_minimum_required(VERSION 2.8)
should be added at the top of the file. The version specified may be lower
if you wish to support older CMake versions for this project. For more
information run "cmake --help-policy CMP0000".
This warning is for project developers. Use -Wno-dev to suppress it.
-- Configuring done
-- Generating done
-- Build files have been written to: /home/s/Downloads/wt-3.2.3/examples/gitmodel
실행중인 cmake에서 얻을 수 있습니다. – snihalani
질문에 cmake 출력이 추가되었습니다. – snihalani
또한/usr/lib에 예제를 설치 한 것 같습니다. 당신은 그렇게 않았다 방법? 어떤 링크든지 높게 평가 될 것입니다. 설명서가 작동하지 않는 것 같습니다. 감사. – snihalani