Makefile for Java Bindings via Swig fails - makefile

I have a makefile for Java bindings of a common GIS library (GDAL) which I'd like to compile from source. Compilation of the main executables does work, but the bindings don't compile. Maybe someone has an advice for me.
I set all path in my nmake.opt file:
###############################################################################
# Location to install .exe, .dll and python stuff
# Edit as required. GDAL_HOME is used for convenience here,
# but this particular relative organization is not mandatory.
# But the paths *should* be absolute (relative paths mess up in submakefiles).
!IFNDEF GDAL_HOME
GDAL_HOME = "C:\gdal-2.1.3\bld"
!ENDIF
!IFNDEF BINDIR
BINDIR = $(GDAL_HOME)\bin
!ENDIF
!IFNDEF PLUGINDIR
PLUGINDIR = $(BINDIR)\gdalplugins
!ENDIF
!IFNDEF LIBDIR
LIBDIR = $(GDAL_HOME)\lib
!ENDIF
!IFNDEF INCDIR
INCDIR = $(GDAL_HOME)\include
!ENDIF
!IFNDEF DATADIR
DATADIR = $(GDAL_HOME)\data
!ENDIF
!IFNDEF HTMLDIR
HTMLDIR = $(GDAL_HOME)\html
!ENDIF
# Set this to the installed directory containing python. If you don't
# have python just let it point to a directory that does not exist (as now).
!IFNDEF PYDIR
PYDIR = "C:\Software\Python24"
!ENDIF
# Set the location of your SWIG installation
!IFNDEF SWIG
SWIG = "C:\OSGeo4W64\apps\swigwin\swig.exe"
!ENDIF
# SWIG Java settings
!IFNDEF JAVA_HOME
JAVA_HOME = "C:\Program Files\Java\jdk1.8.0_121"
!ENDIF
!IFNDEF ANT_HOME
ANT_HOME="C:\OSGeo4W64\bin\apache-ant-1.10.1"
!ENDIF
JAVADOC=$(JAVA_HOME)\bin\javadoc
JAVAC=$(JAVA_HOME)\bin\javac
JAVA=$(JAVA_HOME)\bin\java
JAR=$(JAVA_HOME)\bin\jar
JAVA_INCLUDE= -I $(JAVA_HOME)\include -I $(JAVA_HOME)\include\win32
This later JAVA_INCLUDE seems to result in an error with CL.exe:
cl : Befehlszeile warning D9024 : Unbekannter Typ der Quelldatei "Files\Java\jdk1.8.0_121\include", Objektdatei wird angenommen.
cl : Befehlszeile warning D9027 : Quelldatei "Files\Java\jdk1.8.0_121\include" wird ignoriert.
cl : Befehlszeile warning D9024 : Unbekannter Typ der Quelldatei "Files\Java\jdk1.8.0_121\include\win32", Objektdatei wird angenommen.
cl : Befehlszeile warning D9027 : Quelldatei "Files\Java\jdk1.8.0_121\include\win32" wird ignoriert.
ogr_wrap.cpp
c:\gdal-2.1.3\swig\java\ogr\ogr_wrap.cpp(159): fatal error C1083: Datei (Include) kann nicht geöffnet werden: "jni.h": No such file or directory
NMAKE : fatal error U1077: ""C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.EXE"": Rückgabe-Code "0x2"
Stop.
NMAKE : fatal error U1077: ""C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\nmake.EXE"": Rückgabe-Code "0x2"Stop.
NMAKE : fatal error U1077: ""C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\nmake.EXE"": Rückgabe-Code "0x2"Stop.
The paths are correct, but why does it return an unknown object type? Is there a mistake I made?

The blank spaces of the path caused a wrong parsing. Therefore it didn't compile.

Related

Raspberry Pi Pico SDK build Error (LINK : fatal error LNK1104: cannot open file 'cmTC_9542e.exe')

I am installing Raspberry Pi Pico SDK using the pre-built installer.
I am getting the error LINK : fatal error LNK1104: cannot open file 'cmTC_9542e.exe'
The same installer is working properly on the different development machine.
Error
Building blink
Microsoft (R) Program Maintenance Utility Version 14.32.31332.0
Copyright (C) Microsoft Corporation. All rights reserved.
Scanning dependencies of target bs2_default
[ 0%] Building ASM object pico-sdk/src/rp2_common/boot_stage2/CMakeFiles/bs2_default.dir/compile_time_choice.S.obj
[ 0%] Linking ASM executable bs2_default.elf
[ 0%] Built target bs2_default
[ 0%] Generating bs2_default.bin
[ 0%] Generating bs2_default_padded_checksummed.S
[ 0%] Built target bs2_default_padded_checksummed_asm
[ 0%] Creating directories for 'ELF2UF2Build'
[ 0%] No download step for 'ELF2UF2Build'
[ 0%] No update step for 'ELF2UF2Build'
[ 0%] No patch step for 'ELF2UF2Build'
[ 0%] Performing configure step for 'ELF2UF2Build'
-- The C compiler identification is MSVC 19.32.31332.0
-- The CXX compiler identification is MSVC 19.32.31332.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.32.31326/bin/Hostx86/x86/cl.exe
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.32.31326/bin/Hostx86/x86/cl.exe - broken
CMake Error at C:/Program Files/CMake/share/cmake-3.23/Modules/CMakeTestCCompiler.cmake:69 (message):
The C compiler
"C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.32.31326/bin/Hostx86/x86/cl.exe"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: C:/Pico/pico-examples/build/elf2uf2/CMakeFiles/CMakeTmp
Run Build Command(s):nmake -f Makefile /nologo cmTC_9542e\fast && "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.32.31326\bin\HostX86\x86\nmake.exe" -f CMakeFiles\cmTC_9542e.dir\build.make /nologo -L CMakeFiles\cmTC_9542e.dir\build
Building C object CMakeFiles/cmTC_9542e.dir/testCCompiler.c.obj
"C:\Program Files\CMake\bin\cmake.exe" -E cmake_cl_compile_depends --dep-file=CMakeFiles\cmTC_9542e.dir\testCCompiler.c.obj.d --working-dir=C:\Pico\pico-examples\build\elf2uf2\CMakeFiles\CMakeTmp --filter-prefix="Note: including file: " -- C:\PROGRA~1\MIB055~1\2022\COMMUN~1\VC\Tools\MSVC\1432~1.313\bin\Hostx86\x86\cl.exe #C:\Users\Test\AppData\Local\Temp\nm15C.tmp
testCCompiler.c
Linking C executable cmTC_9542e.exe
"C:\Program Files\CMake\bin\cmake.exe" -E vs_link_exe --intdir=CMakeFiles\cmTC_9542e.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100190~1.0\x86\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100190~1.0\x86\mt.exe --manifests -- C:\PROGRA~1\MIB055~1\2022\COMMUN~1\VC\Tools\MSVC\1432~1.313\bin\Hostx86\x86\link.exe /nologo #CMakeFiles\cmTC_9542e.dir\objects1.rsp #C:\Users\Test\AppData\Local\Temp\nm1AC.tmp
FINAL LINK: command "C:\PROGRA~1\MIB055~1\2022\COMMUN~1\VC\Tools\MSVC\1432~1.313\bin\Hostx86\x86\link.exe /nologo #CMakeFiles\cmTC_9542e.dir\objects1.rsp /out:cmTC_9542e.exe /implib:cmTC_9542e.lib /pdb:C:\Pico\pico-examples\build\elf2uf2\CMakeFiles\CMakeTmp\cmTC_9542e.pdb /version:0.0 /machine:X86 /debug /INCREMENTAL /subsystem:console kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTFILE:CMakeFiles\cmTC_9542e.dir/intermediate.manifest CMakeFiles\cmTC_9542e.dir/manifest.res" failed (exit code 1104) with the following output:
LINK : fatal error LNK1104: cannot open file 'cmTC_9542e.exe'
NMAKE : fatal error U1077: '"C:\Program Files\CMake\bin\cmake.exe"' : return code '0xffffffff'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.32.31326\bin\HostX86\x86\nmake.exe"' : return code '0x2'
Stop.
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:2 (project)
-- Configuring incomplete, errors occurred!
See also "C:/Pico/pico-examples/build/elf2uf2/CMakeFiles/CMakeOutput.log".
See also "C:/Pico/pico-examples/build/elf2uf2/CMakeFiles/CMakeError.log".
NMAKE : fatal error U1077: 'echo' : return code '0x1'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.32.31326\bin\HostX86\x86\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.32.31326\bin\HostX86\x86\nmake.exe"' : return code '0x2'
Stop.
C:\Pico>

CLIon - can't get visual studio toolchain to work: cannot open file 'MSVCRTD.lib'

CMake Error at C:/Program Files/JetBrains/CLion 2019.1.3/bin/cmake/win/share/cmake-3.14/Modules/CMakeTestCCompiler.cmake:60 (message):
The C compiler
"C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx64/x64/cl.exe"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: C:/Users/dbak/Projects/firmware/testing/cmake-build-release-visual-studio/CMakeFiles/CMakeTmp
Run Build Command(s):nmake /nologo cmTC_99064\fast
"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX64\x64\nmake.exe" -f CMakeFiles\cmTC_99064.dir\build.make /nologo -L CMakeFiles\cmTC_99064.dir\build
Building C object CMakeFiles/cmTC_99064.dir/testCCompiler.c.obj
C:\PROGRA~2\MICROS~1\2017\Community\VC\Tools\MSVC\14.16.27023\bin\Hostx64\x64\cl.exe #C:\Users\dbak\AppData\Local\Temp\nm9D03.tmp
testCCompiler.c
Linking C executable cmTC_99064.exe
"C:\Program Files\JetBrains\CLion 2019.1.3\bin\cmake\win\bin\cmake.exe" -E vs_link_exe --intdir=CMakeFiles\cmTC_99064.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\10.0.17763.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\10.0.17763.0\x64\mt.exe --manifests -- C:\PROGRA~2\MICROS~1\2017\Community\VC\Tools\MSVC\14.16.27023\bin\Hostx64\x64\link.exe /nologo #CMakeFiles\cmTC_99064.dir\objects1.rsp #C:\Users\dbak\AppData\Local\Temp\nm9E1D.tmp
LINK Pass 1: command "C:\PROGRA~2\MICROS~1\2017\Community\VC\Tools\MSVC\14.16.27023\bin\Hostx64\x64\link.exe /nologo #CMakeFiles\cmTC_99064.dir\objects1.rsp /out:cmTC_99064.exe /implib:cmTC_99064.lib /pdb:C:\Users\dbak\Projects\firmware\testing\cmake-build-release-visual-studio\CMakeFiles\CMakeTmp\cmTC_99064.pdb /version:0.0 /machine:x64 /debug /INCREMENTAL /subsystem:console kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTFILE:CMakeFiles\cmTC_99064.dir/intermediate.manifest CMakeFiles\cmTC_99064.dir/manifest.res" failed (exit code 1104) with the following output:
LINK : fatal error LNK1104: cannot open file 'MSVCRTD.lib'
NMAKE : fatal error U1077: '"C:\Program Files\JetBrains\CLion 2019.1.3\bin\cmake\win\bin\cmake.exe"' : return code '0xffffffff'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX64\x64\nmake.exe"' : return code '0x2'
Stop.
CMake will not be able to correctly generate this project.
CMake Warning (dev) in CMakeLists.txt:
No cmake_minimum_required command is present. A line of code such as
cmake_minimum_required(VERSION 3.14)
should be added at the top of the file. The version specified may be lower
if you wish to support older CMake versions for this project. For more
information run "cmake --help-policy CMP0000".
However, MSVCRTD.lib is located at "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\lib\x64". So I do not know what I can possibly do. Is this some issue with Clion not having that location in path?
Maybe change architecture to x86?
Where to find architecture setting

Compile Apache APR on Windows

The end result is I am trying to compile something that requires the APR from Apache on Windows.
Edit: Tried Visual Studio command line tools for VS2013 & VS2014.
Link for SVN checkout shows 404: http://apr.apache.org/anonsvn.txt
so...
From this link http://apr.apache.org/compiling_win32.html I have downloaded the three files. I unzipped them and renames them as the directory structure suggested.
C:\work\apr\
C:\work\apr-iconv\
C:\work\apr-util\
Moved to the apr-util directory and ran the following make command and received the following errors.
Note there is the comment about "Current versions of APR do not need awk..." but the link does not work, does it matter?
Anybody have any luck compiling this, do I need other lib/include/objects?
nmake -f Makefile.win buildall checkall installall clean
Received the following errors:
<clip>
rc.exe /l 0x409 /fo".\Release\libapriconv.res" /i "./include" /i "../apr/include" /d "NDEBUG" /d "API_VERSION_ONLY" .\libapriconv.rc
Microsoft (R) Windows (R) Resource Compiler Version 6.3.9600.17336
Copyright (C) Microsoft Corporation. All rights reserved.
link.exe #C:\Users\JOHNAT~1\AppData\Local\Temp\nm390A.tmp
Creating library .\Release\libapriconv-1.lib and object .\Release\libapriconv-1.exp
if exist .\Release\libapriconv-1.dll.manifest mt.exe -manifest .\Release\libapriconv-1.dll.manifest -outputresource:.\Release\libapriconv-1.dll;2
echo Helper for Post-build step > ".\Release\postbld.dep"
cd ccs
"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\BIN\nmake.exe" -nologo -f Makefile.win all BUILD_MODE="Win32 Release" BIND_MODE=shared adobe-stdenc.c
Creating library ..\Release\iconv\adobe-stdenc.lib and object ..\Release\iconv\adobe-stdenc.exp
adobe-stdenc.obj : error LNK2011: precompiled object not linked in; image may not run
..\Release\iconv\adobe-stdenc.so : fatal error LNK1120: 1 unresolved externals
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\BIN\link.EXE"' : return code '0x460'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\BIN\nmake.exe"' : return code '0x2'
Stop.
It's a little late, but here is how I fixed it.
In the build\modules.mk.win makefile change line 221 from
$(SILENT)link $(ALL_LDFLAGS) $*.obj $(API_LIBS) /out:$# \
To
$(SILENT)link $(ALL_LDFLAGS) $*.obj $(MODRES).obj $(API_LIBS) /out:$# \
The shared library target will now read:
.c{$(OUTPUT_DIR)}.so:
$(SILENT)cl $(ALL_CFLAGS) /Fo$*.obj /Yuiconv.h /c $<
$(SILENT)link $(ALL_LDFLAGS) $*.obj $(MODRES).obj $(API_LIBS) /out:$# \
/base:#"..\build\BaseAddr.ref",$(#F)
$(SILENT)if exist $#.manifest \
$(SILENT)mt -nologo -manifest $#.manifest -outputresource:$#;2 \
& del "$#.manifest"
$(SILENT)del "$*.exp" & del "$*.lib"
Source: https://gist.github.com/mkhon/01a1536b01e0065ae799
From the apache-apr project site under heading:
Developer Studio Workspace/Microsoft Development Environment IDE Build::
Open the apr-util/aprutil.dsw workspace, and choose either aprutil or libaprutil (for static or dynamic libraries) with the Release or Debug build as the Active Project. aprutil.dsw causes all related projects to be built.
Maybe you overlooked this statement : choose either aprutil or libaprutil as the Active Project...
Then build the active project.

Why /Yu and /Yc works on Visual Studio but not with NMake

I have library.dll who have a stdafx.cpp files. I've create a CMakeLists to make solution for Visual and MakeFiles. When I use the Generator "Visual Studio 12 2013", that compile fine and take this following lines:
set_target_properties(core PROPERTIES COMPILE_FLAGS "/Yustdafx.h")
set_source_files_properties(../core/src/stdafx.cpp PROPERTIES COMPILE_FLAGS "/Ycstdafx.h")
without any problem.
But when I used the NMake MakeFiles generator, it fails and ouput this error :
d:\path\to\core\src\filepath.cpp(4) : fatal error C1083: Ca
nnot open precompiled header file: 'stdafx.pch': No such file or directory
NMAKE : fatal error U1077: 'C:\PROGRA~2\MICROS~3.0\VC\bin\cl.exe' : return code
'0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 12.0
\VC\BIN\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 12.0
\VC\BIN\nmake.exe"' : return code '0x2'
Stop.
Why he finds the precompiled headers with Visual Studio and not with Nmake ?
The only way to compile is to remove the 2 lines I put above for /Yu and /Yc. Is it normal ?
EDIT :
Here is my CMakeLists.txt :
project(core CXX)
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /MANIFEST:NO")
# Path of Release
SET(BIN_RELEASE_PATH "../../build/cmake_x86")
SET( CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE "${BIN_RELEASE_PATH}/bin/" )
SET( CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE "${BIN_RELEASE_PATH}/bin/" )
SET( CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE "${BIN_RELEASE_PATH}/bin/" )
# Path of Debug
SET(BIN_DEBUG_PATH "../../build/cmake_x86d")
SET( CMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG "${BIN_DEBUG_PATH}/bin/" )
SET( CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG "${BIN_DEBUG_PATH}/bin/" )
SET( CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG "${BIN_DEBUG_PATH}/bin/" )
# Flags
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4 /D_UNICODE /D_USRDLL /DCORE_EXPORTS /DUNICODE")
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Zi /GL /Oi /Gy /O2 /GR- /Gm- /DEBUG")
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /GS /analyze- /W4 /Zc:wchar_t /ZI /Gm /Od /fp:precise /DWIN32 /D_WINDOWS /D_USRDLL /DCORE_EXPORTS /D_WINDLL /errorReport:prompt /WX- /Zc:forScope /RTC1 /GR- /Gd /Oy- /MDd /FaDebug /EHsc /nologo /FoDebug ")
# Files of library
add_library(
core
SHARED
../core/src/file.h
...
../core/src/file.cpp
)
set_target_properties(core PROPERTIES COMPILE_FLAGS "/Yustdafx.h")
set_source_files_properties(../core/src/stdafx.cpp PROPERTIES COMPILE_FLAGS "/Ycstdafx.h")
Thanks for help.

how to build Qt5 with qtwebkit on Windows with MSVC 2008 - leveldb can't find stdint.h

On a Windows 7 x64 box:
I installed Microsoft Windows SDK for Windows 7 and .NET Framework 3.5 SP1
I downloaded and unzipped Qt5.4.0 source from the "Source packages and Other releases" section of http://www.qt.io/download-open-source/#
I built ICU 54.1 from source and installed it, per http://qt-project.org/wiki/Compiling-ICU-with-MSVC.
I created a command prompt shortcut per http://doc.qt.io/qt-5/windows-building.html.
I added stuff to the command prompt per http://qt-project.org/wiki/Building_Qt_5_from_Git and the Usage section of http://qt-project.org/wiki/Compiling-ICU-with-MSVC.
So my qt5vars.cmd is:
CALL "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\vcvars64.bat"
SET _ROOT=C:\qt\qt540
SET PATH=%_ROOT%\qtbase\bin;%_ROOT%\gnuwin32\bin;C:\Python27;C:\Python27\Scripts;%PATH%
REM Uncomment the below line when using a git checkout of the source repository
REM SET PATH=%_ROOT%\qtrepotools\bin;%PATH%
SET QMAKESPEC=win32-msvc2008
SET PATH=%PATH%;C:\icu\dist\lib;C:\Ruby193\bin
SET INCLUDE=%INCLUDE%;C:\icu\dist\include
SET LIB=%LIB%;C:\icu\dist\lib
SET _ROOT=
I updated qtwinextras\src\winextras\winshobjidl_p.h per Compiling Qt 5.3.2 + VS2008 + SDK7.1 error SHARDAPPIDINFOLINK.
Per https://groups.google.com/forum/#!topic/theano-users/JReP5_Ligu4 and C99 stdint.h header and MS Visual Studio, I copied stdint.h from C:\Program Files\Microsoft Visual Studio 10.0\VC\include on another machine, and pasted it into C:\Qt\qt540\qtwebkit\Source\WTF\wtf. I commented out the declaration of WCHAR_MIN, and copied that modified stdint.h to c:\qt\qt540\qtwebkit\source\javascriptcore\runtime.
With that setup, from the qt5vars.cmd prompt above, I configured Qt with:
configure -prefix %CD%\qtbase -developer-build -opensource -opengl
desktop -nomake tests -no-compile-examples -skip qtwebkit-examples
-icu -plugin-sql-sqlite -platform win32-msvc2008 -confirm-license
Then ran nmake. I get a bunch of errors that leveldb can't find stdint.h:
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\INCLUDE\xlocale(342) : warning C4530: C++ exception handler used, but unwind semantics are not enabled. Sp
ecify /EHsc
C:\Qt\qt540\qtwebkit\Source\ThirdParty\leveldb\db/filename.h(10) : fatal error C1083: Cannot open include file: 'stdint.h': No such file or directory
c.cc
C:\Qt\qt540\qtwebkit\Source\ThirdParty\leveldb\include\leveldb/c.h(50) : fatal error C1083: Cannot open include file: 'stdint.h': No such file or directory
dbformat.cc
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\INCLUDE\xlocale(342) : warning C4530: C++ exception handler used, but unwind semantics are not enabled. Sp
ecify /EHsc
C:\Qt\qt540\qtwebkit\Source\ThirdParty\leveldb\include\leveldb/db.h(8) : fatal error C1083: Cannot open include file: 'stdint.h': No such file or directory
db_impl.cc
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\INCLUDE\xlocale(342) : warning C4530: C++ exception handler used, but unwind semantics are not enabled. Sp
ecify /EHsc
C:\Qt\qt540\qtwebkit\Source\ThirdParty\leveldb\include\leveldb/db.h(8) : fatal error C1083: Cannot open include file: 'stdint.h': No such file or directory
db_iter.cc
C:\Qt\qt540\qtwebkit\Source\ThirdParty\leveldb\db/db_iter.h(8) : fatal error C1083: Cannot open include file: 'stdint.h': No such file or directory
filename.cc
C:\Qt\qt540\qtwebkit\Source\ThirdParty\leveldb\db/filename.h(10) : fatal error C1083: Cannot open include file: 'stdint.h': No such file or directory
log_reader.cc
C:\Qt\qt540\qtwebkit\Source\ThirdParty\leveldb\db/log_reader.h(8) : fatal error C1083: Cannot open include file: 'stdint.h': No such file or directory
log_writer.cc
C:\Qt\qt540\qtwebkit\Source\ThirdParty\leveldb\db/log_writer.h(8) : fatal error C1083: Cannot open include file: 'stdint.h': No such file or directory
memtable.cc
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\INCLUDE\xlocale(342) : warning C4530: C++ exception handler used, but unwind semantics are not enabled. Sp
ecify /EHsc
C:\Qt\qt540\qtwebkit\Source\ThirdParty\leveldb\include\leveldb/db.h(8) : fatal error C1083: Cannot open include file: 'stdint.h': No such file or directory
repair.cc
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\INCLUDE\xlocale(342) : warning C4530: C++ exception handler used, but unwind semantics are not enabled. Sp
ecify /EHsc
C:\Qt\qt540\qtwebkit\Source\ThirdParty\leveldb\include\leveldb/db.h(8) : fatal error C1083: Cannot open include file: 'stdint.h': No such file or directory
table_cache.cc
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\INCLUDE\xlocale(342) : warning C4530: C++ exception handler used, but unwind semantics are not enabled. Sp
ecify /EHsc
C:\Qt\qt540\qtwebkit\Source\ThirdParty\leveldb\db/table_cache.h(11) : fatal error C1083: Cannot open include file: 'stdint.h': No such file or directory
version_edit.cc
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\INCLUDE\xlocale(342) : warning C4530: C++ exception handler used, but unwind semantics are not enabled. Sp
ecify /EHsc
C:\Qt\qt540\qtwebkit\Source\ThirdParty\leveldb\include\leveldb/db.h(8) : fatal error C1083: Cannot open include file: 'stdint.h': No such file or directory
version_set.cc
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\INCLUDE\xlocale(342) : warning C4530: C++ exception handler used, but unwind semantics are not enabled. Sp
ecify /EHsc
C:\Qt\qt540\qtwebkit\Source\ThirdParty\leveldb\include\leveldb/db.h(8) : fatal error C1083: Cannot open include file: 'stdint.h': No such file or directory
write_batch.cc
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\INCLUDE\xlocale(342) : warning C4530: C++ exception handler used, but unwind semantics are not enabled. Sp
ecify /EHsc
C:\Qt\qt540\qtwebkit\Source\ThirdParty\leveldb\include\leveldb/db.h(8) : fatal error C1083: Cannot open include file: 'stdint.h': No such file or directory
Generating Code...
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\amd64\cl.EXE"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\amd64\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '(' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
There is a stdint.h in C:\Qt\qt540\qtwebkit\Source\ThirdParty\leveldb\port\win, but copying that file or my modified stdint.h to leveldb\db and leveldb\include\leveldb makes no difference - I get the same errors when building Qt.
What do I need to do to build qtwebkit with Qt, or at least get past this leveldb sdtint.h issue?
OK, I'm a dummy. Just needed to copy stdint.h to C:\Program Files\Microsoft Visual Studio 9.0\VC\include instead of to the path of every file that complains. Additionally, I commented out the declaration of WCHAR_MIN in stdint.h to avoid tons of warnings about redeclaring it.
Then using the configure statement in the original question, Qt5.4.0 built successfully, including qtwebkit! Took 11 hours to build, but it worked!

Resources