eGospodarka.pl
eGospodarka.pl poleca

eGospodarka.plGrupypl.comp.programmingDev-C++ i Qt › Dev-C++ i Qt
  • Path: news-archive.icm.edu.pl!news.rmf.pl!nf1.ipartners.pl!ipartners.pl!plix.pl!newsf
    eed1.plix.pl!news.nask.pl!news.nask.org.pl!feed.news.interia.pl!not-for-mail
    From: Przemysław Adam Śmiejek <n...@s...pl>
    Newsgroups: pl.comp.programming
    Subject: Dev-C++ i Qt
    Date: Thu, 14 Jan 2010 18:19:56 +0100
    Organization: INTERIA.PL S.A.
    Lines: 101
    Message-ID: <hini5u$t40$2@news.interia.pl>
    NNTP-Posting-Host: s35.zabrze.net.pl
    Mime-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-Trace: news.interia.pl 1263487998 29824 213.227.67.163 (14 Jan 2010 16:53:18 GMT)
    X-Complaints-To: u...@n...interia.pl
    NNTP-Posting-Date: Thu, 14 Jan 2010 16:53:18 +0000 (UTC)
    User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; pl; rv:1.9.1.5) Gecko/20091204
    Lightning/1.0b1pre Thunderbird/3.0
    X-Authenticated-User: przemyslaw.smiejek % interia+pl
    Xref: news-archive.icm.edu.pl pl.comp.programming:184455
    [ ukryj nagłówki ]

    Witam,

    nie jestem programistą, ale ostatnio chciałem się trochę pobawić Qt. Mam
    książkę heliona do Qt i próbuję instalować to w Dev-C++. Tylko, że tam
    jakiś tajemniczy szablon qt.template używają. Wyguglałem taki szablon,
    ale do starszej wersji Qt i nie działa z nowszą. Próbuję ,,ręcznie''
    zmusić środowisko do pracy z Qt, ale wtedy jest jeszcze gorzej, bo mówi:

    Compiler: Default compiler
    Building Makefile: "C:\Dev-Cpp\programy\Makefile.win"
    Executing make...
    make.exe -f "C:\Dev-Cpp\programy\Makefile.win" all
    g++.exe main.o -o "Project1.exe" -L"C:/Dev-Cpp/lib" -L"C:/Qt/2009.05/lib"

    main.o(.text+0x182):main.cpp: undefined reference to
    `_imp___ZN12QApplicationC1ERiPPci'
    main.o(.text+0x1c5):main.cpp: undefined reference to
    `_imp___ZN11QPushButtonC1ERK7QStringP7QWidget'
    main.o(.text+0x24f):main.cpp: undefined reference to
    `_imp___ZN12QApplication4execEv'
    main.o(.text+0x26c):main.cpp: undefined reference to
    `QPushButton::~QPushButton()'
    main.o(.text+0x281):main.cpp: undefined reference to
    `QApplication::~QApplication()'
    main.o(.text+0x2e4):main.cpp: undefined reference to
    `QPushButton::~QPushButton()'
    main.o(.text+0x311):main.cpp: undefined reference to
    `QApplication::~QApplication()'
    main.o(.text$_ZN7QWidget6resizeEii[QWidget::resize(i
    nt,
    int)]+0x2d):main.cpp: undefined reference to
    `_imp___ZN7QWidget6resizeERK5QSize'
    main.o(.text$_ZN7QStringD1Ev[QString::~QString()]+0x
    20):main.cpp:
    undefined reference to `_imp___ZN7QString4freeEPNS_4DataE'
    main.o(.text$_ZN7QStringC1EPKc[QString::QString(char
    const*)]+0x19):main.cpp: undefined reference to
    `_imp___ZN7QString16fromAscii_helperEPKci'
    collect2: ld returned 1 exit status

    make.exe: *** [Project1.exe] Error 1

    Execution terminated

    ===================================================

    Jak skorzystam z tego niewłaściwego szablonu, to jest lepiej, bo mam:

    Compiler: Default compiler
    Building Makefile: "C:\Dev-Cpp\programy\Makefile.win"
    Executing make...
    make.exe -f "C:\Dev-Cpp\programy\Makefile.win" all
    g++.exe -c main2.cpp -o main2.o
    -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include"
    -I"C:/Dev-Cpp/include/c++/3.4.2/backward"
    -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32"
    -I"C:/Dev-Cpp/include/c++/3.4.2" -I"C:/Dev-Cpp/include"
    -I"C:/Qt/2009.05/qt/include/Qt" -I"C:/Qt/2009.05/qt/include"
    -I"C:/Qt/2009.05/qt/include/QtGui" -O2 -O2 -frtti -fexceptions -Wall
    -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_NO_DEBUG -DQT_CORE_LIB
    -DQT_GUI_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN
    -I"C:/Qt/2009.05/qt/include/QtGui" -I"C:/Qt/2009.05/qt/include/QtCore"
    -I"C:/Qt/2009.05/qt/include" -I"." -I"C:/Qt/2009.05/qt/include/ActiveQt"
    -I"tmp\moc\release_shared" -I"." -I"C:\Qt\2009.05\qt\mkspecs\win32-g++"

    windres.exe -i Project2_private.rc --input-format=rc -o
    Project2_private.res -O coff

    windres.exe: no resources

    make.exe: *** [Project2_private.res] Error 1

    Execution terminated

    ====================================

    W powyższym przykładzie już nawet pozmieniałem w szablonie ścieżki na
    C:/Qt/2009.05/qt/, bo tam było 4.cośtam i myślałem, że to winne... Ale
    niestety dupa blada. Co ciekawe, z tym resources to jest jak kompiluję 1
    raz. Jak kompiluję 2 raz, to mam dla odmiany:

    Compiler: Default compiler
    Building Makefile: "C:\Dev-Cpp\programy\Makefile.win"
    Executing make...
    make.exe -f "C:\Dev-Cpp\programy\Makefile.win" all
    g++.exe main2.o -o "Project2.exe" -L"C:/Dev-Cpp/lib"
    -L"C:/Qt/2009.05/lib" -mthreads -Wl,-enable-stdcall-fixup
    -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -Wl,-s -Wl,-s
    -Wl,-subsystem,windows -L"C:/Qt/2009.05/lib" -L"C:/Qt/2009.05/lib"
    -lmingw32 -lqtmain -lQtCore4 -lQtGui4

    C:\Dev-Cpp\Bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\
    mingw32\bin\ld.exe:
    cannot find -lqtmain
    collect2: ld returned 1 exit status

    make.exe: *** [Project2.exe] Error 1

    Execution terminated

    --
    Przemysław Adam Śmiejek


Podziel się

Poleć ten post znajomemu poleć

Wydrukuj ten post drukuj


Następne wpisy z tego wątku

Najnowsze wątki z tej grupy


Najnowsze wątki

Szukaj w grupach

Eksperci egospodarka.pl

1 1 1

Wpisz nazwę miasta, dla którego chcesz znaleźć jednostkę ZUS.

Wzory dokumentów

Bezpłatne wzory dokumentów i formularzy.
Wyszukaj i pobierz za darmo: