当我遇到以下错误时,我试图编译我的代码。 我正在尝试用cmake编译。
我在论坛上搜索了类似的错误..但我找不到具体的以下错误。 我在论坛问题中发现了其他图书馆问题。
错误:
/usr/bin/ld: cannot find -lui
/usr/bin/ld: cannot find -lmodelcommands
/usr/bin/ld: cannot find -lmodel
collect2: ld returned 1 exit status
我尝试安装“sudo apt-get install lib32z1-dev”。但没有解决方案。我另外还有“lmodelcommands& lmodel”错误。
如果有人遇到类似错误,请向我建议解决方案。
Makefile包含:
# 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 canoncical targets will work.
.SUFFIXES:
# Remove some rules from gmake that .SUFFIXES does not remove.
SUFFIXES =
.SUFFIXES: .hpux_make_needs_suffix_list
# 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
# The program to use to edit the cache.
CMAKE_EDIT_COMMAND = /usr/bin/ccmake
# The top-level source directory on which CMake was run.
CMAKE_SOURCE_DIR = /home/pvadhana/Desktop/stpproject
# The top-level build directory on which CMake was run.
CMAKE_BINARY_DIR = /home/pvadhana/Desktop/stpproject/build
#=============================================================================
# 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/ccmake -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 /home/pvadhana/Desktop/stpproject/build/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
# Special rule for the target test
test:
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running tests..."
/usr/bin/ctest --force-new-ctest-process $(ARGS)
.PHONY : test
# Special rule for the target test
test/fast: test
.PHONY : test/fast
# The main all target
all: cmake_check_build_system
$(CMAKE_COMMAND) -E cmake_progress_start /home/pvadhana/Desktop/stpproject/build/CMakeFiles /home/pvadhana/Desktop/stpproject/build/CMakeFiles/progress.marks
$(MAKE) -f CMakeFiles/Makefile2 all
$(CMAKE_COMMAND) -E cmake_progress_start /home/pvadhana/Desktop/stpproject/build/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 Continuous
# Build rule for target.
Continuous: cmake_check_build_system
$(MAKE) -f CMakeFiles/Makefile2 Continuous
.PHONY : Continuous
# fast build rule for target.
Continuous/fast:
$(MAKE) -f CMakeFiles/Continuous.dir/build.make CMakeFiles/Continuous.dir/build
.PHONY : Continuous/fast
#=============================================================================
# Target rules for targets named ContinuousBuild
# Build rule for target.
ContinuousBuild: cmake_check_build_system
$(MAKE) -f CMakeFiles/Makefile2 ContinuousBuild
.PHONY : ContinuousBuild
# fast build rule for target.
ContinuousBuild/fast:
$(MAKE) -f CMakeFiles/ContinuousBuild.dir/build.make CMakeFiles/ContinuousBuild.dir/build
.PHONY : ContinuousBuild/fast
#=============================================================================
# Target rules for targets named ContinuousConfigure
# Build rule for target.
ContinuousConfigure: cmake_check_build_system
$(MAKE) -f CMakeFiles/Makefile2 ContinuousConfigure
.PHONY : ContinuousConfigure
# fast build rule for target.
ContinuousConfigure/fast:
$(MAKE) -f CMakeFiles/ContinuousConfigure.dir/build.make CMakeFiles/ContinuousConfigure.dir/build
.PHONY : ContinuousConfigure/fast
#=============================================================================
# Target rules for targets named ContinuousCoverage
# Build rule for target.
ContinuousCoverage: cmake_check_build_system
$(MAKE) -f CMakeFiles/Makefile2 ContinuousCoverage
.PHONY : ContinuousCoverage
# fast build rule for target.
ContinuousCoverage/fast:
$(MAKE) -f CMakeFiles/ContinuousCoverage.dir/build.make CMakeFiles/ContinuousCoverage.dir/build
.PHONY : ContinuousCoverage/fast
#=============================================================================
# Target rules for targets named ContinuousMemCheck
# Build rule for target.
ContinuousMemCheck: cmake_check_build_system
$(MAKE) -f CMakeFiles/Makefile2 ContinuousMemCheck
.PHONY : ContinuousMemCheck
# fast build rule for target.
ContinuousMemCheck/fast:
$(MAKE) -f CMakeFiles/ContinuousMemCheck.dir/build.make CMakeFiles/ContinuousMemCheck.dir/build
.PHONY : ContinuousMemCheck/fast
#=============================================================================
# Target rules for targets named ContinuousStart
# Build rule for target.
ContinuousStart: cmake_check_build_system
$(MAKE) -f CMakeFiles/Makefile2 ContinuousStart
.PHONY : ContinuousStart
# fast build rule for target.
ContinuousStart/fast:
$(MAKE) -f CMakeFiles/ContinuousStart.dir/build.make CMakeFiles/ContinuousStart.dir/build
.PHONY : ContinuousStart/fast
#=============================================================================
# Target rules for targets named ContinuousSubmit
# Build rule for target.
ContinuousSubmit: cmake_check_build_system
$(MAKE) -f CMakeFiles/Makefile2 ContinuousSubmit
.PHONY : ContinuousSubmit
# fast build rule for target.
ContinuousSubmit/fast:
$(MAKE) -f CMakeFiles/ContinuousSubmit.dir/build.make CMakeFiles/ContinuousSubmit.dir/build
.PHONY : ContinuousSubmit/fast
#=============================================================================
# Target rules for targets named ContinuousTest
# Build rule for target.
ContinuousTest: cmake_check_build_system
$(MAKE) -f CMakeFiles/Makefile2 ContinuousTest
.PHONY : ContinuousTest
# fast build rule for target.
ContinuousTest/fast:
$(MAKE) -f CMakeFiles/ContinuousTest.dir/build.make CMakeFiles/ContinuousTest.dir/build
.PHONY : ContinuousTest/fast
#=============================================================================
# Target rules for targets named ContinuousUpdate
# Build rule for target.
ContinuousUpdate: cmake_check_build_system
$(MAKE) -f CMakeFiles/Makefile2 ContinuousUpdate
.PHONY : ContinuousUpdate
# fast build rule for target.
ContinuousUpdate/fast:
$(MAKE) -f CMakeFiles/ContinuousUpdate.dir/build.make CMakeFiles/ContinuousUpdate.dir/build
.PHONY : ContinuousUpdate/fast
#=============================================================================
# Target rules for targets named Experimental
# Build rule for target.
Experimental: cmake_check_build_system
$(MAKE) -f CMakeFiles/Makefile2 Experimental
.PHONY : Experimental
# fast build rule for target.
Experimental/fast:
$(MAKE) -f CMakeFiles/Experimental.dir/build.make CMakeFiles/Experimental.dir/build
.PHONY : Experimental/fast
#=============================================================================
# Target rules for targets named ExperimentalBuild
# Build rule for target.
ExperimentalBuild: cmake_check_build_system
$(MAKE) -f CMakeFiles/Makefile2 ExperimentalBuild
.PHONY : ExperimentalBuild
# fast build rule for target.
ExperimentalBuild/fast:
$(MAKE) -f CMakeFiles/ExperimentalBuild.dir/build.make CMakeFiles/ExperimentalBuild.dir/build
.PHONY : ExperimentalBuild/fast
#=============================================================================
# Target rules for targets named ExperimentalConfigure
# Build rule for target.
ExperimentalConfigure: cmake_check_build_system
$(MAKE) -f CMakeFiles/Makefile2 ExperimentalConfigure
.PHONY : ExperimentalConfigure
# fast build rule for target.
ExperimentalConfigure/fast:
$(MAKE) -f CMakeFiles/ExperimentalConfigure.dir/build.make CMakeFiles/ExperimentalConfigure.dir/build
.PHONY : ExperimentalConfigure/fast
#=============================================================================
# Target rules for targets named ExperimentalCoverage
# Build rule for target.
ExperimentalCoverage: cmake_check_build_system
$(MAKE) -f CMakeFiles/Makefile2 ExperimentalCoverage
.PHONY : ExperimentalCoverage
# fast build rule for target.
ExperimentalCoverage/fast:
$(MAKE) -f CMakeFiles/ExperimentalCoverage.dir/build.make CMakeFiles/ExperimentalCoverage.dir/build
.PHONY : ExperimentalCoverage/fast
#=============================================================================
# Target rules for targets named ExperimentalMemCheck
# Build rule for target.
ExperimentalMemCheck: cmake_check_build_system
$(MAKE) -f CMakeFiles/Makefile2 ExperimentalMemCheck
.PHONY : ExperimentalMemCheck
# fast build rule for target.
ExperimentalMemCheck/fast:
$(MAKE) -f CMakeFiles/ExperimentalMemCheck.dir/build.make CMakeFiles/ExperimentalMemCheck.dir/build
.PHONY : ExperimentalMemCheck/fast
#=============================================================================
# Target rules for targets named ExperimentalStart
# Build rule for target.
ExperimentalStart: cmake_check_build_system
$(MAKE) -f CMakeFiles/Makefile2 ExperimentalStart
.PHONY : ExperimentalStart
# fast build rule for target.
ExperimentalStart/fast:
$(MAKE) -f CMakeFiles/ExperimentalStart.dir/build.make CMakeFiles/ExperimentalStart.dir/build
.PHONY : ExperimentalStart/fast
#=============================================================================
# Target rules for targets named ExperimentalSubmit
# Build rule for target.
ExperimentalSubmit: cmake_check_build_system
$(MAKE) -f CMakeFiles/Makefile2 ExperimentalSubmit
.PHONY : ExperimentalSubmit
# fast build rule for target.
ExperimentalSubmit/fast:
$(MAKE) -f CMakeFiles/ExperimentalSubmit.dir/build.make CMakeFiles/ExperimentalSubmit.dir/build
.PHONY : ExperimentalSubmit/fast
#=============================================================================
# Target rules for targets named ExperimentalTest
# Build rule for target.
ExperimentalTest: cmake_check_build_system
$(MAKE) -f CMakeFiles/Makefile2 ExperimentalTest
.PHONY : ExperimentalTest
# fast build rule for target.
ExperimentalTest/fast:
$(MAKE) -f CMakeFiles/ExperimentalTest.dir/build.make CMakeFiles/ExperimentalTest.dir/build
.PHONY : ExperimentalTest/fast
#=============================================================================
# Target rules for targets named ExperimentalUpdate
# Build rule for target.
ExperimentalUpdate: cmake_check_build_system
$(MAKE) -f CMakeFiles/Makefile2 ExperimentalUpdate
.PHONY : ExperimentalUpdate
# fast build rule for target.
ExperimentalUpdate/fast:
$(MAKE) -f CMakeFiles/ExperimentalUpdate.dir/build.make CMakeFiles/ExperimentalUpdate.dir/build
.PHONY : ExperimentalUpdate/fast
#=============================================================================
# Target rules for targets named Nightly
# Build rule for target.
Nightly: cmake_check_build_system
$(MAKE) -f CMakeFiles/Makefile2 Nightly
.PHONY : Nightly
# fast build rule for target.
Nightly/fast:
$(MAKE) -f CMakeFiles/Nightly.dir/build.make CMakeFiles/Nightly.dir/build
.PHONY : Nightly/fast
#=============================================================================
# Target rules for targets named NightlyBuild
# Build rule for target.
NightlyBuild: cmake_check_build_system
$(MAKE) -f CMakeFiles/Makefile2 NightlyBuild
.PHONY : NightlyBuild
# fast build rule for target.
NightlyBuild/fast:
$(MAKE) -f CMakeFiles/NightlyBuild.dir/build.make CMakeFiles/NightlyBuild.dir/build
.PHONY : NightlyBuild/fast
#=============================================================================
# Target rules for targets named NightlyConfigure
# Build rule for target.
NightlyConfigure: cmake_check_build_system
$(MAKE) -f CMakeFiles/Makefile2 NightlyConfigure
.PHONY : NightlyConfigure
# fast build rule for target.
NightlyConfigure/fast:
$(MAKE) -f CMakeFiles/NightlyConfigure.dir/build.make CMakeFiles/NightlyConfigure.dir/build
.PHONY : NightlyConfigure/fast
#=============================================================================
# Target rules for targets named NightlyCoverage
# Build rule for target.
NightlyCoverage: cmake_check_build_system
$(MAKE) -f CMakeFiles/Makefile2 NightlyCoverage
.PHONY : NightlyCoverage
# fast build rule for target.
NightlyCoverage/fast:
$(MAKE) -f CMakeFiles/NightlyCoverage.dir/build.make CMakeFiles/NightlyCoverage.dir/build
.PHONY : NightlyCoverage/fast
#=============================================================================
# Target rules for targets named NightlyMemCheck
# Build rule for target.
NightlyMemCheck: cmake_check_build_system
$(MAKE) -f CMakeFiles/Makefile2 NightlyMemCheck
.PHONY : NightlyMemCheck
# fast build rule for target.
NightlyMemCheck/fast:
$(MAKE) -f CMakeFiles/NightlyMemCheck.dir/build.make CMakeFiles/NightlyMemCheck.dir/build
.PHONY : NightlyMemCheck/fast
#=============================================================================
# Target rules for targets named NightlyMemoryCheck
# Build rule for target.
NightlyMemoryCheck: cmake_check_build_system
$(MAKE) -f CMakeFiles/Makefile2 NightlyMemoryCheck
.PHONY : NightlyMemoryCheck
# fast build rule for target.
NightlyMemoryCheck/fast:
$(MAKE) -f CMakeFiles/NightlyMemoryCheck.dir/build.make CMakeFiles/NightlyMemoryCheck.dir/build
.PHONY : NightlyMemoryCheck/fast
#=============================================================================
# Target rules for targets named NightlyStart
# Build rule for target.
NightlyStart: cmake_check_build_system
$(MAKE) -f CMakeFiles/Makefile2 NightlyStart
.PHONY : NightlyStart
# fast build rule for target.
NightlyStart/fast:
$(MAKE) -f CMakeFiles/NightlyStart.dir/build.make CMakeFiles/NightlyStart.dir/build
.PHONY : NightlyStart/fast
#=============================================================================
# Target rules for targets named NightlySubmit
# Build rule for target.
NightlySubmit: cmake_check_build_system
$(MAKE) -f CMakeFiles/Makefile2 NightlySubmit
.PHONY : NightlySubmit
# fast build rule for target.
NightlySubmit/fast:
$(MAKE) -f CMakeFiles/NightlySubmit.dir/build.make CMakeFiles/NightlySubmit.dir/build
.PHONY : NightlySubmit/fast
#=============================================================================
# Target rules for targets named NightlyTest
# Build rule for target.
NightlyTest: cmake_check_build_system
$(MAKE) -f CMakeFiles/Makefile2 NightlyTest
.PHONY : NightlyTest
# fast build rule for target.
NightlyTest/fast:
$(MAKE) -f CMakeFiles/NightlyTest.dir/build.make CMakeFiles/NightlyTest.dir/build
.PHONY : NightlyTest/fast
#=============================================================================
# Target rules for targets named NightlyUpdate
# Build rule for target.
NightlyUpdate: cmake_check_build_system
$(MAKE) -f CMakeFiles/Makefile2 NightlyUpdate
.PHONY : NightlyUpdate
# fast build rule for target.
NightlyUpdate/fast:
$(MAKE) -f CMakeFiles/NightlyUpdate.dir/build.make CMakeFiles/NightlyUpdate.dir/build
.PHONY : NightlyUpdate/fast
#=============================================================================
# Target rules for targets named stpproject
# Build rule for target.
stpproject: cmake_check_build_system
$(MAKE) -f CMakeFiles/Makefile2 stpproject
.PHONY : stpproject
# fast build rule for target.
stpproject/fast:
$(MAKE) -f source/CMakeFiles/stpproject.dir/build.make source/CMakeFiles/stpproject.dir/build
.PHONY : stpproject/fast
# Help Target
help:
@echo "The following are some of the valid targets for this Makefile:"
@echo "... all (the default if no target is provided)"
@echo "... clean"
@echo "... depend"
@echo "... Continuous"
@echo "... ContinuousBuild"
@echo "... ContinuousConfigure"
@echo "... ContinuousCoverage"
@echo "... ContinuousMemCheck"
@echo "... ContinuousStart"
@echo "... ContinuousSubmit"
@echo "... ContinuousTest"
@echo "... ContinuousUpdate"
@echo "... Experimental"
@echo "... ExperimentalBuild"
@echo "... ExperimentalConfigure"
@echo "... ExperimentalCoverage"
@echo "... ExperimentalMemCheck"
@echo "... ExperimentalStart"
@echo "... ExperimentalSubmit"
@echo "... ExperimentalTest"
@echo "... ExperimentalUpdate"
@echo "... Nightly"
@echo "... NightlyBuild"
@echo "... NightlyConfigure"
@echo "... NightlyCoverage"
@echo "... NightlyMemCheck"
@echo "... NightlyMemoryCheck"
@echo "... NightlyStart"
@echo "... NightlySubmit"
@echo "... NightlyTest"
@echo "... NightlyUpdate"
@echo "... edit_cache"
@echo "... install"
@echo "... install/local"
@echo "... install/strip"
@echo "... list_install_components"
@echo "... package"
@echo "... package_source"
@echo "... rebuild_cache"
@echo "... test"
@echo "... stpproject"
.PHONY : help
#=============================================================================
# Special targets to cleanup operation of make.
# Special rule to run CMake to check the build system integrity.
# No rule that depends on this can have commands that come from listfiles
# because they might be regenerated.
cmake_check_build_system:
$(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
.PHONY : cmake_check_build_system
=============================================== ===
CMakeCCompiler.cmake文件包含:
SET(CMAKE_C_COMPILER "/usr/bin/gcc")
SET(CMAKE_C_COMPILER_ARG1 "")
SET(CMAKE_C_COMPILER_ID "GNU")
SET(CMAKE_C_PLATFORM_ID "Linux")
SET(CMAKE_AR "/usr/bin/ar")
SET(CMAKE_RANLIB "/usr/bin/ranlib")
SET(CMAKE_LINKER "/usr/bin/ld")
SET(CMAKE_COMPILER_IS_GNUCC 1)
SET(CMAKE_C_COMPILER_LOADED 1)
SET(CMAKE_COMPILER_IS_MINGW )
SET(CMAKE_COMPILER_IS_CYGWIN )
IF(CMAKE_COMPILER_IS_CYGWIN)
SET(CYGWIN 1)
SET(UNIX 1)
ENDIF(CMAKE_COMPILER_IS_CYGWIN)
SET(CMAKE_C_COMPILER_ENV_VAR "CC")
IF(CMAKE_COMPILER_IS_MINGW)
SET(MINGW 1)
ENDIF(CMAKE_COMPILER_IS_MINGW)
SET(CMAKE_C_COMPILER_ID_RUN 1)
SET(CMAKE_C_SOURCE_FILE_EXTENSIONS c)
SET(CMAKE_C_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC)
SET(CMAKE_C_LINKER_PREFERENCE 10)
# Save compiler ABI information.
SET(CMAKE_C_SIZEOF_DATA_PTR "")
SET(CMAKE_C_COMPILER_ABI "")
IF(CMAKE_C_SIZEOF_DATA_PTR)
SET(CMAKE_SIZEOF_VOID_P "${CMAKE_C_SIZEOF_DATA_PTR}")
ENDIF(CMAKE_C_SIZEOF_DATA_PTR)
IF(CMAKE_C_COMPILER_ABI)
SET(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_C_COMPILER_ABI}")
ENDIF(CMAKE_C_COMPILER_ABI)
SET(CMAKE_C_HAS_ISYSROOT "")
SET(CMAKE_C_IMPLICIT_LINK_LIBRARIES "")
SET(CMAKE_C_IMPLICIT_LINK_DIRECTORIES "")
=============================================== ===================
谢谢!