I've successfully compiled my WinRT version of SQLite for x86 as described by Tim Heuer.
However, I am still struggling how to compile the dll for WinRT on ARM CPUs. I've run nmake with the Visual Studio ARM command prompt, but that just gives me the following error:
C:\sqlite>nmake -f makefile.msc sqlite3.dll FOR_WINRT=1 OPTS=/DWINAPI_FAMILY=WIN
API_PARTITION_APP
Microsoft (R) Program Maintenance Utility Version 11.00.50522.1
Copyright (C) Microsoft Corporation. All rights reserved.
cl.exe -W3 -DNDEBUG -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS
-O2 -Zi /DEBUG -Femkkeywordhash.exe -DSQLITE_ENABLE_FTS3=1 -DSQLITE_ENABLE_RTR
EE=1 -DSQLITE_ENABLE_COLUMN_METADATA=1 -DSQLITE_MAX_TRIGGER_DEPTH=100 /DWINAPI_F
AMILY=WINAPI_PARTITION_APP .\tool\mkkeywordhash.c
Microsoft (R) C/C++ Optimizing Compiler Version 17.00.50522.1 for ARM
Copyright (C) Microsoft Corporation. All rights reserved.
mkkeywordhash.c
Microsoft (R) Incremental Linker Version 11.00.50522.1
Copyright (C) Microsoft Corporation. All rights reserved.
/machine:arm
/debug
/out:mkkeywordhash.exe
mkkeywordhash.obj
.\mkkeywordhash.exe > keywordhash.h
This version of C:\sqlite\mkkeywordhash.exe is not compatible with the version o
f Windows you're running. Check your computer's system information and then cont
act the software publisher.
NMAKE : fatal error U1077: '.\mkkeywordhash.exe' : return code '0x1'
Stop.
What am I doing wrong?
Thanks,
Adrian
I finally managed to make this work:
Compiled the x86 dll as described here:
http://timheuer.com/blog/archive/2012/05/20/using-sqlite-in-metro-style-app.aspx
Deleted only the sqlite3* files and the sqlitelib (many thanks to Banthar and Tim Heuer for the hint)
Compiled the ARM dll from the ARM VS command prompt with this command:
nmake -f makefile.msc sqlite3.dll FOR_WINRT=1 OPTS=/DWINAPI_FAMILY=WINAPI_PARTITION_APP
You can also get the binaries pre-compiled via this project:
https://github.com/praeclarum/sqlite-net/tree/master/lib/metro
Related
I recently re-installed Qt - and now I am having issues with my MySQL drivers for Qt. I now get the error:
QSqlDatabase: QMYSQL driver not loaded
QSqlDatabase: available drivers: QSQLITE QODBC QODBC3 QPSQL QPSQL7
So I am trying to build the QMYSQL Driver. So far I have...
Downloaded the MySQL Community installer by running mysql-installer-web-community-8.0.18.0.msi
And installed the x86 version of the MySQL Connector C 6.11, which saved to C:\Program Files (x86)\MySQL\MySQL Connector C 6.1
Opened a Developer Command Prompt for VS 2017 and ran:
CD "C:\Qt\5.12.6\Src\qtbase\src\plugins\sqldrivers"
qmake -- MYSQL_INCDIR="C:/Program Files (x86)/MySQL/MySQL Connector C 6.1/include" MYSQL_LIBDIR="C:/Program Files (x86)/MySQL/MySQL Connector C 6.1/lib"
Which seems to work, as I get "yes" for MySQL:
Running configuration tests...
Checking for DB2 (IBM)... no
Checking for InterBase... no
Checking for MySQL... yes
Checking for OCI (Oracle)... no
Checking for ODBC... yes
Checking for PostgreSQL... no
Checking for SQLite (version 2)... no
Checking for TDS (Sybase)... no
Done running configuration tests.
Configure summary:
Qt Sql Drivers:
DB2 (IBM) .............................. no
InterBase .............................. no
MySql .................................. yes
OCI (Oracle) ........................... no
ODBC ................................... yes
PostgreSQL ............................. no
SQLite2 ................................ no
SQLite ................................. yes
Using system provided SQLite ......... no
TDS (Sybase) ........................... no
Qt is now configured for building. Just run 'nmake'.
Once everything is built, you must run 'nmake install'.
Qt will be installed into 'C:\Qt\5.12.6\msvc2017_64'.
Prior to reconfiguration, make sure you remove any leftovers from
the previous build.
Note: I have also tried installing the x64 version of MySQL Connector C 6.1 instead of x86, but when I run QMAKE then (after adjusting the INCDIR and LIBDIR parameters from qmake) It says 'no' for MySQL - which I believe means that I am correct to be trying to use the x86 version.
Then from the same CMD I run: nmake sub-mysql but I get the error:
c:\qt\5.12.6\src\qtbase\src\plugins\sqldrivers\mysql\qsql_mysql_p.h(60): fatal error C1083: Cannot open include file: 'mysql.h': No such file or directory
main.cpp
c:\qt\5.12.6\src\qtbase\src\plugins\sqldrivers\mysql\qsql_mysql_p.h(60): fatal error C1083: Cannot open include file: 'mysql.h': No such file or directory
Generating Code...
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x86\cl.EXE"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x86\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
I've checked that 'mysql.h' DOES exist in 'C:\Program Files (x86)\MySQL\MySQL Connector C 6.1\include'.
Is there something else I am missing or doing wrong?
OS: Windows 10
Qt: 5.12.6
MySQL: C Connector 6.11 x86
Compiler: MSVC 2017
I'm using Ubuntu 16.04 LTS,
Docker-compose v 1.18.0-rc2, build 189468b
Docker version 17.12.0-ce-rc1, build ee2f943
Running this command: dotnet publish -o /output with docker results in this error:
ERROR: Service 'generator' failed to build: The command '/bin/sh -c
dotnet publish -c Release -o out' returned a non-zero code: 145
I've installed the .NET SDK for Ubuntu and not sure how to resolve this error; it just won't create that publish folder; here's dotnet --info
joel#worker-2:~/workspace/asp (copy)/api$ dotnet --info .NET Command
Line Tools (2.0.2)
Product Information: Version: 2.0.2 Commit SHA-1 hash:
a04b4bf512
Runtime Environment: OS Name: ubuntu OS Version: 16.04 OS
Platform: Linux RID: ubuntu.16.04-x64 Base Path:
/usr/share/dotnet/sdk/2.0.2/
Microsoft .NET Core Shared Framework Host
Version : 2.0.0 Build :
e8b8861ac7faf042c87a5c2f9f2d04c98b69f28d
Link to the same question worded differently with more error logs
The error you are seeing is because your project contains a global.json file that pins the required SDK version to 2.0.2. However, the docker images contain newer SDK versions (current one is 2.1.3) which. Because no 2.0.2 SDK is present in the docker image you use to build, it just errors out.
First, if you are using Ubuntu, docker for Windows is not relevant.
I see dotnet publish -c Release -o out used in "Dockerize a .NET Core application" (and the repo dotnet/dotnet-docker-samples) with images starting with
FROM microsoft/aspnetcore-build:2.0 AS build-env
It is a tag which is multi-arch, meaning it will pull either Windows or Linux containers depending on the host (here Ubuntu)
But you mention in your previous question following the pluralsight.com course docker-images-containers-aspdotnet-core, and that one might only work when done on Windows (meaning Windows server 2016/2017, able to execute Windows images)
When i build OpenBR on windows and when i type following code on VS2015 x86 x64 Cross Tools Command Prompt as mentioned in A hacker's guide to building, editing, and running OpenBR :
cmake -G "CodeBlocks - NMake Makefiles" -DCMAKE_PREFIX_PATH="H:/opencv-2.4.11/build/install;H:/Qt/Qtââ5.8/5.8/msvc2015_6ââ4" -DCMAKE_INSTALL_PREFIX="./install" -DBR_INSTALL_DEPENDENCIES=ON -DCMAKE_BUILD_TYPE=Release ..
i get this error :
H:\openbr\build-msvc2015>cmake -G "CodeBlocks - NMake Makefiles" -DCMAKE_PREFIX_
PATH="H:/opencv-2.4.11/build/install;H:/Qt/Qt5.8/5.8/msvc2015_64" -DC
MAKE_INSTALL_PREFIX="./install" -DBR_INSTALL_DEPENDENCIES=ON -DCMAKE_BUILD_TYPE=
Release ..
-- The C compiler identification is MSVC 19.0.23506.0
-- The CXX compiler identification is MSVC 19.0.23506.0
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio
14.0/VC/bin/x86_amd64/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio
14.0/VC/bin/x86_amd64/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studi
o 14.0/VC/bin/x86_amd64/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studi
o 14.0/VC/bin/x86_amd64/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- OpenCV ARCH: x64
-- OpenCV RUNTIME:
-- OpenCV STATIC: OFF
CMake Warning at H:/opencv-2.4.11/build-msvc2015/install/OpenCVConfig.cmake:161
(message):
Found OpenCV Windows Pack but it has not binaries compatible with your
configuration.
You should manually point CMake variable OpenCV_DIR to your build of OpenCV
library.
Call Stack (most recent call first):
CMakeLists.txt:88 (find_package)
CMake Error at CMakeLists.txt:88 (find_package):
Found package configuration file:
H:/opencv-2.4.11/build-msvc2015/install/OpenCVConfig.cmake
but it set OpenCV_FOUND to FALSE so package "OpenCV" is considered to be
NOT FOUND.
-- Configuring incomplete, errors occurred!
See also "C:/openbr/build-msvc2015/CMakeFiles/CMakeOutput.log".
what's problem?
Try to edit OpenCVConfig.cmake file (H:/opencv-2.4.11/build-msvc2015/install/OpenCVConfig.cmake). And set OpenCV_RUNTIME to VC14:
elseif(MSVC_VERSION EQUAL 1800)
set(OpenCV_RUNTIME vc12)
elseif(MSVC_VERSION EQUAL 1900)
set(OpenCV_RUNTIME vc14)
endif()
I try to build a static and different version of Qt(5.7) from the Source Code beside another installed version from binary package (5.6.1). I have been thoroughly following this tutorial building qt static library changing the "jom" command to "nmake" (I read somewhere that jom just make the build quicker),after successfully building with "jom" command (or "nmake", both command shows no error), I finally stuck at the last step "jom install", or in this instance "nmake install". When I inputted the command, I get this error:
C:\Qt\Qt5.6.1\5.7\qt-5.7.0>nmake install
Microsoft (R) Program Maintenance Utility Version 14.00.23026.0
Copyright (C) Microsoft Corporation. All rights reserved.
cd qtbase\ && ( if not exist Makefile C:\Qt\Qt5.6.1\5.7\qt-5.7.0\qtbase\
bin\qmake C:\Qt\Qt5.6.1\5.7\qt-5.7.0\qtbase\qtbase.pro -o Makefile ) &&
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\nmake.exe" -f Makefile install
Microsoft (R) Program Maintenance Utility Version 14.00.23026.0
Copyright (C) Microsoft Corporation. All rights reserved.
cd src\ && ( if not exist Makefile C:\Qt\Qt5.6.1\5.7\qt-5.7.0\qtbase\bin\qmake C:\Qt\Qt5.6.1\5.7\qt-5.7.0\qtbase\src\src.pro -o
Makefile) && "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\nmake.exe" -f Makefile install
Microsoft (R) Program Maintenance Utility Version 14.00.23026.0
Copyright (C) Microsoft Corporation. All rights reserved.
cd corelib\ && ( if not exist Makefile.qtzlib C:\Qt\Qt5.6.1\5.7\qt-5.7.0
\qtbase\bin\qmake C:\Qt\Qt5.6.1\5.7\qt-5.7.0\qtbase\src\corelib\qtzlib.pro -o Ma
kefile.qtzlib ) && "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\n
make.exe" -f Makefile.qtzlib install
Microsoft (R) Program Maintenance Utility Version 14.00.23026.0
Copyright (C) Microsoft Corporation. All rights reserved.
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\nmake.exe" -f Makefile.qtzlib.Debug install
Microsoft (R) Program Maintenance Utility Version 14.00.23026.0
Copyright (C) Microsoft Corporation. All rights reserved.
The filename, directory name, or volume label syntax is incorrect.
NMAKE : fatal error U1077: 'if' : return code '0x1'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0
\VC\BIN\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
I tried rebuilding the source code with both jom and nmake, reducing the environment variables path of the nmake to C:\PROGRA~2\MICROS~1.0\VC\bin, compiling all the modules one by one, still cannot do the "nmake install" or "jom install" command. Any ideas what went wrong?
Any help would be appreciated, thank you very much
The filename, directory name, or volume label syntax is incorrect.
In my case I set an unexists disk to -prefix argument of the confiture command, which cause this same error with yours.
I just simply replace all the F:(not exists) to E:(my qt is under this disk) in all Makefile and Makefile.* files, then nmake install works normally.
Hope this helps.
I am trying to build the AWS GPL 2015, but I get this error:
$ make setup build
gprbind xoscons.bexch
gnatbind xoscons.ali
gnatgcc -c b__xoscons.adb
gnatgcc xoscons.o -o xoscons
Setup OS specific definitions
Can not generate system tags. The test are disabled
aws.gpr:76:04: package "install" is forbidden in aggregate projects
gprbuild: "tools/tools.gpr" processing failed
makefile:183: recipe for target 'build-native' failed
make: *** [build-native] Error 4
I am using this GNAT:
$ gnat --version
GNAT 4.9.2
Copyright 1996-2014, Free Software Foundation, Inc.
That version of AWS requires 'gprinstall', so you should compile with GNAT GPL 2015 to get all the needed tools.