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

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.

Related

Visual studio compiling failed without any errors [duplicate]

I have a WebApplication which contains reference to WCF services.
While building using Visual Studio 2010, Build fails without any error or warning. However building the .csproj using MsBuild is successful.
Can't figure out what should I try in Visual Studio, to resolve / diagnose the issue. Can you please help out?
I find out that the build has been failing,
From text displayed in status Bar.
From output window:
========== Build: 0 succeeded or up-to-date, 1 failed, 0 skipped ==========
The output tab includes configuration details.
------ Build started: Project: <projectName here> Configuration: Debug Any CPU
I noticed that if "Build + Intellisense" is selected in the Error List, it causes the error messages to be swallowed.
Change this option to "Build Only", and all error messages will be displayed:
I don't know if this is a bug in Visual Studio or what, but it certainly revealed hidden error messages that were the key to pinpointing the failure for me.
Some, like Richard J Foster, have suggested increasing the "MSBuild project build output verbosity" setting to "Diagnostic" (the highest possible option), but this didn't solve the problem for me, as Visual Studio appeared to be suppressing the error message(s) themselves.
As an alternative, you may try to use the raw output messages from the "Output" tab, which haven't been filtered by Visual Studio. Either do an in-place search for the strings "error" and/or "failed", or copy all of the output to your favorite text editor and do a search there.
To ensure that the Output window appears each time you do a build, you can go to Tools → Options → Projects and Solutions → General, and ensure that the option "Show Output Window when build starts" is checked.
As an additional troubleshooting step, it is also possible to build the project from the PowerShell command line by running dotnet build. This will show you the complete build output, including any errors that Visual Studio may be hiding.
I just ran into a similar situation. In my case, a custom action (from the MSBuildVersioning package available on Nuget.org - http://www.nuget.org/packages/MSBuildVersioning/) which appeared in the csproj file's BeforeBuild target was failing without triggering any error message in the normal place.
I was able to determine this by setting the "MSBuild project build output verbosity" (in the latest Visual Studio's Tools tab [Path: Tools > Options > Build and Run]) to "Diagnostic" as shown below. This then showed that the custom action (in my case HgVersionFile) was what had failed.
Here are some things that you can try:
If your solution contains more than one project, try building each project one at a time. (You may even want to try opening each project independently of the solution.)
If applicable, ensure that all of your projects (including dependencies and tests) target the same version of the .NET Framework. (Thanks to user764754 for this suggestion!)
Tip: Check Tools → Extension and Updates to ensure that your packages are up-to-date.
Ensure that all dependency projects are built to target the same platform as your main project.
Try restarting Visual Studio.
As suggested by Bill Yang, try running Visual Studio as Administrator, if you aren't already. (If you are already running Visual Studio as Administrator, perhaps try the opposite?)
Try restarting your computer.
Try "Rebuild All".
Run "Clean Solution", then remove your *vspscc* and *vssscc* files, restart Visual Studio, and then "Rebuild All".
As suggested by Andy, close Visual Studio, delete the .suo file, and restart Visual Studio.
As suggested by Arun Prasad E S, close Visual Studio, delete the .vs folder in your solution directory, and then re-open Visual Studio. (This folder is auto-generated by Visual Studio and contains cache, configuration settings, and more. More details can be found in these questions: Visual Studio - Deleting .vs folder and https://stackoverflow.com/q/48897191.)
As suggested by MrMalith, close Visual Studio, delete the obj folder in your solution directory, clear your temporary folder, and then re-open Visual Studio.
Delete the hidden .vs folder & restart Visual Studio. That worked for me.
I want to expand on Sasse's answer. I had to target the correct version of .NET to resolve the problem.
One project was giving me an error:
"The type or namespace name 'SomeNamespace' does not exist in the namespace 'BeforeSomeNamespace' (are you missing an assembly reference?)".
There was no error in the Error List window but the assembly had a yellow warning sign under "References".
I then saw that the referencing project targeted 4.5.1 and the referenced project 4.6.1. Changing 4.6.1 to 4.5.1 allowed the overall build to succeed.
Nothing was working for me so I deleted the .suo file, restarted VS, cleaned the projected, and then the build would work.
I tried many things like restarting Visual Studio, cleaning and rebuilding the solution, restarting the PC, etc., but none of them worked for me. I was finally able to solve the problem by doing the following:
First of all, make sure all the projects in your solution (including tests) are targeting the same .NET version. Then:
Save pending changes in the project and close Visual Studio
Find the exact location from file explorer and find "obj" file and open it,
Then, delete all the included files (some files won't remove, it doesn't matter, just skip them).
Use run command (by pressing Windows Key + R) and type "%temp%" and press enter to find temporary files.
Finally, delete them all.
On other possibility is that Visual Studio needs to run as Administrator, this might be related to deploying to local IIS server or other deployment need.
Just for the sake of completion and maybe helping someone encountering the same error again in the future, I was using Mahapps metro interface and changed the XAML of one window, but forgot to change the partial class in the code-behind. In that case, the build failed without an error or warning, and I was able to find it out by increasing the verbosity of the output from the settings:
In my case (VS 2019 v16.11.20), disabling Text Editor->C#->Advanced->Enable 'pull' diagnostics in the options solved the issue.
Double check for _underscore.aspx pages in your project.
I had a page and code-behind:
`myPage.aspx` and `myPage.aspx.vb`
when building the project, I'd get errors on the .aspx.vb page stating that properties defined on the .aspx page didn't exist, even though the page itself would build fine and there were NO OTHER ERRORS showing in the output (even with diagnostic level build output).
I then came across a page in the project that was named the same thing but with an underscore: _myPage.aspx - not sure where it came from, I deleted it, and the solution built fine.

Unhandled exception at 0x74E733AB (ucrtbase.dll) in OpenClaw.exe

I wanted to tinker this open source remake of the famous Claw.
Visit https://github.com/pjasicek/OpenClaw
Before I start with how I've cloned this game and tried to build it, I'm new to the open source community. I did the following things.
I cloned the repository.
Opened the project using Visual Studio 2017 Community edition and I changed the Configuration to Release and platform to Win32.
I then built the libwap solution without any errors.
Then I used CMake 3.11.0 to generate the required files for the Box2D solution and then generated it and then the Box2D build was a success.
I built the Midiproc manually and finally, I tried building the entire solution.
It threw a MSVCR120D.dll missing error and I copied all the .dlls from the game's release folder https://github.com/pjasicek/OpenClaw/releases
Now the game runs just fine when I launch it from the File explorer, but when I try to launch it from Visual Studio 2017, it throws the following error.
Check out this image:
How do I run the game from Visual Studio? Have I misconfigured the Visual Studio?
If you need any more details on what I did, please let me know.
[EDIT] I want to configure Visual Studio to be able to run the release and modify the source code so I can tinker it and try to understand how the game works internally.
I cloned the repository again and did a clean compilation of all the solutions. Turns out there was a problem when I copied/overwritten all dlls from the release build. Now, the game builds and executes fine.
Thanks for the help.

Incorrect main method running in visual studio

I'm trying to do some tutorial C++ programs to familiarize myself with the language. I'm using Visual Studio 2010. I have a Visual Studio solution with two projects - I'll just call them projectA and projectB. Each project has a source file with its own main method. However, when I try to run the program in projectB, the program in projectA runs instead. I'm coming from an Eclipse IDE where projects separate the programs. I've some msdn articles on solutions and projects, but I haven't seen anything about being unable to have multiple source files with main methods in them. Can someone help to clarify the Visual Studio Solution/Project structure for me, please.
Right click on the project you want to run, and select Set as StartUp Project
You have to right click on the project and "Set as Startup Project" to tell Visual Studio which project you want to actually run.
I hope this is a nice simple fix: if you look at your solution and have both projects open, you should be able to right click one of them and set it as default (Set as Startup Project), (which sounds like at the moment is set to projectA).
I have highlighted the relevant option in the menu picture:
Either you can right click on the project in the Project Explorer and select Set As StartUp Project or you can use meny item Project and also select Set StartUp Project.

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 can I run qwt examples using Visual Studio 2010?

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.