vs2017 compile error: double inclusion of header boost/config/abi_prefix.hpp - boost

I upgraded some vc2008 projects into vc2017 projects, and replaced boost_1_47 with boost_1_64.
Vc2008 projects were correctly compiled, but vc2017 projects reported an error:
fatal error C1189: double inclusion of header boost/config/abi_prefix.hpp is an error
what does it means? And how to solve it?
I used VS2017 with vc141 toolset and windows 10 SDK

Related

unable to build native image using quarkus graalvm app

I am trying to build a java app with quarkus and graalvm. I am currently using graalvm version graalvm-ce-java11-windows-amd64-21.2.0 and updated the JAVA_HOME, GRAALVM_HOME and system path as well. For MSVC i have downloaded visual studio and selected the option of MSVC during the installation. BUt when I build the application using mvn clean package -Pnative I am getting below error message
Error: Error compiling query code (in C:\Users\sujay\AppData\Local\Temp\SVM-3930593782158447217\AMD64LibCHelperDirectives.c). Compiler command ''C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64\cl.exe' /WX /W4 /wd4244 /wd4245 /wd4800 /wd4804 /wd4214 '/FeC:\Users\sujay\AppData\Local\Temp\SVM-3930593782158447217\AMD64LibCHelperDirectives.exe' 'C:\Users\sujay\AppData\Local\Temp\SVM-3930593782158447217\AMD64LibCHelperDirectives.c'' output included error: [AMD64LibCHelperDirectives.c, C:\Users\sujay\AppData\Local\Temp\SVM-3930593782158447217\AMD64LibCHelperDirectives.c(1): fatal error C1083: Cannot open include file: 'stdio.h': No such file or directory]
com.oracle.svm.core.util.UserError$UserException: Error compiling query code (in C:\Users\sujay\AppData\Local\Temp\SVM-3930593782158447217\AMD64LibCHelperDirectives.c). Compiler command ''C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64\cl.exe' /WX /W4 /wd4244 /wd4245 /wd4800 /wd4804 /wd4214 '/FeC:\Users\sujay\AppData\Local\Temp\SVM-3930593782158447217\AMD64LibCHelperDirectives.exe' 'C:\Users\A740125\AppData\Local\Temp\SVM-3930593782158447217\AMD64LibCHelperDirectives.c'' output included error: [AMD64LibCHelperDirectives.c, C:\Users\A740125\AppData\Local\Temp\SVM-3930593782158447217\AMD64LibCHelperDirectives.c(1): fatal error C1083: Cannot open include file: 'stdio.h': No such file or directory]
at com.oracle.svm.core.util.UserError.abort(UserError.java:139)
at com.oracle.svm.hosted.c.NativeLibraries.reportErrors(NativeLibraries.java:369)
at com.oracle.svm.hosted.NativeImageGenerator.processNativeLibraryImports(NativeImageGenerator.java:1616)
at com.oracle.svm.hosted.NativeImageGenerator.setupNativeLibraries(NativeImageGenerator.java:1090)
at com.oracle.svm.hosted.NativeImageGenerator.setupNativeImage(NativeImageGenerator.java:907)
at com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:580)
at com.oracle.svm.hosted.NativeImageGenerator.lambda$run$2(NativeImageGenerator.java:495)
at java.base/java.util.concurrent.ForkJoinTask$AdaptedRunnableAction.exec(ForkJoinTask.java:1414)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:295)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1016)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1665)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1598)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
I dont know if the error is because of some version mismatch or wrong library. Please let me know if I am missing anything
This SO question seems to be about the same sort of issue, though not exactly. While I do not know if it will help, you may need to set another env variable pointing to the VC runtime

LNK1181: Visual Studio cannot find object file

I am using Microsoft Visual Studio Professional 2017 15.9.29 when compiling a project.
Compilation goes well, but linker shows an error
LINK : fatal error LNK1181: cannot open
"H:\work\build\Release_x64\intermediate\plugin\Helper.obj"
I checked the file. It does not exist. Any reasonable thought would be helpful.
/P compiler option was on, and object files were not generated.

Chromium Embedded Framework won't build or run

I'm trying out the tutorial for Windows on the wikipage of CEF at https://bitbucket.org/chromiumembedded/cef/wiki/Tutorial.
However, the CEF builds for 32 bit and 64 bit won't build/run on Visual Studio 2010.
By the way, I'm running Windows 7 (64 bit) and Visual Studio 2010.
Here are the errors:
32 bit Build
- error LNK2038: mismatch detected for '_MSC_VER': value '1800' doesn't match value '1600' in simple_app.obj
- (A THOUSAND LINES OF ERRORS)
- out\Debug\cefsimple.exe : fatal error LNK1120: 11 unresolved externals
64 bit Build
- out\Debug\obj\libcef_dll_wrapper\transfer_util.obj : fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64'
- LINK : fatal error LNK1104: cannot open file 'C:\Users\Benj\Desktop\Blueprint Gaming\Chromium Embedded Framework\64 Bit\cef_binary_3.1921.1661_windows64\out\Debug\lib\libcef_dll_wrapper.lib'
I assume you are referring to either the cef_simple or the cef_client projects that come bundled with the libraries...
Fix
Set the macro value for CEF_ENABLE_SANDBOX to 0 in cef_simple.cpp and cefclient_win.cpp
What's happening
The error indicates that a library you are linking to is not compatible with simple_app.obj. In this case, this library (cef_sandbox.lib) is built with _MSC_VER 1800 (that's VS2013 beta, if I am not wrong) while your current environment is _MSC_VER 1600 (VS2010).
Had the same problem a couple days back - cheers!

Can't Install MSVCP100.dll

I'm using CMake to build a Qt based application of mine on Windows with Visual Studio 2010 Express. When configuring with cmake I get the following error:
System runtime library file does not exists:
'MSVC10_REDIST_DIR-NOTFOUND/x86/Microsoft.VC100.CRT/msvcp100.dll
System runtime library file does not exists:
'MSVC10_REDIST_DIR-NOTFOUND/x86/Microsoft.VC100.CRT/msvcr100.dll
Then when I try to compile, I'm getting this error (both trying in Visual Studio, and with msbuild):
MSVCRT.lib(crtexew.obj) : error LNK2019: unresolved external symbol _WinMain#16 referenced in function ___tmainCRTStartup
C:\Users\Kurtis\sandbox\UDJ-Desktop-Client\build\src\Release\UDJ.exe : fatal error LNK1120: 1 unresolved externals
I determined that Microsoft Visual C++ 2010 Express doesn't come with the redistributable that I need. So I went to Microsoft's website to download the redistributable (both for x86 and x64). However, after installing it, I'm still getting the above configure and compile errors. Does anyone know what I'm doing wrong, or how to fix my problem?
_WinMain#16 is the entry point of a Windows GUI application, so either it's missing from your source code, or you're not writing a GUI application, in which case your linker flags are incorrect.
Since you're using qt, make sure you have the QtMain Library being linked with your project. You can do this by adding it in your call to Find_Package like so:
find_package(Qt4 4.7.0 COMPONENTS QtMain QtCore QtGui QtSQL Phonon REQUIRED)

Visual Studio 2010 includes MFC even though empty console application is specified (C++)

I've spent most of my day trying to figure out why this error is occurring but it continues to mystify me.
I created a console application in Visual C++ and specified it to be empty. After putting all of my source in the virtual folder and compiling it an error occurred:
c:\program files\microsoft visual studio 10.0\vc\atlmfc\include\afx.h(24): fatal error C1189: #error : Building MFC application with /MD[d] (CRT dll version) requires MFC shared dll version. Please #define _AFXDLL or do not use /MD[d]
c:\program files\microsoft visual studio 10.0\vc\atlmfc\include\afx.h(24): fatal error C1189: #error : Building MFC application with /MD[d] (CRT dll version) requires MFC shared dll version. Please #define _AFXDLL or do not use /MD[d]
c:\program files\microsoft visual studio 10.0\vc\atlmfc\include\afx.h(24): fatal error C1189: #error : Building MFC application with /MD[d] (CRT dll version) requires MFC shared dll version. Please #define _AFXDLL or do not use /MD[d]
Strange error indeed, because I never included any MFC files. So I remedied the situation by specifying "/MT" in the code generation settings.
This worked well...until I decided to include "Windows.h", which spawned this error:
c:\program files\microsoft visual studio 10.0\vc\atlmfc\include\afxv_w32.h(16): fatal error C1189: #error : WINDOWS.H already included. MFC apps must not #include windows.h
c:\program files\microsoft visual studio 10.0\vc\atlmfc\include\afxv_w32.h(16): fatal error C1189: #error : WINDOWS.H already included. MFC apps must not #include windows.h
I've tried everything I could think of, including recreating the project with and without precompiled headers, a Win32 app rather than console, and a WxWidget app. All of these apps seemingly try to include MFC even though I never specified. Can anyone shed some light on this problem? Thank you!
Find out what's including the MFC headers - the /showIncludes option may help with that.
Which in the IDE project property page is under:
C/C++ | Advanced | Show Includes
Once you know who is including them you can make a decision on how to address the problem - you might simply be able to remove an errant #include, but it might require jettisoning a library you're using that's dependent on MFC.
Make sure 'USE of MFC' is in 'Use MFC in a Shared DLL' setting. That fixed it for me.
If MFC is required, set the following values ( Debug/Win32 ):
Configuration Properties > General :
Use of MFC : Use MFC in a Shared DLL
Configuration Properties > C/C++ > Code Generation :
Runtime Library : /MDd
If MFC is not required, and only standard window libraries are required, keep the setting as below.
Configuration Properties > General :
Use of MFC : Use Standard Windows Libraries
Configuration Properties > C/C++ > Code Generation :
Runtime Library : /MTd

Resources