Eclipse 2021-06 CDT GLFW vulkan app doesnt launch from within Eclipse - eclipse-cdt

I just started to learn vulkan but I cannot run or debug my app from within Eclipse.
What am I missing here?
Note: If I copy GLFW dll into my app.exe folder it starts correctly.
I am using Win10 64 bits, mingw64, vulkan sdk 1.2.189.0, glfw 3.3.4 win64 (precompiled) and glm.
My Eclipse 2021-06 config:

I found out the solution to my problem. I just have to copy post build the dll file to the .exe folder.
to do this I went to "Project-> properties -> C/C++ Build -> Settings"
under Build step tab, in Post-build steps command input box put the command.
(to copy I used "cmd /c copy path/to/file dst/folder/path" )

Related

eclipse oxygen - Launch error: Binary not found

Whenever I create a new project it doesn't include the binaries thing and I get this error: "Launch Failed: Binary not found"
I have already tried changing run configurations to no avail. I have the debug folder but in it is a mysterious stringTest.o file which cannot run the project.
I have built the project several times.
I am using the latest version of Eclipse Oxygen and the MinGW compiler (GNU for Windows).
I have searched for half an hour around and all the methods I've tried haven't worked. Any help is much appreciated.
Thanks!
To Compile and Build the project in Eclipse do
Project -> Build Project
Then to run the project right click on your source code file and select
Run As -> Local C/C++ Application

CreateProcess error=2, The system cannot find the file specified) [duplicate]

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

Building 32bit libraries opencv

I recently downloaded and built opencv in my 64-bit Windows machine using cmake. All the binaries are included in the install folder and it contains only the folders as shown below:
I don't know how to config cmake to produce binaries for x86. I'm asking this, because I'm using Qt Creator 32bit with MinGW and I'm getting problems while linking and compiling the code. What's the proper way to do the build? I'm using mingw compiler suite.
Note: The downloaded package contains the pre-built binaries for x86 but there are none for MinGW, but only for Visual Studio.
Steps for mingw from with cmake-gui from this guide. We could also do this easily on command prompt with cmake and -m32 option. But using cmake-gui will give you more idea about the options available for opencv configuration and bring you in better position if you want to customize opencv build tomorrow ( like enabling java wrapper or OpenCL etc ).
Start cmake-gui.
Set source path to downloaded opencv directory and build path to your choice as in image
Click Configure button and specify generator as mingw makefiles as
in image
Choose compilers ( here we choose 32 bit ) as in image and click Finish button.
An options page will be listed.
5.1. Edit CMAKE_INSTALL_PREFIX to change the install location if you want to.
5.2. Select ENABLE_CXX11 if it isn't already selected.
5.3. Change other options only if you are familiar with them. Then click Configure again and then click 'Generate` to generate make files.
Modify opencv\sources\modules\videoio\src\cap_dshow.cpp and add this define at the top of the file:
#define STRSAFE_NO_DEPRECATE
In command prompt( at build path ) type mingw32-make ( add mingw32-make folder to PATH if required )
On completion, type mingw32-make install

Issue on building a project in QT using a CMakeLists configuration

I'm starting to use PCL (Point Cloud Library) programming in QTCreator environment.
I load a PCL sample project in the PCL SDK, using its CMakelists file but QT doesn't build it. I do File -> Open File/Project -> open CMakeLists.txt and when I get to the window Run CMake it says:
The directory "MyPCLDirectory/pcl_visualizer-build" does not contain a cbp file. QtCreator needs to create this file by running CMake. Some projects require command line arguments to initial CMake call.
I use MinGW Generator 32 bit. If I try to push "run CMake" QT doesn't do anything.
I'm on Windows 7, using PCL 1.6 all-in-one installer and QT 5.3.0

How to install C++ plugin to Eclipse?

I have Eclipse Helios and wanted to code C++ using it, but I keep running into the "Launch failed. Binary Not found" error.
I installed the MingW C++ compiler using the "mingw-get-inst-20120426" file and selected the "C compiler, C++ compiler, MSYS Basic System, and MingW Developer Toolkit".
Then I went to Eclipse > project > properties > C/C++ General > Paths and Symbols, then selected the GNU C++ in the Includes tab and added the "C:\MinGW\lib\gcc\mingw32\4.6.2\include\c++" path.
I also went to C/C++ build > Environment and appended the "C:\MinGW\bin;C:\MinGW\msys\1.0\bin" to the PATH.
Then I created a Hello World C++ project, selecting the MingW GCC under Toolchains, and then built the project using the "hammer" icon.
However, once I ran the HelloWorld program it gets the "Launch failed. Binary Not Found" error.
Here is another error:
g++ -IC:\MinGW\lib\gcc\mingw32\4.6.2\include\c++ -O0 -g3 -Wall -c -
fmessage-length=0 -osrc\HelloWorld.o ..\src\HelloWorld.cpp
Internal Builder: Cannot run program "g++": The system cannot find the
file specified.
I also downloaded the CDT (C/C++ Development Tooling) and transferred the "features" and "plugins" folder to the eclipse folder.
Can someone please give me step-by-step on how to resolve this?
Firstly, in the following examples all drive-letters should be replaced with the relevant ones on your system. Not all of these steps are really necessary, but it works (and the more the merrier).
We start with the slightly simpler release config - we want to make it compile.
Go to Project -- Properties
Look if the include directories are correct and in place.
Go to Project -- Properties -- Run/Debug Settings -- NEW -- Main Tab
Set to Release and Browse to the Release folder of the project. If the exe file is not set type in its name.
Switch to Common Tab. Check Allocate Console and Launch in Background. Don't Run yet.
Go to Project -- Properties -- C/C++ Build -- Discovery Options
Tools -- GCC C++ Compiler
"Browse" to the mingw bin folder and select the g++.exe or copy mingw32-g++.exe to g++.exe
Note: The image points to mingw32-g++.exe please use g++.exe
Right click on the project and look -- Build Configurations -- Set Active -- Release is checked.
Right click on the project -- Run As -- Run Configurations.
Under C/C++ Application select, the one which refers to the release version. Then click Run
If this works, I will show you how to set the Debug Properties. (more complicated)
Nowadays (Eclipse Juno and newer), it is much simpler. You just need to:
Install MinGW (and including C++ compiler)
Add the paths "C:\minGW\bin" and "C:\minGW\msys\1.0\bin" (or wherever you installed MinGW to) to your Windows "Path" variable
Install Eclipse. If Eclise already is installed, restart it. it will recognize that MinGW is now available.
Create a New project: "C++ Project"
For every Project type in the following dialog, you should now be able to select the "MinGW GCC" toolchain
Happy coding
See here: http://www.youtube.com/watch?v=QhvXCg2CY4Q
g++ is installed as part of MinGW. If you are getting an error in Eclipse that it cannot find g++ then your path is most likely incorrect. From a command prompt you should be able to run:
g++ --version
and it should display the version of g++ in the MinGW/bin directory.
Eclipse uses this path to locate the include files and the compiler. Once you get the path correct restart Eclipse and the problems listed in your question should be resolved.