【问题标题】:Eclipse C++ & CMake Compile Error in Fedora 20Fedora 20 中的 Eclipse C++ 和 CMake 编译错误
【发布时间】:2015-03-27 07:06:32
【问题描述】:

我想知道是否有人可以帮助我。我尝试通过 Eclipse C++ 用 CMake 编译应用程序。但是,我收到如下错误消息。似乎 CMake 找不到 libicuuc.so.50。如何将它们链接到 Eclipse?或任何建议和建议都将受到高度赞赏。

我的操作系统是Linux Fedora 20

=========================================================

     CMAKE generated file: DO NOT EDIT!
 Generated by "Unix Makefiles" Generator, CMake Version 2.8

 Default target executed when no arguments are given to make.
default_target: all
.PHONY : default_target

=============================================================================
 Special targets provided by cmake.

 Disable implicit rules so canonical targets will work.
.SUFFIXES:

 Remove some rules from gmake that .SUFFIXES does not remove.
SUFFIXES =

.SUFFIXES: .hpux_make_needs_suffix_list

 Produce verbose output by default.
VERBOSE = 1

 Suppress display of executed commands.
$(VERBOSE).SILENT:

 A target that is always out of date.
cmake_force:
.PHONY : cmake_force

=============================================================================
 Set environment variables for the build.

 The shell in which to execute make rules.
SHELL = /bin/sh

 The CMake executable.
CMAKE_COMMAND = /usr/bin/cmake

 The command to remove a file.
RM = /usr/bin/cmake -E remove -f

 Escaping for special characters.
EQUALS = =

 The program to use to edit the cache.
CMAKE_EDIT_COMMAND = /usr/bin/cmake-gui

 The top-level source directory on which CMake was run.
CMAKE_SOURCE_DIR = /run/media/cooldean/SDCard/Application/jedox5/SourceForge/palo-code/molap/server/5.1

 The top-level build directory on which CMake was run.
CMAKE_BINARY_DIR = /run/media/cooldean/SDCard/Application/jedox5/SourceCode/Linux64Bit

ICU_CONFIG_EXECUTABLE =/usr/bin/icu-config


=============================================================================
 Targets provided globally by CMake.

 Special rule for the target edit_cache
edit_cache:
    @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake cache editor..."
    /usr/bin/cmake-gui -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
.PHONY : edit_cache

 Special rule for the target edit_cache
edit_cache/fast: edit_cache
.PHONY : edit_cache/fast

 Special rule for the target install
install: preinstall
    @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..."
    /usr/bin/cmake -P cmake_install.cmake
.PHONY : install

 Special rule for the target install
install/fast: preinstall/fast
    @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..."
    /usr/bin/cmake -P cmake_install.cmake
.PHONY : install/fast

 Special rule for the target install/local
install/local: preinstall
    @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..."
    /usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake
.PHONY : install/local

 Special rule for the target install/local
install/local/fast: install/local
.PHONY : install/local/fast

 Special rule for the target install/strip
install/strip: preinstall
    @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..."
    /usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake
.PHONY : install/strip

 Special rule for the target install/strip
install/strip/fast: install/strip
.PHONY : install/strip/fast

 Special rule for the target list_install_components
list_install_components:
    @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Available install components are: \"Unspecified\""
.PHONY : list_install_components

 Special rule for the target list_install_components
list_install_components/fast: list_install_components
.PHONY : list_install_components/fast

 Special rule for the target package
package: preinstall
    @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Run CPack packaging tool..."
    /usr/bin/cpack --config ./CPackConfig.cmake
.PHONY : package

 Special rule for the target package
package/fast: package
.PHONY : package/fast

 Special rule for the target package_source
package_source:
    @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Run CPack packaging tool for source..."
    /usr/bin/cpack --config ./CPackSourceConfig.cmake /run/media/cooldean/SDCard/Application/jedox5/SourceCode/Linux64Bit/CPackSourceConfig.cmake
.PHONY : package_source

 Special rule for the target package_source
package_source/fast: package_source
.PHONY : package_source/fast

 Special rule for the target rebuild_cache
rebuild_cache:
    @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..."
    /usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
.PHONY : rebuild_cache

 Special rule for the target rebuild_cache
rebuild_cache/fast: rebuild_cache
.PHONY : rebuild_cache/fast

 The main all target
all: cmake_check_build_system
    $(CMAKE_COMMAND) -E cmake_progress_start /run/media/cooldean/SDCard/Application/jedox5/SourceCode/Linux64Bit/CMakeFiles /run/media/cooldean/SDCard/Application/jedox5/SourceCode/Linux64Bit/CMakeFiles/progress.marks
    $(MAKE) -f CMakeFiles/Makefile2 all
    $(CMAKE_COMMAND) -E cmake_progress_start /run/media/cooldean/SDCard/Application/jedox5/SourceCode/Linux64Bit/CMakeFiles 0
.PHONY : all

 The main clean target
clean:
    $(MAKE) -f CMakeFiles/Makefile2 clean
.PHONY : clean

 The main clean target
clean/fast: clean
.PHONY : clean/fast

 Prepare targets for installation.
preinstall: all
    $(MAKE) -f CMakeFiles/Makefile2 preinstall
.PHONY : preinstall

 Prepare targets for installation.
preinstall/fast:
    $(MAKE) -f CMakeFiles/Makefile2 preinstall
.PHONY : preinstall/fast

 clear depends
depend:
    $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1
.PHONY : depend

=============================================================================
 Target rules for targets named clean.https.palo

【问题讨论】:

    标签: c++ eclipse cmake


    【解决方案1】:

    在你的 CMakeLists.txt 中添加对 icuuc 的依赖

    target_link_libraries(<your_exectuable_target> icuuc)
    

    【讨论】:

    • 你能给我举个例子吗?我对 C++ 和 Cmake 不太熟悉。很抱歉给您带来不便。
    • 如果你放一个原始代码的简约示例(CMakeLists.txt),我会更准确
    • 我已经粘贴了上面的部分代码。我想知道您是否可以给我一些建议。
    • 请发布您的 CMakeLists 的内容,而不是生成的 Makefile
    猜你喜欢
    • 2014-12-10
    • 1970-01-01
    • 1970-01-01
    • 2017-06-06
    • 2014-02-03
    • 2015-01-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多