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).
Related
I've been using static built Qt 5.0.2 built in this directory
D:\Soft\programming\qt-5.4.2.
Now I have installed the prebuilt qt-windows-opensource-5.0.2-mingw47_32-x86-offline to C:\Qt\Qt5.0.2
qmake location as shown in QtCreator configuration is C:\Qt\Qt5.0.2\5.0.2\mingw47_32\bin\qmake.exe
and compiler : C:\Qt\Qt5.0.2\Tools\MinGW\bin\gcc.exe
qmake location for the static version is
D:\Soft\programming\qt-5.4.2\qtbase\bin\qmake.exe and compiler
Microsoft Visual C++ Compiler 11.0 (x86)
Upon building a test program, I get several warnings of the form below.
C:\Users\Bill\Desktop\mkspecs\modules\qt_lib_sql.pri:8: error: WARNING: Include file D:/Soft/programming/qt-5.0.1/qtbase/mkspecs/modules-inst/qt_lib_sql.pri not found`
I used to ignore these errors in my static built qt. An example is
C:\Users\Bill\Documents\QtProjects\mkspecs\modules\qt_lib_sql.pri:8: error: WARNING: Include file D:/Soft/programming/qt-5.4.2/qtbase/mkspecs/modules-inst/qt_lib_sql.pri not found
Now, i get the warning and errors ;
:-1: error: error: unrecognized command line option '-wl,-enable-auto-import'
:-1: error: error: wl: No such file or directory
:-1: error: error: unrecognized command line option '-wl'
As a major concern, D:/Soft/programming/qt-5.0.1/ does not exists from the warnings of the prebuild in contrast to the existing D:/Soft/programming/qt-5.4.2 in the warning from the static build.
I'm guessing this new installation is reading configuration and qmake files from the static build directory.
If you are switching Qt versions you must do a 'nmake distclean' in your project folder (from a terminal or perhaps your IDE), then run qmake using from the version/path you want to build against. Otherwise old paths linger in your makefiles. A 'make clean' is not enough.
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
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.
I need to have a cmd build script to address x86 x64 compilation issue associated with the IDE (i mean switching qt versions & rebuilding). The problem is that, in my .pro file, I add dependency on external library in this way:
LIBS += ../Libs/SomeExternal.lib
Now when I build this project from QtCreator, everything compiles and builds fine, but when I try to build using command prompt + qmake I get the following linker error:
LINK : fatal error LNK1104: cannot open file '../Libs/SomeExternal.lib'
I understand that this issue is related to paths, but I don't know how to let LINKER.exe see the location where my project is located. Just like QtCreator does.
I try to build using the following way:
I run VS command prompt. I'm using MSVC compiler.
I type qmake.exe -project C:\ProjectPath\Project.pro
nmake
Thanks
Use:
LIBS += -L$${PWD}/../Libs -lSomeExternal
From the documentation:
The PWD variable specifies the full path leading to the directory
containing the current file being parsed.
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.