I have a problem with cmake after I installed a new SDK 10 version (now it should be 10.0.10586.0). But when I run cmake cmakelists.txt, I got this error message:
-- Building for: Visual Studio 14 2015
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:2 (project):
No CMAKE_C_COMPILER could be found.
I googled a while but could not find the right answer. My problem is that I can use VS2015 to build my application (old projects) using the new SDK. Everything seems to be fine. But cmake will try to build one small generated project (CompilerIdCXX.vcxproj). But in this project, SDK 8 is used (which is not available in my system anymore).
Could you help me, many thanks in advance
Problem solved (sorta of), I have to reinstall an older version of SDK10 aside from the version 10.0.10586.0. It is weird that uninstalling the older version had somehow damaged the environment.
Related
I am just getting started with C++ and CLion IDE. I got this error after watching a YouTube video that showed how to get started on CLion. All I did was try to add GCC to CLion as the compiler for C++. Nothing else at all.
I have GCC version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)
I've only been programming for about 3 months on HTML CSS & JS so this error is way over my head. Any help would be greatly appreciated!
Below is my error and a link to a screenshot
-- The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:2 (project):
The CMAKE_CXX_COMPILER:
GCC
is not a full path and was not found in the PATH.
Tell CMake where to find the compiler by setting either the environment
variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
to the compiler, or to the compiler name if it is in the PATH.
-- Configuring incomplete, errors occurred!
See also "/home/dominic/CLionProjects/untitled1/cmake-build-debug/CMakeFiles/CMakeOutput.log".
See also "/home/dominic/CLionProjects/untitled1/cmake-build-debug/CMakeFiles/CMakeError.log".
[Failed to reload]
Cmake List
Use full path to compiler or add the gcc path to PATH if you want to used just gcc.
I guess that if you specify C compiler as /usr/bin/gcc (or /usr/local/bin/gcc if you installed it there) and C++ compiler as /usr/bin/g++ in Preferences | Build, Execution, Deployment | Toolchains everything should work.
Mind that Linux is case-sensitive OS and GCC executable is gcc.
I am relatively new to coding in C++ and using CMake. I have been writing code using CLion IDE on ubuntu 16.04. I had written a library, with an older version of CMake (I believe it was version 3.4) which came bundled with CLion and for an unrelated reason needed to update to version 3.15. Which I assume I must have done incorrectly.
When reloading Cmake projects that previously ran fine, I get the following error message:
Found Qt4: /usr/bin/qmake (found version "4.8.7")
CMake Error at cmake-build-debug/_deps/eigen-src/cmake/language_support.cmake:33 (file):
file failed to open for writing (Permission denied):
/home/majed/CLionProjects/TwoLink_manip/cmake-build-debug/language_tests/Fortran/CMakeLists.txt
Call Stack (most recent call first):
cmake-build-debug/_deps/eigen-src/test/CMakeLists.txt:19 (workaround_9220)
I have looked through a numeber of Cmake questions which I thought could be related to my issue but none of them seemed to address this specific issue. I am not very familiar with the Cmake installation and setup and simply followed a youtube tutorial to install the latest release(cmake-3.15.5-Linux-x86_64.sh)from the cmake.org site.
I should point out that CMake does work when I run ROS packages from the terminal which is why I am apprehensive about re-installing everything. I am assuming the issue is related to where the cmake file is installed but not sure how to fix this issue with CLion. I would appreciate any and all suggestions.
I have also tried to export CMAKE_ROOT to the locaton of the new cmake folder but it doesn't really have any effect.
I'm trying to run this code:
https://github.com/snukky/news-translit-nmt
I've installed boost and got the following messages:
The Boost C++ Libraries were successfully built!
The following directory should be added to compiler include paths:
C:\Program Files\boost\boost_1_67_0
The following directory should be added to linker library paths:
C:\Program Files\boost\boost_1_67_0\stage\lib
By the comment of #kenba I've added the following environment variables:
Try 1
When I try to run the following cmd:
cmake .. -DCMAKE_BUILD_TYPE=Release
I get:
-- Could NOT find Boost (missing: timer iostreams filesystem system chrono) (found version "1.67.0")
CMake Error at CMakeLists.txt:290 (message):
Cannot find Boost libraries. Terminating.
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
-- Configuring incomplete, errors occurred!
See also "D:/ThesisResources/previous_works/news-translit-nmt-master/tools/marian-dev/build/CMakeFiles/CMakeOutput.log".
Try 2
When I try to give a custom boost by this ref
https://marian-nmt.github.io/docs/#custom-boost:
I run the following cmd:
cmake .. -DBOOST_ROOT="C:\Program Files\boost\boost_1_67_0"
I get the same error.
I've also tried working with Linux WSL (But problems with CUDA installation overthere, their team is working on it), Linux VirtualBox (Not enough resources), and Ubuntu 17.10 I have installed (But Cuda requires Ubuntu 16.04 / 18.04)
What am I missing here? I'm trying any suggestion, stuck on it for a few days. Thanks!
Edit:
I reinstalled Ubuntu 16.04 and the problem was solved. Still don't know how to solve it in windows, but i'll continue use Ubuntu 16.04.
I had this problem earlier while trying to build the Windows version of Marian NMT (the same component that you're having trouble with). I can't remember the exact steps to solve the problem, but the root cause is that the Marian NMT build for Windows does not work with newer versions of Boost, since the source code uses some deprecated calling conventions for timer and chrono libraries (maybe some others as well).
The error message kind of confirms this: it can't find Boost, but on the other hand it says it finds your version 1.67.0. The solution is to use an older version of boost, I've confirmed that it works with 1.60.0.
If you just require a Marian NMT decoder that works in Windows, a project I work on has released a plugin for the Trados Studio translation tool, which contains a compiled marian-decoder executable for Windows: https://object.pouta.csc.fi/fiskmo/TradosStudio/FiskmoTranslationProvider.sdlplugin. You can access the executable by unzipping the sdlplugin file, the StartMtPipe.bat shows how to use the decoder.
I am trying to install on my windows desktop, a software suite called NUPACK which is used to design nucleic acid reaction pathways. http://www.nupack.org/
This software requires CMake to install, and from my understanding, CMake does not have compilers by itself, and requires us to have compilers separately installed. As such, I downloaded MinGW to use as a C++ compiler. Prior to running, I have set the environment variables of both CMake and MinGW's bin. I am running CMake (version 3.11.1) through the command prompt but I keep encountering the following problem:
C:\Users\Nicholas\Documents\nupack\build>Cmake -DCMAKE_INSTALL_PREFIX=NUPACKINSTALL -G "MinGW Makefiles" ..
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
-- Check for working C compiler: C:/MinGW/bin/gcc.exe
-- Check for working C compiler: C:/MinGW/bin/gcc.exe -- broken
CMake Error at C:/Program Files/CMake/share/cmake-
3.11/Modules/CMakeTestCCompiler.cmake:52 (message):
The C compiler
"C:/MinGW/bin/gcc.exe"
is not able to compile a simple test program.
I'm guessing CMake cannot identify my MinGW gcc and gcc++ compilers somehow. I tried the following next, but the same error arose.
set CMAKE_C_COMPILER=%C:\mingw\bin\gcc%
set CMAKE_CXX_COMPILER=%C:\mingw\bin\g++%
Has anyone encountered the same problem? Can this be resolved by using MinGW64? I am using Windows 10 and previously, I tried using visual studio 2017's compilers, but it had its on set of problems too.
Yes, the problem is that CMake cannot find GCC compiler. Before be sure that g++ and gcc are installed. It can be MinGW64 or Cygwin.
There are at least three ways to link GCC compiler.
1st way:
Set compilers in CMakeLists.txt:
set(CMAKE_C_COMPILER C:\path\to\gcc.exe)
set(CMAKE_CXX_COMPILER C:\path\to\g++.exe)
2nd way:
When calling cmake in terminal or cmd:
cmake -DCMAKE_C_COMPILER="C:\path\to\gcc.exe" -DCMAKE_CXX_COMPILER="C:\path\to\g++.exe"
3rd way:
Set as environment variable:
Go to Windows "Environment Variables" and add to PATH this:
;C:\path_to_MinGW_or_Cygwin\bin
I had similar problem.
My Setup was : VSCode (Windows 10) + GCC 9.2xx + CMake 3.18.2
Environment variables were already set to point to GCC and CMake.
This Worked: https://stackoverflow.com/a/4101496/2865353
Needs to cleanup CMakeCache.txt and CMakeFiles directory.
Erros it fixed are:
-- Building for: NMake Makefiles
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:3 (project):
The CMAKE_C_COMPILER:
cl
is not a full path and was not found in the PATH.
CMake Error at CMakeLists.txt:3 (project):
The CMAKE_CXX_COMPILER:
cl
is not a full path and was not found in the PATH.
i am trying to build aam-opencv following the brief tutorial from the sources website here . I keep recieveing the error:
-- Configuring incomplete, errors occurred!
C:\aam-opencv\build>cmake ..
-- The C compiler identification is MSVC 17.0.61030.0
-- The CXX compiler identification is MSVC 17.0.61030.0
CMake Error at cmake/modules/FindOpenCV.cmake:239 (MESSAGE):
OpenCV required but some headers or libs not found. Please specify it's
location with OpenCV_ROOT_DIR env. variable.
Call Stack (most recent call first):
CMakeLists.txt:48 (FIND_PACKAGE)
-- Configuring incomplete, errors occurred!
I have tried using the variable OpenCV_ROOT_DIR="c:\opencv-2.4.9\opencv\build, but that also produced the same error.
Any help would be much appreciated!
I hope someone else will find my answer helpful. After about a week of searching I came across a brief tutorial online. Doing this made it possible. (Although getting the application to run, requires some debugging to let it work with windows)
If you want to without cygwin but with Visual C++, you need following:
1) CMake 2.6 or later
2) OpenCV Ver 1.0 <- The OpenCV Version is Crucial in this tutorial
3) Qt 2.6.1 or later
1) CMake
download cmake from http://www.cmake.org/files/v2.8/cmake-2.8.2-win32-x86.exe
install with default option
2) OpenCV ver. 1.0
download from http://sourceforge.net/projects/opencvlibrary/files/opencv-win/1.0/OpenCV_1.0.exe/download
install with default option.
3) Qt 4.6.3
download Qt for Open Source C++ development on Windows (VS2008) from http://qt.nokia.com/downloads/windows-cpp-vs2008
Build:
set System Environment variable OpenCV_ROOT_DIR to C:\Program Files\OpenCV
Download aam-opencv.rar from attached to this article.
Extract aam-opencv.rar to somewhere you want (e.g. D:\Project \aam)
Open D:\Project\aam\aam-opencv\src\opencvWebcam.cpp
modify line 51
If you want to use movie file, specify your movie file path.
Note that you have to specify path using \ as path separator.
If you want to use webcam, comment line 51 and uncomment line 52.
run CMake gui
Select for "D:\Project\aam\aam-opencv" as "Where is the source folder" option
Select for "D:\Project\aam\aam-opencv\build" as "Where to build the binaries" option
Click "Configure" button
Then, You will see generator option.
Select "Visual Studio 9 2008"
if needed,select C:\Program Files\Microsoft Visual Studio 9.0\VC\bin\cl.exe as c compiler and cxx compiler.
Click "Generate" button.
Then, You can see D:\Project\aam\aam-opencv\build\AAM.sln
Open D:\Project\aam\aam-opencv\build\AAM.sln with your Visual C++
Build Solution.
Congratulations!
Now you can run q-aamtrainer.exe from VC ++ menu, select Debug -> Start Debugging by selecting D:\Project\aam\aam-opencv\build\Debug\qt-aamtrainer.exe
NOTE: After I complete debugging and get this application working i will link or update to my answer, keep posted!
UPDATE I was not able to get it to run on windows, if anyone has a solution, comment or link to the answer.