How can I run qwt examples using Visual Studio 2010? - c++

I'm trying to run Qwt examples using VS2010. I've installed the Qt plugin for Visual Studio. I then open the .pro file of Qwt and the build succeeds. But I have no clue what to do next. Whenever I click run, it gives me a dialog which says
unable to start programe E:\qwt-6.0.1\src..\lib\qwtd.dll
Does anyone have an idea what might cause this?

I just managed to get the examples compiled using the command line tools. Key steps included:
Add the bin dir of qt and the lib dirs of qt and qwt to the path
Dont forget to run vcvars32.bat from Visual Studios bin directory
VC\bin should be in the path too
then follow the INSTALL instructions from qwt
After this I had a set of running examples in examples/bin of qwt. It's also easy to open one of them in Developer Studio with the "Open Qt Project File" option in the Qt Menu.

From the information you're giving us, it seems you have the project generating your DLL set at the StartUp project. So whenever you click on run/debug, it will try to run the output of that project, in this case a DLL. Of course this won't work.
If there is a project for the example you want to run, right click on that project within the Solution Explorer and select "Set as StartUp Project". Now when you click on run/debug, it will run the output (the executable) of the project you selected.

Related

Qt visual studio building

I have ms visual studio solution with qt project. When I working from visual studio all works fine. When I try to run *.exe file from building folder I see message that say Qt5Guid.dll(and other dll's) is not found.
What settings need to be changed that QT dll's moves to general building folder ?
You can find in Qt installation dir application windeployqt.
Run it like this:
windeployqt --debug <path-to-app-binary>
It will deploy all needed Qt files to your application's folder. You can read more about deploying here: https://doc.qt.io/qt-5/windows-deployment.html
Also you can try to add directory of Qt to PATH variable
(Thanks king_nak and drescherjm)

How to deploy a qt based app(developed on Mac) to Windows?

I developed a desktop Qt app on macOs. I want to execute my app on windows. I've looked that pages:
https://doc.qt.io/qt-5.9/osx-deployment.html
https://godhc.wordpress.com/2012/06/10/build-your-qt-project-on-windows-and-mac-osx/
But it did not make sense well.
Can someone explain me how to do that?
you have to recompile it on windows. you have to make sure your code doesn't use macos "framworks" or unix or linux specific functions.
i recommend downloading a precompiled static QT as building it is impossible. you can get that here and using the visual studio compiler, you will have to download visual studio and all the c++ addons and stuff.
!! edit what ever directory your cmd is in is the output of the qmake !!
you then open up cmd and run the static compiled QT's qmake on the .pro file of your project. e.g.
E:\QT_projects\QT\qt5-5.7.1-vs2015\qt5-x86-static-release\bin\qmake.exe E:\QT_projects\variable-length-string-editor-for-binaries\StringEditer.pro
that will make the makefile. and then open the visual studio cmd called "Developer Command Prompt for VS 2017" for me opening the start menu and typing it in will show it.
you then navigate to the folder where the make files that qmake generated e.g.
cd E:\QT_projects\variable-length-string-editor-for-binaries
then run nmake on release or debug or just nmake e.g.
nmake release

Visual C++ 2010 error. The system cannot find the file specified when running LibICP

There is a code for running libIcp for Andreas Geiger. I downloaded the code, and build the sln based on CMAKELISts.txt. Everything good so far.
According "readme.txt" I Opened the resulting Visual Studio solution with Visual Studio and Switched to 'Release' mode, build all and run the demo program. but 1st this window came up:
And Then I got this error:
Any help is appreciated.
You can not run the ALL_BUILD target it does not create an executable. It is there to force building the entire solution. Select an application target from the solution in Solution Explorer. Right click on that target and click set as start up project. This option should be around in the middle of the popup menu.

Visual Studio 2010 C++ native debug mode resources

I am very desperate now...
I have project in Visual C++ 2010 using Qt and OpenCV. I got to phase I need to load XML file using openCV. But, I have no idea where is the working directory of my project, when run thru VS (F5). I mean, I read all config, copied desired file almost everywhere in my project folders, but it still is not seen by my EXE (OpenCV)...
What Am I doing wrong? Thanks.
right click on your project click on properties/Configuration Properties/debugging you start in whatever working directory is set to.

How to build exe in Visual Studio C++

I am a .NET C# developer and trying to learn C++.
I am having issues in trying to create an exe from a console app from Microsoft Visual Studio when I do a build compile and check the Debug folder. There isn't any exe, just some manifest files and other files. I am asking this because I am not sure if this is how it works? is there any another way of doing this?
I have tried the Microsoft Visual Studio console and c:\cl test.cpp, this gives me an test.exe but can it be done from the MSVS GUI like in C#?
Have you checked the debug folder at the solution level? I believe this is the default target directory. The DEBUG folder in the project is for the output of temporary build files.
Did it compile successfully ? Also, check your active configuration if its debug or Release ?
Also, check the output path to double check the location of executable.
It works the same as C#, so there is no need for command line.