Compiling SQLite for Windows Phone 8 - sqlite

With reference to the question Build SQLite for Windows Phone 8
I am also having same problem with compiling SQLite for Windows Phone 8. I tried with
nmake -f Makefile.msc sqlite3.dll FOR_WINRT=1
I am compiling using VS 2012 X86 Phone Tools Command Prompt. And also I noticed it is picking proper cl.exe. But it is complaining about missing 'winreg.h' header file. I dont see this header file is available under Windows Phone kit folder.
vs console Log :
sqlite3.c
C:\Program Files (x86)\Windows Phone Kits\8.0\include\windows.h(182) : fatal err
or C1083: Cannot open include file: 'winreg.h': No such file or directory
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 11.0
\VC\WPSDK\WP80\BIN\cl.EXE"' : return code '0x2'
Stop.
And also, I checked Makefile.msc, I dont find any specific compiler option available for WP8. I have successfully compiled for WIN RT following Tim Heuer Note.

See if this helps you with your issue.
Right click on the project where you are getting the error mentioned in your question.
Check for the Build and in Conditional Compilation Symbols paste SILVERLIGHT;WINDOWS_PHONE;USE_WP8_NATIVE_SQLITE
Hope this helps

Related

QT: fatal error C1083: Cannot open include file: 'type_traits'

I've been spending almost all day trying to get QT installed on my windows machine. I have installed QTCreator with QT 5.14.1 and QWT 6.1.3 (have also tried 6.2.0) and following these instructions with QWT: https://qwt.sourceforge.io/qwtinstall.html
Everything goes fine until I get to the same point where after running nmake it prints:
qwt.cpp
..\..\..\Qt\Qt5.14.2\5.14.2\msvc2017_64\include\QtCore\qglobal.h(45) : fatal error C1083: Cannot open include file: 'type_traits': No such file or directory
qwt_abstract_scale_draw.cpp
..\..\..\Qt\Qt5.14.2\5.14.2\msvc2017_64\include\QtCore\qglobal.h(45) : fatal error C1083: Cannot open include file: 'type_traits': No such file or directory
qwt_bezier.cpp
..\..\..\Qt\Qt5.14.2\5.14.2\msvc2017_64\include\QtCore\qglobal.h(45) : fatal error C1083: Cannot open include file: 'type_traits': No such file or directory
My path variables show that the include directory where type_traits exists is most definitely there.
Any pointers would be great. I'm not sure what else I can possibly do. I've uninstalled and reinstalled my entire .net framework, same with QT.
I ended up solving this, and it turned out to be an issue with the compilers I was selecting. I figure this could help people down the line so I will post what I documented on my company portal - the instructions I have written are as follows:
=====
Realistically, it doesn't matter which kit you select, as long as the compiler and QT version is set up correctly. What will indicate a correct kit setup is the display of a monitor logo at the label.
Configure a kit by first selecting it as default
C and C++ Compiler -> ''Microsoft Visual C++ Compiler 15.9.xxxx''
Compiler version 15.9.xxxx is a part of Microsoft Visual Studio 2017. If you cannot find this compiler in the drop down box, it is most likely because you are missing the 2017 install. Download the BUILD TOOLS and REDIST PACKAGE from here.
Debugger -> ''C:\Program Files (x86)\Windows Kits\10\Debuggers\x86\cdb.exe''
If you can't find the debugger, it means you are missing the Windows 10 SDK. [[https://developer.microsoft.com/en-us/windows/downloads/windows-sdk/|Download from here]].
QT Version -> ''Qt 5.14.1 MSVC 2017 32bit''
CMake generator (not sure how important this is, but it seems to make the compile run): Ninja

Qt Postgresql driver build failed

I downloaded zip archive of the binaries from Postgresql website, unpacked it.
Then found .pro file in "...\src\plugins\sqldrivers\psql".
When I tried to built postgresql driver (qmake and then nmake ofc) I get this error messages:
LINK : fatal error LNK1104: cannot open file ''C:/CL/pgsql/lib.obj''
NMAKE : fatal error U1077: "C:\Program Files (x86)\Microsoft Visual Studio 9.0\V
C\BIN\link.EXE": return code "0x450"
Stop.
NMAKE : fatal error U1077: "C:\Program Files (x86)\Microsoft Visual Studio 9.0\V
C\BIN\nmake.exe": return code "0x2"
What is lib.obj here? There definently no such files in postgres zip archive (I followed instruction and there said that files in posgresql /lib and /include enough ) where could it be?
Or, maybe, I missed something?
Here's my psql.pro file
TARGET = qsqlpsql
SOURCES = main.cpp
INCLUDEPATH += "C:/CL/pgsql/include"
LIBS+="C:/CL/pgsql/lib"
include(../../../sql/drivers/psql/qsql_psql.pri)
include(../qsqldriverbase.pri)
LIBS refers to both directories and single files depending on the switches
See the documentation for a description on how to use it.
You might want C:/CL/pgsql/lib/libpq.lib instead, referring to the specific file of interest.
I haven't used QMake in ages, but that's how it looks from the error.
(See RobbieE's answer for the docs link and explanation).

Can't Install QtMobility [Windows 64-bit]

I've downloaded and installed the QT SDK and downloaded the QT Mobility source.
Following the provided instructions, I navigated to my QtMobility directory via the Visual Studio Command Prompt (2010)... note, this is the QtMobility dir with the bin, plugins, examples, etc. folders.
D:\
cd D:\Files\Downloads\QtMobility
configure
Regardless of whether I gave configure a -prefix parameter or not, the following output was displayed:
Checking available Qt
4.8.2
Checking make
... Unknown target environment .
Cannot find 'nmake', 'mingw32-make' or 'make' in your PATH
Aborting.
Of course, I then went to see if my computer had nmake in its PATH: the directory is added as follows:
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin
I went to CMD and typed in "nmake /?" to receive proper output.
What am I doing wrong? When I try to simply run nmake in the QTMobility directory, it displays:
NMAKE : fatal error U1064: MAKEFILE not found and no target specified
Stop.
Help, please! Thank you. :) I will continue attempting debugs on my own...
I suppose this is late but you could simply run the visual studio command prompt, as it has specific env. variables preset to find nmake, etc.

Building Qt 4.7 Windows Mobile 6 ARM

I'm trying to build QT for CE6 using the VS2008 compiler with the Mobile 6 SDK ARM tools. I'm following the instructions on the Qt site in regards to include locations and my directories seem to match exactly with the exception that I'm on Windows 7, so the program files directory has(x86) inside of it.
Include dirs are
C:\Program Files (x86)\Windows Mobile 6 SDK\PocketPC\Include\Armv4i
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\ce\include
I configure with:
configure -platform win32-msvc2008 -xplatform wincewm60professional-msvc2008
followed by nmake.
I then get:
tools\qbytearray.cpp(137) : error C3861: 'strcpy_s': identifier not found
If I add some defines around the offending lines, I can get past this point, but then I hit a bunch of
C:\Program Files (x86)\Windows Mobile 6 SDK\PocketPC\Include\Armv4i\types.h(59)
: error C2143: syntax error : missing ';' before '*'
It seems that this build platform should be well supported and I'm a bit baffled how the strcpy_s thing would even be there.
Is anyone getting this to compile with the standard CE6 SDK? Do I need to use a custom SDK for our platform to get this to compile?
I'd also be curious if anyone has webkit running on mobile 6.
Any help appreciated.

How to compile Qt 4.5.1 on Windows XP for WinCE?

I'm trying to compile Qt 4.5.1 on Windows XP targeting wince50.
I have the prerequisites installed (VS2008, WinCE50SDK, ActivePerl 5.10) and have downloaded the qt-embedded-wince-opensource-src-4.5.1.zip which has been installed in c:\Qt\4.5.1 and c:\Qt\4.5.1\bin has been added to the path.
From a VS command prompt, I navigate to c:\Qt\4.5.1 and execute the following:
configure -platform win32-msvc2008 -xplatform wince50standard-armv4i-msvc2008 -qt-gif -qt-libjpeg -qt-libpng -webkit -openssl -arch windowsce -opensource -iwmmxt
and I get the following error:
c:\qt\4.5.1\include\qtcore\../../src/corelib/tools/qvector.h(758) : fatal error C1083: Cannot open include file: 'QtCore/QPointF': No such file or directory
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\cl.EXE"' : return code '0x2'
Stop.
I've tried this with previous versions of Qt, down to 4.4.3 and on two differnt XP machines (one with a clean build) and with various different configure options. Every time I get the same error.
What am I missing?
UPDATE:
OK, I've got a little further, though it's probably a dead end.
If I use qt-all-opensource-src-4.5.1 as a base then run configure it succeeds to build qmake, but then fails on missing wince files. So I then take the src and include folders from qt-embedded-wince-opensource-src-4.5.1 and copy them over the top of the qt-all folders then configure completes successfully.
But then nmake fails with the following error:
tmp\obj\debug_shared\qtmain_win.obj : fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'THUMB'
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\lib.EXE"' : return code '0x458'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
The fact that configure worked with this approach implies to me that the qt-embedded-wince-opensource-src-4.5.1 release has missing content.
Any suggestions as to what to try next to get this to compile would be very welcome.
Have you set up the environment variables correctly? I.e. it's often nice to have a .bat with the respective INCLUDE and LIB definitions. If you've installed Qt, there's a Qt command shell installed that can serve as a nice template, giving you command prompt that has the correct environment variables depending on which Qt version you want to use.
So did I - make sure you downloaded the WinCE package and NOT the Windows installer as this doesn't have support for WinCE.
qt-embedded-wince-opensource-src-4.5.1.zip doesn't seem to be missing files, it contains include\QtCore\QPointF as it should. I tested that source package and I can configure fine.
Does the file c:\Qt\4.5.1\include\QtCore\QPointF exist after you extract the source package?
I may be grasping at straws here, but: what program did you use to unzip the sources? The filename in your error message is displayed all in lower case, did your unzip program convert all files to lower case? Are you using a case-sensitive filesystem? (I don't know if that's even possible on Windows...) This may be a red herring, for all I know cl.exe arbitrarily lowercases filenames in error messages.
If this doesn't help, please post some more of the error, so we can tell what precisely is failing to compile and what arguments were passed to cl.exe.

Resources