c++ vs2010 access denied on debug F5 - c++

I'm using visual studio 2010.
And followed a simple opencv tutorial :
Installing OpenCV 2.4.3 in Visual C++ 2010 Express
However when i hit F5 compile visual studio gives me an access denied message. LNK1104
Restarting visual studio has no effect.
Running as Admin has no effect.
Completely restarted in a new project, same error.
Non of my folders use spaces, so errors cant be related to that.
I am below the max unc path length (old DOS bug)
Windows security essentials (my antivirus), has this folder excluded.
Strangly code syntax following openCV namespace etc is understood
A compilation seams to be made, but cannt run
Also run from a dos prompt in debug folder, same error access denied
using taskmanager i see my exe loaded in memory, looking with sysinternals proces explorer; i see they are loaded by Devenv.exe (part of visual studio (same icon as vs2010). but well loaded but not working.
When closing vs2010, and using procmon.exe (sysinternals), going to debug folder executing the little app i made. then cmdagent process gives one "create file" exception on the Q drive (a left over from office online). However my app isnt related to office at all, its just a small image shower, nothing reffers to that bogus Q drive ???
I somehow think the problems are related to VS2010 itself, but I have no clues of what is happening here, its one of my first c++ projects so i'm not sure where to look of what goes wrong, any help would be great.
*** update 20-3-2015
Problem whatever it is, is not related to openCV
Even the most simple C++ code like below isnt working now, what can this be ?
#include <iostream>
using namespace std;
int main()
{
cout << "it never executes" << endl;
}
Whats wrong with my visual studio suddenly ???

I used the installation CDrom of visual studio to repair it.
C++ works again now..
Only left in doubts if i will use openCV again or switch to Halcon.

Related

LNK1124 error debugger cannot find .exe file

image of error
I'm having an error with visual studio every time I'm trying to use cin to get the guess of the user without that it works fine.
code
console message with error
this happening to me since I install visual studio 2017 just a couple of days ago.
I'm trying to learn c++ for unreal engine just started learning and i came across
that error anyone who have this error maybe this can be helpful for them.
first, let me tell you wah t the problem was i was trying to run a 32bit debugger on my 64bit pc cause visual studio install it that way so if you are getting this error on any of your projects all you have to do is change the project to an x64 bit project.
go to the Top bar "Build"
then go to "Configuration manager"
in there change it to x64 bit instead of 32bit
hopefully this can help someone
the link to the page that i read to fix is here.
after all the changes code runs well and no error anymore.

The application was unable to start correctly (0xc00007b)

I've searched at a lot of places, asked a lot of people, but didn't found an answer to fix this issue..
I've just created a game in C++ with SFML in Visual Studio Community 2015. My project settings are set like they have to (followed this guide).
When I runu the game on my pc, it works totally fine. If it runs on a pc without Visual Studio 2015, it will crash and returns the following error:
The application was unable to start correctly (0xc00007b)
I've also downloaded Dependency Walker, to check the .exe on errors and it results a couuple of errors. They can be seen in this screenshot. Sorry for the dutch error after Error opening file. It says: The system can't find the given file.
These are the dll's I'm icluding in the root folder of my game:
I'm hoping you guys can help me out.. Thanks in advance!
This error code rings a bell - have you installed the visual c++ redistributable package on the PCs where VS is not installed? You should be able to find the package in your VS folder (program files).

Visual Studio 2005 crashes when i open a c++ project or solution

i have quite a large solution with 10 projects (I am new to Visual Studio so be forgiving if I don't get the terminology right). One of the projects is a C++ project that would compile to a .dll. I have a new machine so everything is freshly installed. However, every time I try to open the c++ project VS crashes.
I then tried creating a new c++ solution/project but as soon as it is created and the solution explorer is presented VS crashes. I have searched Stackoverflow and there was something that may have worked but the reference to hot fix KB947315 is not accessible. I have tried to find the hot fix but to no avail.
I tried debugging VS2005 with VS2010 but did not get far.
My OS is windows 7 and I have included a screen shot of the VS help about for the version

Unable to start VS2012 Profiler

I'm trying to start a performance profiling session in Visual Studio 2012 RTM on Windows 8 PRO 64-bit for a console program (ANALYZE / Start Performance Analysis).
I get a popup message informing me
Could not load file or assembly 'Microsoft.VisualStudio.PerformanceTools.CounterInfo.dll' or one of its dependencies. The Specified module could not be found.
Apparently this can happen under VS2010 after KB2645410 is installed. I carefully followed the procedure given for this issue with the same error message:
Visual Studio 2010 SP1, KB2645410 and Add-Ins
However, that does not resolve the issue.
I have tried running VS2012 as Administrator as well.
How can I get the profiler working?
UPDATE
I can actually attach to a running instance of the project from the command line using the steps here:
Walkthrough: Command-Line Profiling Using Sampling
However, Visual Studio does not open the resulting .vspx file (it just does nothing after I open it with File / Open File).
UPDATE 2
Fuslogvw reports two binding errors when I attempt to start the profiler:
VS 2012 Profiler Binding Errors - Pastebin
Adding the following to the system path resolved the issue for me permanently.
C:\Program Files (x86)\Microsoft Visual Studio 11.0\Team Tools\Performance Tools
Some other answers may be appropriate to other situations.
Note that you probably will need to run Visual Studio as Administrator for profiling to work correctly.
I also struggled with that issue.
I found a working solution for me:
I opende the XXX.sln file using notepad.
There i found several parts in the Project and Global Section looking something like this:
ProjectSection(SolutionItems) = preProject
Performance1.psess = Performance1.psess
EndProjectSection
I removed all of them and that made my Analyzer work again.
I delete the .suo file and everythings works correctly now.
The same question exists here:
http://social.msdn.microsoft.com/Forums/en-US/a6487155-980c-4bc8-82de-2fe588fdf37f/windows-update-kb2645410-and-performance-tools-error
The following are suggested workarounds:
Remove windows update KB2645410
Only run one instance of Visual Studio
If you are the administrator on your development PC you can add the permission to Everyone to read and execute all the content in the folder "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Performance Tools" and subfolders/files.
"I backed everything up and did a complete repair of Visual Studio using the original disk from Microsoft. That allowed the computer to shut down normally. Then I tried the patch again. It hung again, but after a few reboots we got a message about deleting corrupt files and finally everything seems OK."
My issue was resolved when I realized that my user access control was set too high. Once that was turned off, I rebooted and it all worked great.
Once I uninstalled re-sharper my issue was resolved.

Intellisense auto-complete is causing VC++ in Visual Studio 2005 SP1 to crash

UPDATE1: I have reinstalled Visual Studio and I am still having this problem. My guess is there is a problem with my environment.
Update2: Diving in.
I attached windbg to devenv and set a breakpoint in windbg for msenv!_tailMerge_WINMM_dll and traced through.
This is trying to load winmm.dll using the LoadLibrary API. I can see that LoadLibrary is failing and GetLastError is returning 5 which is "access denied".
now, why would vs be denied access to winmm.dll?
---Begin Original---
I am currently having a serious issue with Visual Studio 2005 SP1 Intellisense in C++. I have an all native solution with on project. Whenever I, or the editor, attempt to invoke intellisense auto-complete pow, Visual Studio crashes. I even tried this with a brand new console app. Ctrl + Space in the empty main and Visual Studio crashes.
I googled for help on this but to no avail. I have tried deleting the ncb file but no luck on that front either.
I am currently working with Intellisense turned off as shown in this article:
Visual Studio 2005 - 'Updating IntelliSense' hang-up
And I have no crashes, but it sure would be nice to have intellisense back
Call stack from a crash dump.
7c812a6b kernel32!RaiseException+0x53
502717a6 msenv!__delayLoadHelper2+0x139
50675186 msenv!_tailMerge_WINMM_dll+0xd
505ac3c3 msenv!CTextViewIntellisenseHost::UpdateCompletionStatus+0x1a7
505acb50 msenv!CEditView::UpdateCompletionStatus+0x30
505dcfad msenv!CEditView::CViewInterfaceWrapper::UpdateCompletionStatus+0x2a
02ae47fc vcpkg!CCompletionList::DoCompletion+0x444
02ade2ce vcpkg!CAutoComplete::PostProcess+0x240
02ade07f vcpkg!CAutoComplete::OnACParseDone+0x3e
02adac2d vcpkg!CMemberListWorkItem::OnCompleted+0x9d
029eb4e3 vcpkg!CWorkItem::ProcessPendingWorkItemCompletedCalls+0x117
029f8b4f vcpkg!CParserManager::OnIdle+0x183
0299961a vcpkg!CVCPackage::OnIdle+0x48
5014b288 msenv!ATL::CComAggObject<CTextBuffer>::QueryInterface+0x43
5a9d2394 VCProject!ATL::CComPtr<IOleInPlaceFrame>::~CComPtr<IOleInPlaceFrame>+0x24
5a9d2880 VCProject!ATL::CComObject<CVCArchy>::Release+0x10
774fd420 ole32!CRetailMalloc_GetSize+0x21
5009422b msenv!CMsoCMHandler::FContinueIdle+0x23
5009422b msenv!CMsoCMHandler::FContinueIdle+0x23
I would try the following set of steps to try and fix the problem
Reset All Settings: Tools -> Import / Export Settings -> Reset All Settings
Delete HKCU:\Software\Micosoft\VisualStudio\9.0 and then restart VS
Repair the VS installation through Add Remove Programs
Disable all 3rd party plugins
Did you try repairing the Visual C++ installation?
Do you have any plugins installed? Try disabling them.
It might be worth it to delete the .ncb file in the project directory, in case it was corrupted (.ncb is the intellisense database file).
If you're doing C++ development for a living (or at least doing serious development), there's no reason not to use Visual Assist.
What a bizarre problem.
I finally figured it out using procmon from sysinternals:
http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx
My sounds were somehow changed to windows default sounds after a recent trip to IT. This caused visual studio to play a clicking sound when intellisense happens. In order to play this sound winmm.dll must be loaded up, which is located c:\windows\system32\winmm.dll.
I suppose through debugging foray winmm.dll symbols were downloaded to a FOLDER called C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\winmm.dll. Of course this folder looked mighty tasty to Visual Studio, so when it tried to load the winmm.dll folder as a dll file POW!!!
I deleted the folder, and some other .dll folders :) and all is well.
Thanks for your help.
Make sure you are up on your service packs, I think VS 2005 is at SP1.
Try "cleaning" the solution, i.e. delete (rename) all temporary files like *.ncb, *.suo etc that have been created by Visual Studio. One of these files might have got corrupted (Your problem sounds like the IntelliSense database is broken).