i'm doing project on creating a mp3 player using phonon.i had to read the id3 tags so i included external id3lib windows binaries for dynamic linking,everything was working fine even creator was able to detect the id3 variable while compiling i'm get some serious errors...

My *.pro file
Qt Code:
  1. QT += core gui
  2. QT+=phonon
  3.  
  4. TARGET = AudioPlayer
  5. TEMPLATE = app
  6.  
  7. DEFINES+=ID3LIB_LINKOPTION=1
  8. ID3LIB_LINKOPTION=3
  9. SOURCES += main.cpp\
  10. mainwindow.cpp\
  11.  
  12. HEADERS += mainwindow.h\
  13. id3.h
  14.  
  15.  
  16. win32:CONFIG(release, debug|release): LIBS += -L$$PWD/id3lib-3.8.3binaries/release/ -lid3lib
  17. else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/id3lib-3.8.3binaries/debug/ -lid3lib
  18. else:symbian: LIBS += -lid3lib
  19. else:unix: LIBS += -L$$PWD/id3lib-3.8.3binaries/ -lid3lib
  20.  
  21. INCLUDEPATH += $$PWD/id3lib-3.8.3binaries/Release
  22. DEPENDPATH += $$PWD/id3lib-3.8.3binaries/Release
To copy to clipboard, switch view to plain text mode 

in my header file i have included id3.h file
and my src file

Qt Code:
  1. char *filename=NULL;
  2. filename=(fileName.toAscii()).data();
  3. if((tag=ID3Tag_New())!=NULL){
  4. ID3Frame *frame;
  5. (void) ID3Tag_Link(tag,filename);
  6. if((frame=ID3Tag_FindFrameWithID(tag,ID3FID_TITLE))!=NULL){
  7. ID3Field *field;
  8. if((field=ID3Frame_GetField(frame,ID3FN_TEXT))!=NULL){
  9. char title[1024];
  10. (void) ID3Field_GetASCII(field,title,1024);
  11. QString at(title);
  12. albumTitle->setText(at);
  13. }
  14. }
  15. }
To copy to clipboard, switch view to plain text mode 

and my compile output
Qt Code:
  1. g++ -Wl,-s -mthreads -Wl,-subsystem,windows -o release\AudioPlayer.exe release/main.o release/mainwindow.o release/moc_mainwindow.o -L"c:\QtSDK\Desktop\Qt\4.7.4\mingw\lib" -lmingw32 -lqtmain -LD:/QT/AudioPlayer/id3lib-3.8.3binaries/release/ -lid3lib -lphonon4 -lQtGui4 -lQtCore4 -LC:\OpenSSL-Win32_full\lib
  2. mingw32-make.exe[1]: Leaving directory `D:/QT/AudioPlayer-build-desktop-Qt_4_7_4_for_Desktop_-_MinGW_4_4__Qt_SDK__Release'
  3. release/mainwindow.o:mainwindow.cpp:(.text+0x1ba0): undefined reference to `ID3Tag_New'
  4. release/mainwindow.o:mainwindow.cpp:(.text+0x1bb7): undefined reference to `ID3Tag_Link'
  5. release/mainwindow.o:mainwindow.cpp:(.text+0x1bca): undefined reference to `ID3Tag_FindFrameWithID'
  6. release/mainwindow.o:mainwindow.cpp:(.text+0x1bde): undefined reference to `ID3Frame_GetField'
  7. release/mainwindow.o:mainwindow.cpp:(.text+0x1bfc): undefined reference to `ID3Field_GetASCII'
  8. collect2: ld returned 1 exit status
  9. mingw32-make.exe[1]: *** [release\AudioPlayer.exe] Error 1
  10. mingw32-make.exe: *** [release] Error 2
  11. 22:51:03: The process "C:\QtSDK\mingw\bin\mingw32-make.exe" exited with code 2.
  12. Error while building project AudioPlayer (target: Desktop)
  13. When executing build step 'Make'
To copy to clipboard, switch view to plain text mode