I tried to print a debug message using cout but I am not getting any output although my app is running.
I am using the IMPLEMENT_APP macro.
Here is the code I tried to print some information:
std::cout << display->GetGeometry().GetSize().GetWidth() << " " << display->GetGeometry().GetSize().GetHeight();
Can someone help me understand why am I not getting the output?
I am using Visual Studio 2022.
This is the only output I get when I build & run the program:
Build started...
1>------ Build started: Project: VideoEditor, Configuration: Debug x64 ------
1>App.cpp
1>VideoEditor.vcxproj -> D:\C++\VideoEditor\x64\Debug\VideoEditor.exe
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
Related
When I build a project in vs 2017, I can get errors like this:
1>------ Build started: Project: TortoiseGitMerge, Configuration: Debug Win32 ------
1>Performing Custom Build Tools
1>The system cannot find the path specified.
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(171,5): error MSB6006: "cmd.exe" exited with code 3.
1>Done building project "TortoiseMerge.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 10 up-to-date, 0 skipped ==========
In this error message, there is no information leading me closer to a solution.
Which path was specified?
How do I find out? What is the exact reason that the path in question was not written in that error message?
Performing Custom Build Tools
That isn't enough to know what is going on. You'll want to jack up the build verbosity so you can see these custom build commands getting executed. Finding the one that failed then gives you a shot at diagnosing the mishap.
Use Tools > Options > Projects and Solutions > Build and Run, "MSBuild project build output verbosity" = Detailed. The build trace you now see in the Output window gets a lot more chatty and should show the actual command that fell over.
I have created a project with Cocos2dx-2.5.5. I have built it for Win32, it works fine.
but now I am opening it in Visual studio 2013 with Debug configuration as x64(64 bit). when I am building it for local machine I am getting the following error.
1>------ Build started: Project: libcocos2d, Configuration: Debug x64 ------
2>------ Build started: Project: libExtensions, Configuration: Debug x64 ------
1>LINK : fatal error LNK1181: cannot open input file 'libpng.lib'
2>LINK : fatal error LNK1181: cannot open input file 'zlib.lib'
3>------ Build started: Project: Monroe_2013, Configuration: Debug x64 ------
3>LINK : fatal error LNK1181: cannot open input file 'libEGL.lib'
========== Build: 0 succeeded, 3 failed, 3 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 0 failed, 0 skipped ==========
I opened proj.winrt folder with VS2013 from my project's root folder.
I have also tried adding directory to Configuration->Linker but couldn't get it work.
As you can see there are all the libraries added, which are causing that error.
When I try to run my unit test in VS 2012 I get the following error:
1>------ Build started: Project: Tests, Configuration: Debug Win32 ------
1>LINK : fatal error LNK1104: cannot open file 'C:\Users\Patryk\Documents\Visual Studio 2012\Projects\LUT\Debug\DefaultTest.dll'
========== Build: 0 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========
It works again, when I restart VS but then I get the same error after I have to rebuild the project
"DefaultTest.dll" is a remnant of not changing the Target Name in the project's General Configuration Properties.
The same thing happens to me in Visual Studio 2010. Removing the .dll and .dll.metagen files from the output directory and rebuilding the test project solved the problem in my case.
I get this error if the testing engine is still running in background.
Check if the vstest.executionengine.x86.exe process is still running in background, and kill it if so. Afterwards you can rebuild and run your tests.
I've been trying all day long to solve this issue and it's driving me crazy, I'm trying to debug and run my very first C++ program, Hello World, and I get the following notice:
1>------ Build started: Project: HelloWorld, Configuration: Debug
Win32 ------ 1>LINK : fatal error LNK1104: cannot open file
'C:\Users\win 7\Desktop\C++ tutorials\HelloWorld\Debug\HelloWorld.exe'
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
I also get an AVG detection which says:
threat: potentially harmful program Hacktool.ABLQ object name:
C:\Users\win 7\Desktop\C++ tutorials\HelloWorld\Debug\HelloWorld.exe
So I tried adding it to the exceptions list, that also didn't help, I don't get it, what's the problem then?? and how can I fix this?
Make sure your HelloWorld.exe is not running when compiling linking. Also Antivirus can quarantine executable during build when suspect harmful code there. Try to add the build directory in the exceptions list of your antivirus when you trust the source code you building.
I want to compile the console application in 7-Zip source code. But i get this error below,
1>------ Build started: Project: Console, Configuration: Debug Win32 ------
1>Linking...
1>.\Debug\7zCrcOpt.obj : fatal error LNK1107: invalid or corrupt file: cannot read at 0x268
1>Build log was saved at "file://f:\7z920\CPP\7zip\UI\Console\Debug\BuildLog.htm"
1>Console - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Any help on this? thanks
Sounds like you somehow got a corrupted object file. You can remove this by using the "Clean" option from the "Build" menu (and then try building again).
Visual Studio Main Menu -> Build -> Rebuild Solution
Download and extract 7z1701.7z from http://www.7-zip.org/download.html
c:\> c:\visual-studio-10\vc\vcvarsall.bat
> devenv \CPP\7zip\UI\Console\Console.dsw
[Some Gui conversion]
> devenv c:\src\7zip3\CPP\7zip\UI\Console\Console.dsw
[error as in question]
c:\7zip\CPP\7zip\> nmake NEW_COMPILER=1 MY_STATIC_LINK=1
SUCCESS .. all the exe built.