сделал гуи-приложение на Qt 4.5 по этому уроку http://doc.crossplatform.ru/qt/4.5.0/tutorials-addressbook.html из Qt Creator запускается и работает нормально если открыть в проводнике папку release и запустить exe оттуда - пишет что не найдена библиотека "libgcc_s_dw2-1.dll" нашел её в C:\Qt\2009.05\mingw\bin\ если добавить, требует QtGui.dll и ещё 3-4 библиотеки проблема в том, что в итоге все вместе весит больше 120 мб! что я не сделал?
попробую спасибо! еще такой вопрос, присабачил я Qt в Eclipse - работает все отлично. Приложения также как и в Qt creator собираются, но у меня в эклипсе есть boost и libcurl, они отлично работают без Qt, хотел собрать ГУИ окно, чтобы с сетью через Курл работало, а библиотека libcurl никак не цепляется. если в обычной проге все легко - http://www.lsdeex.ru/archives/3 то когда делаешь КТ окно, так же сделать не получается. подскажите кто знает что можно сделать. как библиотеки (а именно libcurl) присоединять либо в Qt creator, а лучше в Эклипс с Qt.
я использовал libcurl и boost в Эклипсе в консоле все работало отлично, соединял библиотеки libcurl, boost как тут http://www.lsdeex.ru/archives/3 .Каждый раз когда начинаешь новый проект, нужно Курл вот так присоединять: Создай новый проект, открой его свойства Project->Properties Вкладка C/C++ Build -> Settings На вкладке Tool Settings: GCC C++ Complier -> Miscellaneous добавь флаг -DCURL_STATICLIB Чуть ниже, MinGW C++ Linker->Libraries добавь туда библиотеки (важен порядок в котором они расположены!) curl wsock32 wldap32 //============================================================== а теперь еще к эклипсу присоединил Qt как тут - http://habrahabr.ru/blogs/development/30636/ тоже работает, окна собираются. Но если я хочу собрать окно на Qt чтобы оно использовало libcurl то Курл не получается присоединить потому что в Project->Properties нету вкладок C/C++ Build -> Settings. Пробывал прописывать в файле .pro LIBS += -LC:/MinGW/lib -libcurl -libcurldll но тоже не работает. не знаю что еще можно сделать...
и вот так пробывал LIBS += -LC:/MinGW/lib -libcurl.a -libcurldll.a и все равно #include "curl/curl.h" пишет unresolved inclision "curl/curl.h"
кое что начинаю понимать, библиотеки подключены(потому что во вкладке libraries есть курловские библиотеки), походу этой строкой - LIBS += -LC:\MinGW\lib -libcurl -libcurldll значит точно не хватает хидеров... теперь понять куда их поместить)))) или где путь прописать)))
вроде разобрался, но пока не буду хвастать, пишите кто знает пока... если ща соберется все то отпишусь...
фигня какая то... ни на че не ругается, curl/curl.h подключено, на него не показывает как на ошибку, ни одна строка не подчеркивается все вроде отлично, при компиляции вот такое выдает: mingw32-make debug mingw32-make -f Makefile.Debug mingw32-make[1]: Entering directory `C:/Users/Эл/workspace/qt4' g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"..\..\..\..\Qt\4.4.1\include\QtCore" -I"..\..\..\..\Qt\4.4.1\include\QtCore" -I"..\..\..\..\Qt\4.4.1\include\QtGui" -I"..\..\..\..\Qt\4.4.1\include\QtGui" -I"..\..\..\..\Qt\4.4.1\include" -I"c:\Qt\4.4.1\include\ActiveQt" -I"debug" -I"." -I"..\..\..\..\Qt\4.4.1\mkspecs\win32-g++" -o debug\main.o main.cpp In file included from C:/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/windows.h:50, from C:/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/winsock2.h:22, from ../../../../Qt/4.4.1/include/curl/curl.h:67, from main.cpp:6: C:/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/winbase.h:1689: error: declaration of C function `LONG InterlockedCompareExchange(volatile LONG*, LONG, LONG)' conflicts with ../../../../Qt/4.4.1/include/QtCore/../../src/corelib/arch/qatomic_windows.h:393: error: previous declaration `long int InterlockedCompareExchange(long int*, long int, long int)' here C:/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/winbase.h:1693: error: declaration of C function `LONG InterlockedDecrement(volatile LONG*)' conflicts with ../../../../Qt/4.4.1/include/QtCore/../../src/corelib/arch/qatomic_windows.h:395: error: previous declaration `long int InterlockedDecrement(long int*)' here C:/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/winbase.h:1694: error: declaration of C function `LONG InterlockedExchange(volatile LONG*, LONG)' conflicts with ../../../../Qt/4.4.1/include/QtCore/../../src/corelib/arch/qatomic_windows.h:396: error: previous declaration `long int InterlockedExchange(long int*, long int)' here C:/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/winbase.h:1698: error: declaration of C function `LONG InterlockedExchangeAdd(volatile LONG*, LONG)' conflicts with ../../../../Qt/4.4.1/include/QtCore/../../src/corelib/arch/qatomic_windows.h:397: error: previous declaration `long int InterlockedExchangeAdd(long int*, long int)' here C:/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/winbase.h:1702: error: declaration of C function `LONG InterlockedIncrement(volatile LONG*)' conflicts with ../../../../Qt/4.4.1/include/QtCore/../../src/corelib/arch/qatomic_windows.h:394: error: previous declaration `long int InterlockedIncrement(long int*)' here mingw32-make[1]: *** [debug/main.o] Error 1 mingw32-make[1]: Leaving directory `C:/Users/Эл/workspace/qt4' mingw32-make: *** [debug] Error 2 повторюсь ни одна строка кода не подчеркивается, получается не в коде проблема...
в .pro файле прописал LIBS += -LC:\MinGW\lib -libcurl -libcurldll хедеры присоединил, воткнул папку curl (с хедерами) в Qt\4.4.1\include\curl библиотеки приделаны тоже, во вкладке libraries ->libcurl.a и libcurldll.a и все равно вот эти ошибки... ниче не пойму...
ща заметил, что если убрать хедер curl/curl.h то ошибка не вылетает... конечно если там кода не написано, просто в пустой мэйн вписываю curl/curl.h - он не подчеркивает что чтото не правельно, а просто выдает при линковке такую хрень mingw32-make debug mingw32-make -f Makefile.Debug mingw32-make[1]: Entering directory `C:/Users/Эл/workspace/qt2' g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"..\..\..\..\Qt\4.4.1\include\QtCore" -I"..\..\..\..\Qt\4.4.1\include\QtCore" -I"..\..\..\..\Qt\4.4.1\include\QtGui" -I"..\..\..\..\Qt\4.4.1\include\QtGui" -I"..\..\..\..\Qt\4.4.1\include" -I"c:\Qt\4.4.1\include\ActiveQt" -I"debug" -I"." -I"..\..\..\..\Qt\4.4.1\mkspecs\win32-g++" -o debug\main.o main.cpp In file included from C:/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/windows.h:50, from C:/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/winsock2.h:22, from ../../../../Qt/4.4.1/include/curl/curl.h:67, from main.cpp:2: C:/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/winbase.h:1689: error: declaration of C function `LONG InterlockedCompareExchange(volatile LONG*, LONG, LONG)' conflicts with ../../../../Qt/4.4.1/include/QtCore/../../src/corelib/arch/qatomic_windows.h:393: error: previous declaration `long int InterlockedCompareExchange(long int*, long int, long int)' here C:/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/winbase.h:1693: error: declaration of C function `LONG InterlockedDecrement(volatile LONG*)' conflicts with ../../../../Qt/4.4.1/include/QtCore/../../src/corelib/arch/qatomic_windows.h:395: error: previous declaration `long int InterlockedDecrement(long int*)' here C:/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/winbase.h:1694: error: declaration of C function `LONG InterlockedExchange(volatile LONG*, LONG)' conflicts with ../../../../Qt/4.4.1/include/QtCore/../../src/corelib/arch/qatomic_windows.h:396: error: previous declaration `long int InterlockedExchange(long int*, long int)' here C:/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/winbase.h:1698: error: declaration of C function `LONG InterlockedExchangeAdd(volatile LONG*, LONG)' conflicts with ../../../../Qt/4.4.1/include/QtCore/../../src/corelib/arch/qatomic_windows.h:397: error: previous declaration `long int InterlockedExchangeAdd(long int*, long int)' here C:/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/winbase.h:1702: error: declaration of C function `LONG InterlockedIncrement(volatile LONG*)' conflicts with ../../../../Qt/4.4.1/include/QtCore/../../src/corelib/arch/qatomic_windows.h:394: error: previous declaration `long int InterlockedIncrement(long int*)' here mingw32-make[1]: *** [debug/main.o] Error 1 mingw32-make[1]: Leaving directory `C:/Users/Эл/workspace/qt2' mingw32-make: *** [debug] Error 2 а закаментываю строку #include "curl/curl.h" и все отлично... че за хрень такая...