[Qt-interest] "cannot find -lqsqlodbc" error while compiling the qt application statically....
Muthulingam Ammaiappan
muthulingam.a at gmail.com
Mon May 16 17:19:16 CEST 2011
Hi Mark,
Thanks for your quick reply...
i am compiling my application statically....i have followed the below
mentioned steps to do the static linking...
http://www.formortals.com/how-to-statically-link-qt-4/
i slightly modified the *.pro file and get the only one error...
"collect2:ld returned 1 exit status"...
and below is the compile output in "Qt Creator"...
./obj\main.o:main.cpp:(.text+0x9): undefined reference to
`qt_plugin_instance_qsqlodbc()'
collect2: ld returned 1 exit status
mingw32-make[1]: *** [release\LSWTDataTracer1.0.exe] Error 1
mingw32-make: *** [release] Error 2
The process "C:/Qt-Static/2010.05/mingw/bin/mingw32-make.exe" exited with
code %2.
Error while building project testproject (target: Desktop)
When executing build step 'Make'
please help me to fix this problem...
Thanks,
mammaiap
On Mon, May 16, 2011 at 3:44 PM, Mark Brand <mabrand at mabrand.nl> wrote:
> On 05/16/2011 11:36 AM, Muthulingam Ammaiappan wrote:
>
>> Hi Friends,
>>
>> i am getting the following errors while compiling my application
>> statically...
>>
>> errors:
>> 1."cannot find -lqsqlodbc"
>> 2.collect2:ld returned 1 exit status
>>
>> please see the attachments...
>>
>> i think the meaning of the above error is "-lqsqlodbc" library is not
>> finding and include...
>>
>
> Hi,
>
> You didn't mention whether you built static Qt. If not, you need to do so
> by passing the "-static" option to configure.
>
> For static Qt, the default is to build the SQL drivers into QtSql, not as
> plugins.
>
> Check the output of the configure step to confirm that the configuration
> includes ODBC support and that this is "built-in".
>
> regards,
>
> Mark
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110516/bc5cc430/attachment.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testproject.pro
Type: application/octet-stream
Size: 2300 bytes
Desc: not available
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110516/bc5cc430/attachment.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: main.cpp
Type: text/x-c++src
Size: 1968 bytes
Desc: not available
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110516/bc5cc430/attachment.bin
More information about the Qt-interest-old
mailing list