Russian Qt Forum
Ноябрь 02, 2024, 13:24 *
Добро пожаловать, Гость. Пожалуйста, войдите или зарегистрируйтесь.
Вам не пришло письмо с кодом активации?

Войти
 
  Начало   Форум  WIKI (Вики)FAQ Помощь Поиск Войти Регистрация  

Страниц: [1]   Вниз
  Печать  
Автор Тема: Линкер не видит QCA библиотеки  (Прочитано 5366 раз)
lad
Гость
« : Апрель 23, 2009, 11:12 »

Пытаюсь скомпилировать пример из QCA
qt-sdk-win-opensource-2009.01.1.exe установлен по умолчанию. все либы QCA подкинул в стандартные каталоги, кроме этого выполнил батник шедший с дистрибутивом.

Что сделать что бы увидел линкер либы?

Starting: C:/Qt/2009.01/mingw/bin/mingw32-make.exe -w
mingw32-make: Entering directory `C:/Qt/2009.01/qca1'
c:\Qt\2009.01\qt\bin\qmake.exe -spec ..\qt\mkspecs\win32-g++ -win32 -o Makefile qca1.pro
mingw32-make: Leaving directory `C:/Qt/2009.01/qca1'
mingw32-make: Entering directory `C:/Qt/2009.01/qca1'
C:/Qt/2009.01/mingw/bin/mingw32-make -f Makefile.Debug
mingw32-make[1]: Entering directory `C:/Qt/2009.01/qca1'
g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -mthreads -Wl -Wl,-subsystem,windows -o debug\qca1.exe debug/qca1.o  -L"c:\Qt\2009.01\qt\lib" -lmingw32 -lqtmaind -lQtGuid4 -lQtCored4
mingw32-make[1]: Leaving directory `C:/Qt/2009.01/qca1'
mingw32-make: Leaving directory `C:/Qt/2009.01/qca1'
debug/qca1.o: In function `main':
C:/Qt/2009.01/qca1/qca1.cpp:35: undefined reference to `_imp___ZN3QCA11InitializerC1ENS_10MemoryModeEi'
C:/Qt/2009.01/qca1/qca1.cpp:44: undefined reference to `_imp___ZN3QCA6Base64C1ENS_9DirectionE'
C:/Qt/2009.01/qca1/qca1.cpp:49: undefined reference to `_imp___ZN3QCA12MemoryRegionC1ERK10QByteArray'
C:/Qt/2009.01/qca1/qca1.cpp:49: undefined reference to `_imp___ZN3QCA10TextFilter13arrayToStringERKNS_12MemoryRegionE'
C:/Qt/2009.01/qca1/qca1.cpp:49: undefined reference to `_imp___ZN3QCA12MemoryRegionD1Ev'
C:/Qt/2009.01/qca1/qca1.cpp:49: undefined reference to `_imp___ZN3QCA12MemoryRegionD1Ev'
C:/Qt/2009.01/qca1/qca1.cpp:57: undefined reference to `_imp___ZN3QCA6Base64C1ENS_9DirectionE'
C:/Qt/2009.01/qca1/qca1.cpp:60: undefined reference to `_imp___ZN3QCA10TextFilter12decodeStringERK7QString'
C:/Qt/2009.01/qca1/qca1.cpp:65: undefined reference to `_imp___ZN3QCA11InitializerD1Ev'
C:/Qt/2009.01/qca1/qca1.cpp:65: undefined reference to `_imp___ZN3QCA11InitializerD1Ev'
debug/qca1.o: In function `ZN3QCA10TextFilterD0Ev':
C:/Qt/2009.01/qca1/qca1.cpp:(.text$_ZN3QCA6Base64D1Ev[QCA::Base64::~Base64()]+0x39): undefined reference to `_imp___ZTVN3QCA6Base64E'
C:/Qt/2009.01/qca1/qca1.cpp:(.text$_ZN3QCA10TextFilterD2Ev[QCA::TextFilter::~TextFilter()]+0x16): undefined reference to `_imp___ZN3QCA6FilterD2Ev'
C:/Qt/2009.01/qca1/qca1.cpp:(.text$_ZN3QCA10TextFilterD0Ev[QCA::TextFilter::~TextFilter()]+0x16): undefined reference to `_imp___ZN3QCA6FilterD2Ev'
C:/Qt/2009.01/qca1/qca1.cpp:(.text$_ZN3QCA10TextFilterD1Ev[QCA::TextFilter::~TextFilter()]+0x16): undefined reference to `_imp___ZN3QCA6FilterD2Ev'
collect2: ld returned 1 exit status
mingw32-make[1]: *** [debug\qca1.exe] Error 1
mingw32-make: *** [debug] Error 2
Exited with code 2.
Error while building project qca1
When executing build step 'Make'
Записан
lad
Гость
« Ответ #1 : Апрель 23, 2009, 11:19 »

нашёл
CONFIG += crypto
теперь
Starting: C:/Qt/2009.01/mingw/bin/mingw32-make.exe -w
mingw32-make: Entering directory `C:/Qt/2009.01/qca1'
c:\Qt\2009.01\qt\bin\qmake.exe -spec ..\qt\mkspecs\win32-g++ -win32 -o Makefile qca1.pro
mingw32-make: Leaving directory `C:/Qt/2009.01/qca1'
mingw32-make: Entering directory `C:/Qt/2009.01/qca1'
C:/Qt/2009.01/mingw/bin/mingw32-make -f Makefile.Debug
mingw32-make[1]: Entering directory `C:/Qt/2009.01/qca1'
g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -mthreads -Wl -Wl,-subsystem,windows -o debug\qca1.exe debug/qca1.o  -L"c:\Qt\2009.01\qt\lib" -lmingw32 -lqtmaind -LC:\Qt\2009.01\qt\lib -lqcad -lQtGuid4 -lQtCored4
mingw32-make[1]: Leaving directory `C:/Qt/2009.01/qca1'
mingw32-make: Leaving directory `C:/Qt/2009.01/qca1'
c:\Qt\2009.01\mingw\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\mingw32\bin\ld.exe: cannot find -lqcad
collect2: ld returned 1 exit status
mingw32-make[1]: *** [debug\qca1.exe] Error 1
mingw32-make: *** [debug] Error 2
Exited with code 2.
Error while building project qca1
When executing build step 'Make'

почему -lqcad а не -lqcad2  Непонимающий??
Записан
lad
Гость
« Ответ #2 : Апрель 23, 2009, 11:48 »

убрал 2-ку в имени библиотеки заработало.
почему с именем файла (...от поставщика) не работает?
Записан
Programmer2010
Гость
« Ответ #3 : Январь 18, 2011, 19:46 »

I'm sorry that my Russian is not fine to answer you in Russian. I'm not sure if you solved the problem already but will post the solution for all other people having the same problem like you. I had the same issue.

The problem is that the configure.exe doesn't create the debug files by default.
By default only "release compile"  will work.

If you want that debug will also be supported run
configure.exe --debug-and-release

Then
mingw32-make

Now check the lib directory.

As you can see it created:

qcad2.dll
qca2.dll
libqcad2.a
libqca2.a

Finally compile works fine.
Hope that I could help you.
Записан
Страниц: [1]   Вверх
  Печать  
 
Перейти в:  


Страница сгенерирована за 0.263 секунд. Запросов: 20.