Clion cmake in ubuntu 18.04 - c++

I've seen this one over and over but every answer that was given before didn't help me.
I downloaded clion and cmake, and updated gcc.
When manualy using gcc/g++ the code is compiling.
from the clion's cmake I keep getting:
CMake Error at /home/dm/Downloads/CLion-2018.1.4/clion-2018.1.4/bin/cmake/share/cmake-3.10/Modules/CMakeTestCCompiler.cmake:52 (message):
The C compiler
"/usr/bin/gcc"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: /home/dm/CLionProjects/TheTestingGrounds/cmake-build-default/CMakeFiles/CMakeTmp
Run Build Command:"/usr/local/bin/cmake" "cmTC_9582b/fast"
CMake Error: The source directory "/home/dm/CLionProjects/TheTestingGrounds/cmake-build-default/CMakeFiles/CMakeTmp/cmTC_9582b/fast" does not exist.
Specify --help for usage, or press the help button on the CMake GUI.
CMake will not be able to correctly generate this project.
Thing is, the cmTC_9582b/fast obviously dosen't exist. What is clion trying to do? It looks like it's trying to test cmake with a bad test and when its failing Clion decideds there's a problem.
Any solution for that?

Related

CMake Error: Please select either CMake bundled with CLion or CMake from the Cygwin installation

ERROR:
CMake Error: The source directory "" does not exist.
Specify --help for usage, or press the help button on the CMake GUI.
CMake Error:
------------------------------------------------------------------------------------
Selected CMake might be incompatible with the Cygwin environment.
In order to run on Cygwin, CMake needs to be specially compiled.
Please select either CMake bundled with CLion or CMake from the Cygwin installation.
------------------------------------------------------------------------------------
I don't know how to describe this question, just can't use CLion to run main.cpp in a new Project!
Here are the pictures..
Could somebody help? Thanks!!!

why I'm getting error in executing my C++ code

I have installed MinGW 3 times and I've also added path in env. variable but whenever I try to run a code in CodeLight it just gives me the following error:
mingw-32-make.exe: *** [ALL] Error 2
In MinGW installation tutorials there are .exe files in the bin folder but I don't have any .exe file in the bin folder inside MinGW. I've tried installing it 3 and very carefully.
Can someone help me out?
Make sure the compiler and build tools are properly configured in the IDE (CodeLight).
Installing MinGW by itself doesn't tell CodeLight were to find it.
There is a standalone MinGW-w64 personal build available at http://winlibs.com/ that doesn't need installation, just unzip it. On the site there is an explanation on he wot configure Code::Blocks IDE to use this compiler. The steps should be pretty similar in CodeLight.

Can't configure cmake to build standalone executable using cygwin

I need to build my c++ project that I created using CLion as standalone exe-file but I don't know how to do that!
Here is my CMakeList.txt:
Here is my CLion Toolchain settings:
The settings is OK!
But when I build exe and run it i get error:
It says that the program can't be run because "cygwin1.dll" is missing and reinstalling the program could help to fix it.
Anybody knows how to fix that? I can't find cygwin1.dll in cygwin installing client to fix it:

CMake error for OpenCV compilation in Windows

I am trying to build the files in the "Source" folder to the "Build" folder using CMake in order to build OpenCV program in Eclipse. But I am facing the following error:
The C++ compiler "C:/MinGW/bin/g++.exe" is not able to compile a simple
test program. It fails with the following output:
Change Dir: C:/opencv/mbuild/CMakeFiles/CMakeTmp
Run Build Command:"C:/CMake/bin/cmake.exe" "cmTC_03910/fast"
CMake Error: The source directory
"C:/opencv/mbuild/CMakeFiles/CMakeTmp/cmTC_03910/fast" does not exist.
Specify --help for usage, or press the help button on the CMake GUI.
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:93 (project)
I have installed MinGW several times along with CMake also, but still getting the same error.
Please help me out!! Thanks in advance
As mentioned at this tutorial PyIMageSearch opencv install
if you are using opencv version 3.1 you should set
-D INSTALL_C_EXAMPLES=OFF \ instead ON
I solved problem with this way

"nasm" is not recognized as an internal or external command

I am trying to compile libjpeg-turbo library using windows cmake. I am trying to follow the instrcutions found in that lib in order to compile the lib. I am operning a Visual studio terminal and I give in the first step the path of the library. My commands are the following:
cd ..path
cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Debug
nmake
The first command worked fine I am getting the message build files have been writer to path. However when I am trying to run nmake command I am getting errors:
"nasm" is not recognized as an internal or external command.
Any idea about what is nasm and how can I import it to my path.
From the problem you reported, it looks to me that the issue could be because of the PATH variable or configuration settings. The problem you reported have similar posts please refer to following links:
http://sourceforge.net/p/libjpeg-turbo/bugs/24/
https://github.com/Zeex/sampgdk/issues/42
Also it would be great if you could post the crash log or build process output from the console to further investigate the exact problem.