From: http://developer.kde.org/~wheeler/taglib/api/classTagLib_1_1FileRef.html
I've never used this library but it seems like you need a file pointer (FILE * like from fopen ) for the constructor taking 1 argument. The 3 argument constructor seems to take a filename. When you eliminate the parameter from FileRef you are evoking the default, so itwould go through without a hitch.
This may not be the problem but I figured it was worth noting.
jonsca
Quantitative Phrenologist
5,621 posts since Sep 2009
Reputation Points: 1,165
Solved Threads: 581
is f() defined?
also i recommend checking the arguements to see if you meet all of the required ones like jonsca said.
Anarionist
Junior Poster in Training
61 posts since Jan 2010
Reputation Points: 11
Solved Threads: 2
But what I find odd is that the error says it can't find a constructor with a char const* but isn't it supposed to be const char*?
It's a case where the pointer is const but the value of the char is not.
See http://www.daniweb.com/forums/post1094084.html#post1094084 and in fact the whole thread is good. Bad news is, I'm not sure what that means for your filename variable necessarily but try defining the filename variable as char const *
I had thought about the default values thing and as I study it more closely it seems like you are correct about that.
jonsca
Quantitative Phrenologist
5,621 posts since Sep 2009
Reputation Points: 1,165
Solved Threads: 581
I'm trying to use taglib in my Qt-program but it won't work. With this code, it doesn't compile
What's wrong?
Difficult to say, maybe even your compiler is faulty. In this kind of cases, rather post the actual compiler error message(s) along with the offending piece of code.But what I find odd is that the error says it can't find a constructor with a char const* but isn't it supposed to be const char*?
Those are equivalent, hence you cannot compile e.g. the following
class nocando
{
nocando(const char * p)
{}
nocando(char const * p)
{}
};
By the way, which compiler/version are you using?
mitrmkar
Posting Virtuoso
1,809 posts since Nov 2007
Reputation Points: 1,105
Solved Threads: 395
double check to make sure the version you have is the one for mac i got a similar error the first time i tried to install blender3d using a version made for solaris.
if you know its not the library try to statically link it. and double check to see if your enviroment variables arent interferring with anything.
and try using strings instead of char char takes each character at a time string is more flexible. though your library may not support passing a string there. if the latter is the case then put the mp3 file next to the exectuable and get rid of the levels example /home/name/desktop/beatit.mp3 to beatit.mp3 since its in the same level as the executable all it has to look for is the file name not which level is on it or what permissions you have. sorry if i mess you up. :)
Anarionist
Junior Poster in Training
61 posts since Jan 2010
Reputation Points: 11
Solved Threads: 2