Bug 23

Summary: Build fails with: no matching function for call to ` RIFF::File::File(const QString&)'
Product: QSampler Reporter: shiro
Component: qsamplerAssignee: Rui Nuno Capela <rncbc>
Status: CLOSED FIXED    
Severity: normal    
Priority: P2    
Version: SVN Trunk   
Hardware: PC   
OS: Linux   
Attachments: namespaced cast patch
ascii cast patch

Description shiro 2005-07-23 21:07:32 CEST
Not sure if this is a qsampler or a libgig problem.

Running make for qsampler (0.1.2.tar.gz or current cvs), I get the following
error.  Same thing happens with libgig 2.0.1 and current cvs.

------------
make[1]: Entering directory `/usr/local/src/linuxsampler/cvs/qsampler'
/usr/lib/qt/bin/uic src/qsamplerMainForm.ui -o src/qsamplerMainForm.h
/usr/lib/qt/bin/uic src/qsamplerChannelStrip.ui -o src/qsamplerChannelStrip.h
/usr/lib/qt/bin/uic src/qsamplerChannelForm.ui -o src/qsamplerChannelForm.h
/usr/lib/qt/bin/uic src/qsamplerOptionsForm.ui -o src/qsamplerOptionsForm.h
/usr/lib/qt/bin/uic src/qsamplerDeviceForm.ui -o src/qsamplerDeviceForm.h
g++ -c -pipe -Wall -W -O2 -D_REENTRANT  -DQT_NO_DEBUG -DQT_THREAD_SUPPORT
-DQT_SHARED -I/usr/lib/qt/mkspecs/default -I. -Isrc -I/usr/lib/qt/include -o
main.o src/main.cpp
g++ -c -pipe -Wall -W -O2 -D_REENTRANT  -DQT_NO_DEBUG -DQT_THREAD_SUPPORT
-DQT_SHARED -I/usr/lib/qt/mkspecs/default -I. -Isrc -I/usr/lib/qt/include -o
qsamplerOptions.o src/qsamplerOptions.cpp
g++ -c -pipe -Wall -W -O2 -D_REENTRANT  -DQT_NO_DEBUG -DQT_THREAD_SUPPORT
-DQT_SHARED -I/usr/lib/qt/mkspecs/default -I. -Isrc -I/usr/lib/qt/include -o
qsamplerChannel.o src/qsamplerChannel.cpp
src/qsamplerChannel.cpp: In static member function `static QStringList 
   qsamplerChannel::getInstrumentList(const QString&, bool)':
src/qsamplerChannel.cpp:605: error: no matching function for call to `
   RIFF::File::File(const QString&)'
/usr/local/include/RIFF.h:213: error: candidates are: RIFF::File::File(const 
   RIFF::File&)
/usr/local/include/RIFF.h:215: error:                 RIFF::File::File(const 
   RIFF::String&)
src/qsamplerChannel.cpp: In static member function `static QString 
   qsamplerChannel::getInstrumentName(const QString&, int, bool)':
src/qsamplerChannel.cpp:636: error: no matching function for call to `
   RIFF::File::File(const QString&)'
/usr/local/include/RIFF.h:213: error: candidates are: RIFF::File::File(const 
   RIFF::File&)
/usr/local/include/RIFF.h:215: error:                 RIFF::File::File(const 
   RIFF::String&)
make[1]: *** [qsamplerChannel.o] Error 1
make[1]: Leaving directory `/usr/local/src/linuxsampler/cvs/qsampler'
make: *** [qsampler] Error 2

-----------------
Let me know if you need anything more.

Thanks,
Erik
Comment 1 Christian Schoenebeck 2005-07-29 13:21:50 CEST
Created attachment 11 [details]
namespaced cast patch
Comment 2 Christian Schoenebeck 2005-07-29 13:22:51 CEST
Created attachment 12 [details]
ascii cast patch
Comment 3 Christian Schoenebeck 2005-07-29 13:27:02 CEST
There are two possible reasons why it fails on your box. Either your compiler 
fails to cast to the namespace-ed RIFF::String (which is actually just a 
typedef for std::string). In that case try the uploaded "namespace cast patch" 
first. 
 
Otherwise if that didn't work, I guess you compiled Qt with QT_NO_STL. In that 
case you would have to use the solution as shown in the uploaded "ascii cast 
patch". 
 
Let us know which one of them works! 
Comment 4 shiro 2005-08-13 13:32:30 CEST
Sorry for the long delay.  I got your response while on vacation, set it aside
to deal when on my return, and then immediately forgot about it.

Thanks for the response.  Either patch seems to fix the original error, but now
I get a similar looking one for another file. The new error is included below.

I'm running slackware-10.1, with the default packaged versions of qt and gcc:

qt-3.3.3, compiled with: 
	  echo "yes" | ./configure \
	   -prefix /usr/lib/qt \
	   -release \
	   -system-zlib \
	   -system-libpng \
	   -qt-imgfmt-png \
	    -system-libmng \	 
	    -qt-imgfmt-mng \	 
	    -system-libjpeg \	 
	    -qt-imgfmt-jpeg \	 
	    -qt-gif \		 
	    -thread \		 
	    -no-stl \		 
	    -no-g++-exceptions \	 
	    -xft \			 
	    -plugin-sql-mysql \	 
	    -plugin-style-cde \	 
	    -plugin-style-compact \ 
	    -qt-style-motif \	 
	    -plugin-style-motifplus 
	    -plugin-style-platinum \
	    -plugin-style-sgi \	 
	    -plugin-style-windows \ 
	    -enable-opengl          


 
gcc 3.3.4, compiled with 
    ../gcc-$VERSION/configure --prefix=/usr \
              --enable-shared \
              --enable-threads=posix \
              --enable-__cxa_atexit \
              --disable-checking \
              --with-gnu-ld \
              --verbose \
              --target=${TARGET} \
              --host=${TARGET}


I take it the "-no-stl" option is causing trouble here?  Is that an unusual
configuration? 

I decided to try building qt without that option, but it looks as though it's
not going to be done until well after I've gone to bed.  Will have to see if it
works tomorrow.  (And whether I can try it out without breaking every other QT
app in the process. . . )


Here's the new error message:

% make
-------- snip -------

g++ -c -pipe -Wall -W -O2 -D_REENTRANT  -DQT_NO_DEBUG -DQT_THREAD_SUPPORT
-DQT_SHARED -I/usr/lib/qt/mkspecs/default -I. -Isrc -I/usr/lib/qt/include -o
qsamplerMainForm.o src/qsamplerMainForm.cpp
In file included from src/qsamplerMainForm.cpp:23:
src/qsamplerMainForm.ui.h: In member function `void 
   qsamplerMainForm::helpAbout()':
src/qsamplerMainForm.ui.h:1311: error: no match for 'operator+=' in 'sText += 
   gig::libraryName()()'
/usr/lib/qt/include/qstring.h:626: error: candidates are: QString& 
   QString::operator+=(const QString&)
/usr/lib/qt/include/qstring.h:918: error:                 QString& 
   QString::operator+=(const QByteArray&)
/usr/lib/qt/include/qstring.h:629: error:                 QString& 
   QString::operator+=(const char*)
/usr/lib/qt/include/qstring.h:634: error:                 QString& 
   QString::operator+=(QChar)
/usr/lib/qt/include/qstring.h:635: error:                 QString& 
   QString::operator+=(char)
src/qsamplerMainForm.ui.h:1313: error: no match for 'operator+=' in 'sText += 
   gig::libraryVersion()()'
/usr/lib/qt/include/qstring.h:626: error: candidates are: QString& 
   QString::operator+=(const QString&)
/usr/lib/qt/include/qstring.h:918: error:                 QString& 
   QString::operator+=(const QByteArray&)
/usr/lib/qt/include/qstring.h:629: error:                 QString& 
   QString::operator+=(const char*)
/usr/lib/qt/include/qstring.h:634: error:                 QString& 
   QString::operator+=(QChar)
/usr/lib/qt/include/qstring.h:635: error:                 QString& 
   QString::operator+=(char)
make[1]: *** [qsamplerMainForm.o] Error 1
make[1]: Leaving directory `/usr/local/src/linuxsampler/cvs/qsampler.namespace'
make: *** [qsampler] Error 2
--------------------------------------

Thanks again,
Erik
Comment 5 Christian Schoenebeck 2005-08-16 12:35:25 CEST
Ok, I believe this issue should be fixed with latest CVS version of QSampler. 
Please let us know if that works for you now. 
Comment 6 Christian Schoenebeck 2006-05-06 16:40:05 CEST
Closed, since assuming fixed and no reply from original reporter.