I am trying to compile Qt + PortAudio on Visual Studio 2010. I made a new Makefile project in visual (Visual C++/General/Makefile project). I am getting this error:
Error 8 error MSB3073: The command "qmake & nmake" exited with code 2. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.MakeFile.Targets 38 6 my_babel
Error 7 error U1077: 'c:\Qt\4.7.4\bin\qmake.exe' : return code '0x2' c:\Users\Ju\documents\visual studio 2010\Projects\my_babel\my_babel\NMAKE my_babel
Related
after installing the community version of Visual Studio 2019 I was able to open projects and to write code but if I want to start the program following error appears: "Error while creating, do you want to continue and open the last build?"...if I select yes:
"The program"C:\Users\user\source\repos\Project2\Debug\Project2.exe" can not be started. The system couldnt find the file".
I tried to reintall Viusal Studio multiple times but the error still occurs.
This also shows up if I try to run the "HelloWorld" program from Visual Studio so I assume the code isnt responible for the error.
Following appears too:
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\yvals.h(12,10): fatal error C1083: Datei (Include) kann nicht geƶffnet werden: "crtdbg.h": No such file or directory
All together there are 412 files missing ore undefined.
Im new to UnrealEngine but I have worked with unity before. im trying to create a new unreal engine file but I keep getting this error every time I try (Can not compile, basically):
The project could not be compiled. Would you like to open it in Visual Studio?
Running C:/Program Files/Epic Games/UE_4.10/Engine/Binaries/DotNET/UnrealBuildTool.exe test Development Win64 -project="C:/Users/abdel/Desktop/gamemaking/Unreal/BuildingEscape/test/test.uproject" -rocket -editorrecompile -progress -noubtmakefiles -2015
#progress push 5%
Parsing headers for testEditor
Running UnrealHeaderTool "C:/Users/abdel/Desktop/gamemaking/Unreal/BuildingEscape/test/test.uproject" "C:\Users\abdel\Desktop\gamemaking\Unreal\BuildingEscape\test\Intermediate\Build\Win64\testEditor\Development\UnrealHeaderTool.manifest" -LogCmds="loginit warning, logexit warning, logdatabase error" -rocket -installed
Reflection code generated for testEditor in 7.1584488 seconds
#progress pop
Performing 8 actions (2 in parallel)
[2/8] Resource PCLaunch.rc
PCH.test.h.cpp
[3/8] Resource ModuleVersionResource.rc.inl
testGameMode.cpp
test.generated.cpp
C:\Users\abdel\Desktop\gamemaking\Unreal\BuildingEscape\test\Intermediate\Build\Win64\UE4Editor\Inc\test\test.generated.cpp: error C4599: '/IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE': command line argument number 228 does not match precompiled headerC:\Users\abdel\Desktop\gamemaking\Unreal\BuildingEscape\test\Source\test\testGameMode.cpp: error C4599: '/IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE': command line argument number 228 does not match precompiled header
testCharacter.cpp
C:\Users\abdel\Desktop\gamemaking\Unreal\BuildingEscape\test\Source\test\testCharacter.cpp: error C4599: '/IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE': command line argument number 228 does not match precompiled header
test.cpp
C:\Users\abdel\Desktop\gamemaking\Unreal\BuildingEscape\test\Source\test\test.cpp: error C4599: '/IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE': command line argument number 228 does not match precompiled header
-------- End Detailed Actions Stats -----------------------------------------------------------
ERROR: UBT ERROR: Failed to produce item: C:\Users\abdel\Desktop\gamemaking\Unreal\BuildingEscape\test\Binaries\Win64\UE4Editor-test.dll
Total build time: 26.15 seconds
I have visual studio downloaded and when I try to open it in Visual Studio, I get a build error.
please help :)
Please take a look at
https://docs.unrealengine.com/latest/INT/Programming/Development/VisualStudioSetup/
and check that you are using the correct Visual Studio version.
Also, is there a reason that you are using Unreal Engine 4.10 instead of the newest version, even though you are just starting with UE and, I assume, you don't have any previous projects?
Updated problem #3
I've narrowed the problem. It seems that simply including <thread> makes the compiler go mad.
I am not even making any thread calls, just including it.
I have tried enabling /EHsc and also disabling it.
Disabled, I get:
I get these 6 messages:
Error 1 error C2220: warning treated as error - no 'object' file generated (main.cpp) C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\concrt.h 313 1 cefclient
Warning 2 warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc (main.cpp) C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\concrt.h 313 1 cefclient
Error 3 error C2220: warning treated as error - no 'object' file generated (Program.cpp) C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\concrt.h 313 1 cefclient
Warning 4 warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc (Program.cpp) C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\concrt.h 313 1 cefclient
Error 5 error C3861: '__uncaught_exception': identifier not found (main.cpp) C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\concrt.h 4774 1 cefclient
Error 6 error C3861: '__uncaught_exception': identifier not found (Program.cpp) C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\concrt.h 4774 1 cefclient
And if enabled (Configuration Properties -> C/C++ -> Code Generation & in the Command Line)
Error 1 error C3861: '__uncaught_exception': identifier not found (main.cpp) C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\concrt.h 4774 1 cefclient
Error 2 error C3861: '__uncaught_exception': identifier not found (Program.cpp) C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\concrt.h 4774 1 cefclient
I did a simple test with a new, blank project, including thread and just compiling. It went fine, no errors.
However in my main project I am using Chromium Embedded Framework v3, which seems to interact strangely with the thread inclusion?
Seems odd that simply including it would make such a mess.
Any ideas?
Update:
By removing the _HAS_EXCEPTIONS=0 flag entirely and rebuilding the project from CMake, I enter a state where the project won't even compile.
Due to this change it throws out a ton of warnings and errors from various files.
Errors such as:
Warning 230 warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc (C:\Users\mads\Desktop\cef_binary_3.2526.1347.gcf20046_windows32\cefclient\browser\client_handler_osr.cc) C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xlocale 337 1 cefclient
According to a lot of asking around and googling, the solution to this is to specify /EHsc in Project Properties -> C/C++ -> Code Generation -> Enable C++ Exceptions = Yes(/EHsc).
As well as setting the flag /EHsc in the Command Line input field.
However, nothing changes. The same errors come out as if nothing was changed.
Update:
The error
Warning 2 warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc (C:\Users\mads\Desktop\cef_binary_3.2556.1368.g535c4fb_windows32\libcef_dll\transfer_util.cc) C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xlocale 337 1 libcef_dll_wrapper
comes from the project "libcef_dll_wrapper", despite the fact that I HAVE speficied /EHsc in its project settings! Both in C++ -> Code Generation page and the Command Line
Solution edit:
Turns out that cmake files would override my set settings everytime I attempted to build or run the project, hence rendering any changes I made un-used, despite being set!
I was able to solve the problem by editing the project's cmake files directly.
Never used cmake before, so in the end it became a learning experience.
I have tested my project with thread inclusion now and it compiles as expected!
Thanks to all for great suggestions
Make sure neither the code nor the compiler command line define _HAS_EXCEPTIONS=0.
Compiling VC++ 12.0 with _HAS_EXCEPTIONS=0 and including concrt.h causes a compiler error:
If a source file is compiled with VC++ 12.0 with _HAS_EXCEPTIONS set to 0 and the source includes, whether directly or indirectly, concrt.h, the compiler gives an error of:
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\concrt.h(4774) : error C3861: '__uncaught_exception': identifier not found
[...] Macro _HAS_EXCEPTIONS=0 is undocumented and unsupported by Microsoft.
It may work with some parts of the STL library for legacy reasons, but it won't be compatible with ConcRT library (concrt.h) since ConcRT depends on exceptions for cancellation.
I have been following this documentation to compile Wireshark from source:
http://www.wireshark.org/docs/wsdg_html_chunked/ChSetupWin32.html
I am running these commands from going to Start > 'All Programs' > Visual Studio 2008 > Visual Studio Tools > Visual Studio 2008 Command Prompt
I am also calling "C:\Program Files\Microsoft Visual Studio 9.0\VC\bin\vcvars32.bat" but I believe this may be done for me with the VS2008 Command Prompt.
Here is the output of my nmake -f Makefile.nmake verify_tools :
Checking for required applications:
cl: /cygdrive/c/Program Files/Microsoft Visual Studio 9.0/VC/BIN/cl
link: /cygdrive/c/Program Files/Microsoft Visual Studio 9.0/VC/BIN/link
nmake: /cygdrive/c/Program Files/Microsoft Visual Studio 9.0/VC/BIN/nmake
mt: /cygdrive/c/Program Files/Microsoft SDKs/Windows/v6.1/bin/mt
bash: /usr/bin/bash
bison: /usr/bin/bison
flex: /usr/bin/flex
env: /usr/bin/env
grep: /usr/bin/grep
/usr/bin/find: /usr/bin/find
peflags: /usr/bin/peflags
perl: /usr/bin/perl
C:\Python27\python.exe: /cygdrive/c/Python27/python.exe
sed: /usr/bin/sed
unzip: /usr/bin/unzip
wget: /usr/bin/wget
After this I continue to run the commands:
nmake -f Makefile.nmake setup
nmake -f Makefile.nmake distclean
nmake -f Makefile.nmake all
After calling the last command ('all'), The compilation runs for several minutes and comes to tshark-tap-register.c
tshark-tap-register.c(6) : error C2182: 'File' : illegal use of type 'void'
tshark-tap-register.c(6) : error C2146: syntax error : missing ';'
before identifier 'STDIN'
It continues in this fashion, citing increasing line numbers with the same errors. Finally, it halts, outputting :
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\cl.EXE"' : return code '0x2'
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\nmake.exe"' : return code '0x2'
If anyone has suggestions on things to try, I would greatly appreciate it!
Since you are building the development snapshot out of SVN, you probably just pulled a revision that had an error somewhere that caused tshark-tap-register.c to be incorrectly generated. Both 43154 and 43155 build for me without issue.
Unless you need the bleeding-edge features in the development branch, you should in stead get the latest stable source distribution from the Wireshark Downloads page in the future.
I downloaded the Tessnet2 project from http://www.pixel-technology.com/freeware/tessnet2/ and I am able to build it fine in Visual Studio 2008. However, I need to recompile it for .NET 4. I know very little about C++, but the errors I am getting when i try to compile with VS 2010 are:
Error 4 error C2439: 'std::_Pair_base<_Ty1,_Ty2>::first' : member could not be initialized C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\utility 163 1 tessnet2
Error 6 error C2439: 'std::_Pair_base<_Ty1,_Ty2>::second' : member could not be initialized C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\utility 163 1 tessnet2
Error 3 error C2440: 'initializing' : cannot convert from 'int' to 'ScrollView *' C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\utility 163 1 tessnet2
Error 5 error C2440: 'initializing' : cannot convert from 'int' to 'SVEvent *' C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\utility 163 1 tessnet2
I'm assuming you can't just open a 2008 C++ project in 2010 and do a simple convert like most actual .NET projects. But, if anyone can give me some insight on this I appreciate it.
I had the same problem.
It seems that the VS2010 compiler is stricter about NULL being defined as a the literal 0 than the VS2008 one was. Therefore you must explicitly cast the NULL references in this project to their corresponding class types.
Specifically, you must make the following four changes to the scrollview.cpp file to get the project to compile:
-- Change line 137
std::pair<ScrollView*, SVEventType> awaiting_list_any_window(NULL,
SVET_ANY);
to
std::pair<ScrollView*, SVEventType> awaiting_list_any_window((ScrollView*)NULL,
SVET_ANY);
-- Change line 409
waiting_for_events[ea] = std::pair<SVSemaphore*, SVEvent*> (sem, NULL);
to
waiting_for_events[ea] = std::pair<SVSemaphore*, SVEvent*> (sem, (SVEvent*) NULL);
-- Change line 427
std::pair<ScrollView*, SVEventType> ea(NULL, SVET_ANY);
to
std::pair<ScrollView*, SVEventType> ea((ScrollView*)NULL, SVET_ANY);
-- Change line 429
waiting_for_events[ea] = std::pair<SVSemaphore*, SVEvent*> (sem, NULL);
to
waiting_for_events[ea] = std::pair<SVSemaphore*, SVEvent*> (sem, (SVEvent*) NULL);