PDA

View Full Version : Problem building the OCI Plugin on Windows



Harald Klingel
18th January 2011, 17:12
Solved.
I did the mistake to copy the commands in a batch file and adjust it. Now after running the commands manually line by line, I obtained several file not found errors. Going to the mentioned directories step by step and calling qmake with the absolute path everything worked out

Kind regards,
Harald

Old question:

I'm using Qt4.7.1 on windows and Visual Studio 2010. Today I tried to build the OCI Plugin as described in den manual, calling it from a Visual Studio 2010 command window, starting in the qt root directory:

set INCLUDE=%INCLUDE%;c:\oracle\oci\include
set LIB=%LIB%;c:\oracle\oci\lib\msvc
cd %QTDIR%\src\plugins\sqldrivers\oci
qmake oci.pro
nmake

In the file I'm using QOCIDriver, I added the line
#include "QtSql/QOCIDriver" and tried to construct an object of this type by calling
new QOCIDriver().

However, when building the projectin VS2010, I get a lot of linker errors like
error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""__declspec(dllimport) public: __thiscall QOCIDriver::QOCIDriver(class QObject *)" (__imp_??0QOCIDriver@@QAE@PAVQObject@@@Z)" in Funktion ""public: static class QSqlDatabase __cdecl Database::DatabaseFactory::getDatabase(class QString,class QString)" (?getDatabase@DatabaseFactory@Database@@SA?AVQSqlD atabase@@VQString@@0@Z)".

Searching for the reason, I looked up Makefile.Debug and found out that there should be a qsqloci4d.dll after processing. But it wasn't created at all.

I'll be thankful for any help,
regards,
Harald