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:
Related
When I try to run my C++ project in Code::Blocks IDE, it'll run the program in Windows CMD without any problem. If I try to run the program via Explorer it'll also run in CMD without any problem.
However, if I try to run the exactly SAME program via CLion, it'll run fine in CLion itself (CLion has a builtin terminal, while Code::Blocks uses Windows CMD). But if I try to run the program via Explorer I get this weird error:
If I press OK:
Anyone knows what the problem is? How do I fix this?
More information:
Code::Blocks comes as a package with MinGW. With CLion I had to manually download a Toolchain. I downloaded and installed MinGW-w64, because I didn't know anything else and that's what Code::Blocks also used.
The weird part about this is that MinGW-w64 is installed in "Program Files (x86)" and not in "Program Files".
Add the following to your CMakeLists.txt file in CLion:
set(CMAKE_EXE_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS} "-static")
This will work for gcc, which mingw is based upon. For other linkers, you would have to search for their particular switch for static linking.
I am using Eclipse for Windows and have this error:
Build of configuration Debug for project helloworld
(Cannot run program "make": Launching failed)
What do I do to solve this?
Eclipse CDT on Windows depends on 3rd party tools.
You may find this useful: Setting up a compiler
I faced the same problem while installing Eclipse for c/c++ applications .I downloaded Mingw GCC ,put its bin folder in your path ,used it in toolchains while making new C++ project in Eclipse and build which solved my problem. Referred to this video
I'm trying to test OpenCV (3.0.0) with Eclipse IDE (Version: Mars Release (4.5.0)) but for some reason I fail to successfully include all the library path.
Can you tell me how is it possible that the include directory is in the project explorer with the file *opencv.hpp* in it but still fails to find it during the build process? And how can I fix it?
I'm not sure what operating system you are using or how you installed OpenCV but I faced the same problem when installing OpenCV 3.1.0 on Ubuntu 15.10. I was following these instructions.
It turns out that after I ran make I forgot to run make install to actually install the compiled libraries.
I'm not sure if this problem has anything to do with Eclipse.
As we all know, Eclipse can not only run Java project, It also can run C/C++, Python, PHP etc, but we need to install plugins and configure run environment. I want to run C++ Project on Eclipse+cygwin+cdt (Windows 7), I have added following these environment variables.
"C:\cygwin64\usr\include"
"C:\cygwin64\lib"
"C:\cygwin64\bin"
and configure Eclipse toolchain = CygwinGcc and binary parsers = PE Windows Parser, I also set sth about "Paths and Symbols", but I still cannot run C/C++, following is the error info:
"Lauching CTest Debug" has encounted a problem. The program file specied in the launch configuration does not exist."
there is no binaries files, is there something wrong with it? I'm confused.
An executable probably doesn't exist in your debug folder.
There is a thread on how to get c++ running on Eclipse here:
The program file specified in the launch configuration does not exist
Hope that solves your problem
Did you install gcc toolchain successfully in Cygwin? Try to include gcc, gdb and make when you install cygwin.
I am currently trying to set my eclipse so that I can start c++ development on my Windows computer. However, I am stuck with some errors. But first, here is what I did so far:
Installed the CDT for Eclipse
Installed Cygwin (with the additional packages gcc, gcc and make)
Added all "paths for headers" in Eclipse
The problem is that when I try to run my Hello World program, I get Launch failed. Binary not found.
I already build and rebuild the project but the program is still not running. It must be because of these errors that I have:
/bin/sh: g++: command not found
make: ***[src/HelloWorld.o] Error 127
What can I do to solve these errors?
Try running the Cygwin setup.exe again and select the packages for g++. Search for that and make sure those are installed. It should be under the name gcc-g++. The C++ compiler is installed separately from the C compiler.
Ok, I figured it out by myself. Since this really freaked me out, I want anyone else who has this problem to know how I solved it.
So apparently, since I had g++, gcc and all that installed, it had to be a problem with the path.
So what I did was check my path. If you don't know how to edit it, check this link http://www.computerhope.com/issues/ch000549.htm
So in there, I chose Path under the System variables and clicked on Edit.... What I noticed was that instead of C:\cygwin64 it said C:\cygwin. All I did was append the 64 (since I had installed the 64-bit version of cygwin) and I was done.
I restarted Eclipse, cleaned and built the project and the errors where gone!