Results 1 to 4 of 4

Thread: Help pls with making examples (QT 4.2)

  1. #1
    Join Date
    Oct 2006
    Posts
    13
    Thanks
    6
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Help pls with making examples (QT 4.2)

    Hi there!
    I just installed QT 4.2. All example projects were compled OK after installation, but if try to
    cd ../examples/network/ftp

    qmake -project
    qmake
    gmake

    i get error:

    ftpwindow.cpp:25:21: QtNetwork: No such file or directory
    ftpwindow.cpp: In member function `void FtpWindow::connectOrDisconnect()':
    ftpwindow.cpp:88: invalid use of undefined type `struct QFtp'
    ftpwindow.h:32: forward declaration of `struct QFtp'
    ftpwindow.cpp:89: invalid use of undefined type `struct QFtp'
    ftpwindow.h:32: forward declaration of `struct QFtp'
    ftpwindow.cpp:102: invalid use of undefined type `struct QFtp'
    ftpwindow.h:32: forward declaration of `struct QFtp'
    ftpwindow.cpp:104: no matching function for call to `FtpWindow::connect(QFtp*&,
    const char[28], FtpWindow* const, const char[31])'
    ../../../src/corelib/kernel/qobject.h:181: candidates are: static bool
    QObject::connect(const QObject*, const char*, const QObject*, const char*,
    Qt::ConnectionType = AutoConnection)
    ../../../src/corelib/kernel/qobject.h:283: bool
    QObject::connect(const QObject*, const char*, const char*,
    Qt::ConnectionType = AutoConnection) const
    ftpwindow.cpp:106: no matching function for call to `FtpWindow::connect(QFtp*&,
    const char[28], FtpWindow* const, const char[29])'
    ===
    How to resolve the problem?
    Thanks

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Help pls with making examples (QT 4.2)

    With "qmake -project" you have overwritten the original .pro file. Now you have to add "QT += network" to the new .pro file to make it work.

  3. The following user says thank you to jacek for this useful post:

    igor_x (23rd October 2006)

  4. #3
    Join Date
    Oct 2006
    Posts
    13
    Thanks
    6
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Help pls with making examples (QT 4.2)

    Thanks!
    now all work great!
    And please one another question.
    I tryed to install win-opensource with psql drivers, and i got error:
    (i configured QT as:
    configure -plugin-sql-psql -I " D:\PROGRAM FILES\postgres\include -L D:\PROGRAM FILES\postgres\lib" )

    ---
    C:/MinGW/bin/mingw32-make.EXE -f Makefile.Debug all
    mingw32-make.EXE[5]: Entering directory `C:/Qt/4.2.0/src/plugins/sqldrivers/psql
    '
    g++ -c -g -g -frtti -fexceptions -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_NO_
    CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_DLL -DQT_PLUGIN -DQT_SQL_LIB -DQT_COR
    E_LIB -DQT_THREAD_SUPPORT -I"C:/Qt/4.2.0/include/QtCore" -I"C:/Qt/4.2.0/include/
    QtCore" -I"C:/Qt/4.2.0/include/QtSql" -I"C:/Qt/4.2.0/include/QtSql" -I"C:/Qt/4.2
    .0/include" -I"d:\PROGRAM" -I"FILES\postgres\include" -I"-L" -I"d:\PROGRAM" -I"F
    ILES\postgres\lib" -I"C:/Qt/4.2.0/include/ActiveQt" -I"tmp\moc\debug_shared" -I"
    ." -I"..\..\..\..\mkspecs\win32-g++" -o tmp\obj\debug_shared\qsql_psql.o ..\..\.
    .\sql\drivers\psql\qsql_psql.cpp
    c:\Qt\4.2.0\bin\moc.exe -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_NO_CAST_TO_ASCII -
    DQT_NO_CAST_FROM_ASCII -DQT_DLL -DQT_PLUGIN -DQT_SQL_LIB -DQT_CORE_LIB -DQT_THRE
    AD_SUPPORT -I"C:/Qt/4.2.0/include/QtCore" -I"C:/Qt/4.2.0/include/QtCore" -I"C:/Q
    t/4.2.0/include/QtSql" -I"C:/Qt/4.2.0/include/QtSql" -I"C:/Qt/4.2.0/include" -I"
    d:\PROGRAM" -I"FILES\postgres\include" -I"-L" -I"d:\PROGRAM" -I"FILES\postgres\l
    ib" -I"C:/Qt/4.2.0/include/ActiveQt" -I"tmp\moc\debug_shared" -I"." -I"..\..\..\
    ..\mkspecs\win32-g++" -D__GNUC__ -DWIN32 ..\..\..\sql\drivers\psql\qsql_psql.h -
    o tmp\moc\debug_shared\moc_qsql_psql.cpp
    g++ -c -g -g -frtti -fexceptions -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_NO_
    CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_DLL -DQT_PLUGIN -DQT_SQL_LIB -DQT_COR
    E_LIB -DQT_THREAD_SUPPORT -I"C:/Qt/4.2.0/include/QtCore" -I"C:/Qt/4.2.0/include/
    QtCore" -I"C:/Qt/4.2.0/include/QtSql" -I"C:/Qt/4.2.0/include/QtSql" -I"C:/Qt/4.2
    .0/include" -I"d:\PROGRAM" -I"FILES\postgres\include" -I"-L" -I"d:\PROGRAM" -I"F
    ILES\postgres\lib" -I"C:/Qt/4.2.0/include/ActiveQt" -I"tmp\moc\debug_shared" -I"
    ." -I"..\..\..\..\mkspecs\win32-g++" -o tmp\obj\debug_shared\moc_qsql_psql.o tmp
    \moc\debug_shared\moc_qsql_psql.cpp
    g++ -mthreads -Wl,-enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runt
    ime-pseudo-reloc -shared -Wl,--out-implib,c:\Qt\4.2.0\plugins\sqldrivers\libqsql
    psqld.a -o "..\..\..\..\plugins\sqldrivers\qsqlpsqld.dll" tmp\obj\debug_shared\m
    ain.o tmp\obj\debug_shared\qsql_psql.o tmp\obj\debug_shared\moc_qsql_psql.o -L"
    c:\Qt\4.2.0\lib" -L"c:\Qt\4.2.0\lib" -lpq -lws2_32 -ladvapi32 -lQtSqld4 -lQtCore
    d4
    C:\MinGW\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\ mingw32\bin\ld.exe: cannot fin
    d -lpq
    collect2: ld returned 1 exit status
    mingw32-make.EXE[5]: *** [..\..\..\..\plugins\sqldrivers\qsqlpsqld.dll] Error 1
    mingw32-make.EXE[5]: Leaving directory `C:/Qt/4.2.0/src/plugins/sqldrivers/psql'

    mingw32-make.EXE[4]: *** [debug-all] Error 2
    mingw32-make.EXE[4]: Leaving directory `C:/Qt/4.2.0/src/plugins/sqldrivers/psql'

    mingw32-make.EXE[3]: *** [sub-psql-make_default] Error 2
    mingw32-make.EXE[3]: Leaving directory `C:/Qt/4.2.0/src/plugins/sqldrivers'
    mingw32-make.EXE[2]: *** [sub-sqldrivers-make_default] Error 2
    mingw32-make.EXE[2]: Leaving directory `C:/Qt/4.2.0/src/plugins'
    mingw32-make.EXE[1]: *** [sub-plugins-make_default] Error 2
    mingw32-make.EXE[1]: Leaving directory `C:/Qt/4.2.0/src'
    C:\MinGW\bin\mingw32-make.EXE: *** [sub-src-make_default-ordered] Error 2

    --
    Please tell me what I'm doing wrong?
    Thanks!
    Last edited by igor_x; 23rd October 2006 at 12:04.

  5. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Help pls with making examples (QT 4.2)

    Quote Originally Posted by igor_x View Post
    configure -plugin-sql-psql -I " D:\PROGRAM FILES\postgres\include -L D:\PROGRAM FILES\postgres\lib"
    Copy PostgreSQL files (headers and libraries) to some other directory, so that the path doesn't contain spaces.

  6. The following user says thank you to jacek for this useful post:

    igor_x (23rd October 2006)

Similar Threads

  1. making new project qt4
    By !Ci in forum Qt Programming
    Replies: 1
    Last Post: 18th June 2009, 13:32
  2. Replies: 3
    Last Post: 26th September 2006, 12:16
  3. QCanvas Examples
    By Kapil in forum Qt Programming
    Replies: 6
    Last Post: 23rd March 2006, 13:12
  4. QTextEdit Justify align making work
    By dec0ding in forum Qt Programming
    Replies: 2
    Last Post: 13th January 2006, 12:02
  5. Qt 3.x Examples
    By ball in forum Qt Programming
    Replies: 2
    Last Post: 11th January 2006, 13:44

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.