Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Compiling tests and examples fails on OS X due to "missing" librt #261

Closed
Assignees
deanberris
Milestone
@kliron

Description

@kliron

Hi,
I'm trying to build cpp-netlib v 0.10.0 on OS X 10.8.4. The linker fails to find librt (which is linux specific and doesn't exist on OS X). Editing out the 'rt' in alltarget_link_libraries directives in all CMakeList.txt files corrects the error and the build finishes successfully.

Here is the output of make:

Linking CXX executable ../../../example/fileservercd /Users/kliron/Downloads/cpp-netlib-0.10.0/libs/network/example && /opt/local/bin/cmake -E cmake_link_script CMakeFiles/fileserver.dir/link.txt --verbose=1/usr/bin/clang++   -g -Wl,-search_paths_first -Wl,-headerpad_max_install_names   CMakeFiles/fileserver.dir/http/fileserver.cpp.o  -o ../../../example/fileserver  /opt/local/lib/libboost_thread-mt.a /opt/local/lib/libboost_system-mt.a /opt/local/lib/libboost_date_time-mt.a /opt/local/lib/libboost_program_options-mt.a /opt/local/lib/libboost_filesystem-mt.a /opt/local/lib/libboost_chrono-mt.a /opt/local/lib/libboost_filesystem-mt.a ../src/libcppnetlib-server-parsers.a -lrt /opt/local/lib/libboost_chrono-mt.a -lrt ld: library not found for -lrtclang: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: *** [example/fileserver] Error 1make[1]: *** [libs/network/example/CMakeFiles/fileserver.dir/all] Error 2make: *** [all] Error 2

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp