User forums > Help

QT3 on windows

<< < (2/3) > >>

stblack:
Thanks but I believe the problem it's in the environment variables but I don't understand where.
The qapplication and qpushbutton are in installqt3/include, and this directory is in the PATH as per my previous message.

Stefano

mandrav:

--- Quote from: stblack on January 23, 2007, 04:47:38 pm ---Thanks but I believe the problem it's in the environment variables but I don't understand where.
The qapplication and qpushbutton are in installqt3/include, and this directory is in the PATH as per my previous message.

Stefano

--- End quote ---

The fact that it is in the PATH means nothing to the compiler. You have to explicitely add to the compiler search dirs.

stblack:
Thanks a lot Mandrav.
So, if I have understood well, adding to the Global Compiler Variable :
Base : C:\installqt3
Include : C:\installqt3\include
lib : C:\installqt3\lib
and specifying in the compiler and debugger settings :
$(#qt)
$(#qt.include)
$(#qt.lib)
would be what you told me. Right?
It seems to look at this directories but don't seems to be enough.


--- Code: ---C:\Documents and Settings\negros.CONTROLLI\Documenti\CodeBlocks\QT3-Tutorial1\main.cpp:13: undefined reference to `_imp___ZN12QApplicationC1ERiPPc'
:C:\Documents and Settings\negros.CONTROLLI\Documenti\CodeBlocks\QT3-Tutorial1\main.cpp:15: undefined reference to `_imp___ZN7QStringC1EPKc'
:C:\Documents and Settings\negros.CONTROLLI\Documenti\CodeBlocks\QT3-Tutorial1\main.cpp:15: undefined reference to `_imp___ZN11QPushButtonC1ERK7QStringP7QWidgetPKc'
:C:\Documents and Settings\negros.CONTROLLI\Documenti\CodeBlocks\QT3-Tutorial1\main.cpp:16: undefined reference to `QPushButton::resize(int, int)'
:C:\Documents and Settings\negros.CONTROLLI\Documenti\CodeBlocks\QT3-Tutorial1\main.cpp:18: undefined reference to `QApplication::setMainWidget(QWidget*)'
:C:\Documents and Settings\negros.CONTROLLI\Documenti\CodeBlocks\QT3-Tutorial1\main.cpp:19: undefined reference to `QWidget::show()'
:C:\Documents and Settings\negros.CONTROLLI\Documenti\CodeBlocks\QT3-Tutorial1\main.cpp:20: undefined reference to `_imp___ZN12QApplication4execEv'
:C:\Documents and Settings\negros.CONTROLLI\Documenti\CodeBlocks\QT3-Tutorial1\main.cpp:20: undefined reference to `QPushButton::~QPushButton()'
:C:\Documents and Settings\negros.CONTROLLI\Documenti\CodeBlocks\QT3-Tutorial1\main.cpp:20: undefined reference to `QApplication::~QApplication()'
:C:\Documents and Settings\negros.CONTROLLI\Documenti\CodeBlocks\QT3-Tutorial1\main.cpp:20: undefined reference to `QPushButton::~QPushButton()'
:C:\Documents and Settings\negros.CONTROLLI\Documenti\CodeBlocks\QT3-Tutorial1\main.cpp:20: undefined reference to `QApplication::~QApplication()'
C:\installqt3\include\qvaluelist.h:: undefined reference to `_imp___ZN7QString11shared_nullE'
:C:\installqt3\include\qvaluelist.h:: undefined reference to `_imp___ZN11QStringData10deleteSelfEv'
:C:\installqt3\include\qvaluelist.h:: undefined reference to `_imp___ZN7QGArrayC2Eii'
:C:\installqt3\include\qvaluelist.h:: undefined reference to `_imp___ZN7QGArrayC2Eii'
:C:\installqt3\include\qvaluelist.h:: undefined reference to `_imp___ZN7QGArrayC2Ev'
:C:\installqt3\include\qvaluelist.h:: undefined reference to `_imp___ZN7QGArrayC2Ev'
:C:\installqt3\include\qvaluelist.h:: undefined reference to `_imp___ZN7QGArrayC2Ei'
:C:\installqt3\include\qvaluelist.h:: undefined reference to `_imp___ZN7QGArrayC2Ei'
:C:\installqt3\include\qvaluelist.h:: undefined reference to `_imp___ZN7QGArrayC2ERKS_'
:C:\installqt3\include\qvaluelist.h:: undefined reference to `_imp___ZN7QGArrayC2ERKS_'
:C:\installqt3\include\qvaluelist.h:: undefined reference to `_imp___ZN7QGArrayD2Ev'
:C:\installqt3\include\qvaluelist.h:: undefined reference to `_imp___ZN7QGArrayD2Ev'
:C:\installqt3\include\qvaluelist.h:: undefined reference to `_imp___ZN7QGArrayD2Ev'
:C:\installqt3\include\qvaluelist.h:: undefined reference to `_imp___ZN7QGArray6assignERKS_'
:C:\installqt3\include\qvaluelist.h:: undefined reference to `_imp___ZN7QGArray6resizeEj'
:C:\installqt3\include\qvaluelist.h:: undefined reference to `_imp___ZN7QGArray6resizeEjNS_12OptimizationE'
:C:\installqt3\include\qvaluelist.h:: undefined reference to `_imp___ZN7QGArray6resizeEj'
:C:\installqt3\include\qvaluelist.h:: undefined reference to `_imp___ZN7QGArray4fillEPKcij'
:C:\installqt3\include\qvaluelist.h:: undefined reference to `_imp___ZN7QGArray9duplicateERKS_'
:C:\installqt3\include\qvaluelist.h:: undefined reference to `_imp___ZN7QGArray6assignERKS_'
:C:\installqt3\include\qvaluelist.h:: undefined reference to `_imp___ZN7QGArray6assignEPKcj'
:C:\installqt3\include\qvaluelist.h:: undefined reference to `_imp___ZN7QGArray9duplicateERKS_'
:C:\installqt3\include\qvaluelist.h:: undefined reference to `_imp___ZN7QGArray9duplicateEPKcj'
:C:\installqt3\include\qvaluelist.h:: undefined reference to `_imp___ZN7QGArray10setRawDataEPKcj'
:C:\installqt3\include\qvaluelist.h:: undefined reference to `_imp___ZN7QGArray12resetRawDataEPKcj'
:C:\installqt3\include\qvaluelist.h:: undefined reference to `_imp___ZNK7QGArray4findEPKcjj'
:C:\installqt3\include\qvaluelist.h:: undefined reference to `_imp___ZNK7QGArray8containsEPKcj'
:C:\installqt3\include\qvaluelist.h:: undefined reference to `_imp___ZN7QGArray4sortEj'
:C:\installqt3\include\qvaluelist.h:: undefined reference to `_imp___ZNK7QGArray7bsearchEPKcj'
:C:\installqt3\include\qvaluelist.h:: undefined reference to `_imp___ZN7QGArray9msg_indexEj'
:C:\installqt3\include\qvaluelist.h:: undefined reference to `_imp___ZNK7QGArray7isEqualERKS_'
:C:\installqt3\include\qvaluelist.h:: undefined reference to `_imp___ZNK7QGArray7isEqualERKS_'
:C:\installqt3\include\qvaluelist.h:: undefined reference to `_imp___ZN7QGArrayC2Eii'
:C:\installqt3\include\qvaluelist.h:: undefined reference to `_imp___ZN7QGArrayC2Eii'
:C:\installqt3\include\qvaluelist.h:: undefined reference to `_imp___ZN7QGArrayC2Ev'
:C:\installqt3\include\qvaluelist.h:: undefined reference to `_imp___ZN7QGArrayC2Ev'
:C:\installqt3\include\qvaluelist.h:: undefined reference to `_imp___ZN7QGArrayC2Ei'
:C:\installqt3\include\qvaluelist.h:: undefined reference to `_imp___ZN7QGArrayC2Ei'
:C:\installqt3\include\qvaluelist.h:: undefined reference to `_imp___ZN7QGArrayC2ERKS_'
:: More errors follow but not being shown.
:: Edit the max errors limit in compiler options...
:: === Build finished: 50 errors, 0 warnings ===

--- End code ---

Obviously the Tutorial 1 it's very very simple.

--- Code: ---**
** Qt tutorial 1
**
****************************************************************/

#include <qapplication.h>
#include <qpushbutton.h>


int main( int argc, char **argv )
{
    QApplication a( argc, argv );

    QPushButton hello( "Hello world!", 0 );
    hello.resize( 100, 30 );

    a.setMainWidget( &hello );
    hello.show();
    return a.exec();
}
--- End code ---

Thanks in advance for any comments.
Stefano

mandrav:
Your compiler search dirs are fine now. It compiles but it doesn't link. This means that you forgot to link to all needed libraries. I can't tell you which exactly are those because I don't use Qt...

stblack:
Thanks.  :(
I will try again to solve this problem and maybe at the end, if with success, I will post the solution to update the website of qtwin[1] : no C::B !!!!
Am I alone to use QT3 under windows?

Thanks
Stefano

[1] http://qtwin.sourceforge.net/qt3-win32/index.php

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version