Results 1 to 4 of 4

Thread: Qt/windows: how to compile program with audiere library

  1. #1

    Default Qt/windows: how to compile program with audiere library

    I have the following setup:

    Platform: Windows XP w/SP2
    Compiler: Dev-cpp 4.9.9.2
    Mingw/GCC: 3.4.2
    Qt win32: 4.4.1

    Qt uses the mingw compiler that came with dev-cpp ... it has been working perfectly and has been taking me through the learning curve without issues.

    I am creating a project which requires the audiere library ... i downloaded the win32 version of audiere and tried to compile thier sample program called simple.

    Audiere came with three files: audiere.dll, audiere.h, and audiere.lib
    I put the dll under the system32 folder and copied the header file into the includes of devcpp and Qt's include folders ... but when it came to the .lib file ... the lib folders of devcpp and Qt had only .a files ...

    So i tried compiling without doing anything to the .lib file but i got the following error during the make command:

    Qt Code:
    1. mingw32-make -f Makefile.Release
    2. mingw32-make[1]: Entering directory `D:/Projects/simple'
    3. g++ -mthreads -Wl,-enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runt
    4. ime-pseudo-reloc -Wl,-s -Wl,-s -Wl,-subsystem,windows -o "release\simple.exe" re
    5. lease\simple.o -L"c:\Programs\Qt\4.1.4\lib" -lmingw32 -lqtmain -lQtGui4 -lQtCor
    6. e4
    7. release\simple.o(.text+0xfc):simple.cpp: undefined reference to `_imp__AdrOpenDe
    8. vice@8'
    9. release\simple.o(.text+0x1cf):simple.cpp: undefined reference to `_imp__AdrOpenS
    10. ampleSource@8'
    11. release\simple.o(.text+0x55d):simple.cpp: undefined reference to `_imp__AdrOpenS
    12. ampleSource@8'
    13. release\simple.o(.text+0x5a5):simple.cpp: undefined reference to `_imp__AdrOpenS
    14. ound@12'
    15. collect2: ld returned 1 exit status
    16. mingw32-make[1]: *** [release\simple.exe] Error 1
    17. mingw32-make[1]: Leaving directory `D:/Projects/simple'
    18. mingw32-make: *** [release] Error 2
    To copy to clipboard, switch view to plain text mode 

    So i googled for what to do with the .lib, turns out it is very imp and so i tried looking up how to convert it to .a and came across the mingw utility called reimp.

    I used that to conver the .lib file into .a and copied it to devcpp and Qt's lib folders and tried compiling but i got the same error again ....

    now i have absolutely no idea how to continue? any help would be greatly apreciated!

    Thankyou.
    Punjabikura
    Last edited by punjabikura; 9th October 2006 at 07:22.

  2. #2
    Join Date
    Jan 2006
    Posts
    667
    Thanks
    10
    Thanked 80 Times in 74 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt/windows: how to compile program with audiere library

    Try adding the following line in your .pro file :

    LIBS += path to the library file

  3. #3

    Default Re: Qt/windows: how to compile program with audiere library

    wow didnt think it was something of that nature ...

    so this is what i did ... i added the line you suggested so my .pro looks like this now:

    Qt Code:
    1. ######################################################################
    2. # Automatically generated by qmake (2.00a) Mon Oct 9 03:17:34 2006
    3. ######################################################################
    4.  
    5. TEMPLATE = app
    6. TARGET +=
    7. DEPENDPATH += .
    8. INCLUDEPATH += .
    9. LIBS += -L"C:\Programs\Qt\4.1.4\lib" -llibaudiere
    10.  
    11. # Input
    12. HEADERS += audiere.h
    13. SOURCES += simple.cpp
    To copy to clipboard, switch view to plain text mode 

    before the way i was doing it ... this line :
    Qt Code:
    1. LIBS += -L"C:\Programs\Qt\4.1.4\lib" -llibaudiere
    To copy to clipboard, switch view to plain text mode 
    was not in the .pro file at all ...

    good thing is that it compiles and doesnt give any errors but just a few warnings ... bad thing is that it doesnt work properly ... maybe it was compiled badly, or the warnings did cause some change ... but basically its not running as it should ...

    Compile log:
    Qt Code:
    1. mingw32-make -f Makefile.Release
    2. mingw32-make[1]: Entering directory `D:/Projects/simple'
    3. g++ -c -O2 -O2 -frtti -fexceptions -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_D
    4. LL -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN
    5. -I"C:/Programs/Qt/4.1.4/include/QtCore" -I"C:/Programs/Qt/4.1.4/include/QtGui"
    6. -I"C:/Programs/Qt/4.1.4/include" -I"." -I"C:/Programs/Qt/4.1.4/include/ActiveQt"
    7. -I"release" -I"." -I"c:\Programs\Qt\4.1.4\mkspecs\win32-g++" -o release\simple.
    8. o simple.cpp
    9. In file included from simple.cpp:5:
    10. audiere.h:72: warning: `class audiere::RefCounted' has virtual functions but non
    11. -virtual destructor
    12. audiere.h:229: warning: `class audiere::File' has virtual functions but non-virt
    13. ual destructor
    14. audiere.h:306: warning: `class audiere::SampleSource' has virtual functions but
    15. non-virtual destructor
    16. audiere.h:425: warning: `class audiere::LoopPointSource' has virtual functions b
    17. ut non-virtual destructor
    18. audiere.h:478: warning: `class audiere::OutputStream' has virtual functions but
    19. non-virtual destructor
    20. audiere.h:595: warning: `class audiere::Event' has virtual functions but non-vir
    21. tual destructor
    22. audiere.h:610: warning: `class audiere::StopEvent' has virtual functions but non
    23. -virtual destructor
    24. audiere.h:640: warning: `class audiere::Callback' has virtual functions but non-
    25. virtual destructor
    26. audiere.h:668: warning: `class audiere::StopCallback' has virtual functions but
    27. non-virtual destructor
    28. audiere.h:696: warning: `class audiere::AudioDevice' has virtual functions but n
    29. on-virtual destructor
    30. audiere.h:786: warning: `class audiere::SampleBuffer' has virtual functions but
    31. non-virtual destructor
    32. audiere.h:839: warning: `class audiere::SoundEffect' has virtual functions but n
    33. on-virtual destructor
    34. g++ -mthreads -Wl,-enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runt
    35. ime-pseudo-reloc -Wl,-s -Wl,-s -Wl,-subsystem,windows -o "release\simple.exe" re
    36. lease\simple.o -L"c:\Programs\Qt\4.1.4\lib" -lmingw32 -lqtmain -L"C:\Programs\Q
    37. t\4.1.4\lib" -llibaudiere -lQtGui4 -lQtCore4
    38. mingw32-make[1]: Leaving directory `D:/Projects/simple'
    To copy to clipboard, switch view to plain text mode 

    any suggestions ?

  4. #4
    Join Date
    Apr 2009
    Location
    Indonesia
    Posts
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt/windows: how to compile program with audiere library

    im success compile audiere plus Qt in window , but im failed in linux (ubuntu 8.10),
    Any suggestion?

Similar Threads

  1. how to correctly compile threads support?
    By srhlefty in forum Installation and Deployment
    Replies: 9
    Last Post: 25th June 2006, 19:15

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.