Menu

#1 doesn't compile

closed
nobody
None
5
2008-04-01
2008-03-29
oc2pus
No

hi I try to compile dupfinder for openSuSE:

g++ `wx-config --cxxflags` -DwxUSE_STD_IOSTREAM=1 -W -Wall -Wextra -D_DEBUG -DDEBUG -g -c -x c++ -o unixd/stdinc.h.gch stdinc.h
g++ `wx-config --cxxflags` -DwxUSE_STD_IOSTREAM=1 -W -Wall -Wextra -include ./unixd/stdinc.h -D_DEBUG -DDEBUG -g -c -o unixd/dupf.o dupf.cpp
dupf.cpp: In function 'int main(int, char**)':
dupf.cpp:72: error: cannot convert 'const wchar_t*' to 'const char*' for argument '2' to 'int strcmp(const char*, const char*)'
dupf.cpp:73: error: cannot convert 'const wchar_t*' to 'const char*' for argument '2' to 'int strcmp(const char*, const char*)'
dupf.cpp:77: error: cannot convert 'const wchar_t*' to 'const char*' for argument '2' to 'int strcmp(const char*, const char*)'
dupf.cpp:78: error: cannot convert 'const wchar_t*' to 'const char*' for argument '2' to 'int strcmp(const char*, const char*)'
dupf.cpp:81: error: cannot convert 'const wchar_t*' to 'const char*' for argument '2' to 'int fprintf(FILE*, const char*, ...)'
dupf.cpp:84: error: no matching function for call to 'wxFile::Create(char*&, bool)'
/usr/include/wx-2.8/wx/file.h:84: note: candidates are: bool wxFile::Create(const wxChar*, bool, int)
dupf.cpp:86: error: cannot convert 'const wchar_t*' to 'const char*' for argument '2' to 'int fprintf(FILE*, const char*, ...)'
dupf.cpp:92: error: cannot convert 'const wchar_t*' to 'const char*' for argument '2' to 'int strcmp(const char*, const char*)'
dupf.cpp:93: error: cannot convert 'const wchar_t*' to 'const char*' for argument '2' to 'int strcmp(const char*, const char*)'
dupf.cpp:96: error: cannot convert 'const wchar_t*' to 'const char*' for argument '2' to 'int strcmp(const char*, const char*)'
dupf.cpp:97: error: cannot convert 'const wchar_t*' to 'const char*' for argument '2' to 'int strcmp(const char*, const char*)'
dupf.cpp:101: error: cannot convert 'const wchar_t*' to 'const char*' for argument '2' to 'int fprintf(FILE*, const char*, ...)'
dupf.cpp:112: error: cannot convert 'const wchar_t*' to 'const char*' for argument '2' to 'int fprintf(FILE*, const char*, ...)'
dupf.cpp:120: error: ambiguous overload for 'operator=' in 'pi.SearchPathInfo::path = *(((char**)(((unsigned int)i) * 4u)) + argv)'
/usr/include/wx-2.8/wx/string.h:676: note: candidates are: wxString& wxString::operator=(int) <near match>
/usr/include/wx-2.8/wx/string.h:956: note: wxString& wxString::operator=(wxChar) <near match>
/usr/include/wx-2.8/wx/string.h:970: note: wxString& wxString::operator=(const wxWCharBuffer&) <near match>
/usr/include/wx-2.8/wx/string.h:660: note: wxString& wxString::operator=(const wxString&) <near match>
dupf.cpp:128: error: cannot convert 'const wchar_t*' to 'const char*' for argument '2' to 'int strcmp(const char*, const char*)'
dupf.cpp:131: error: cannot convert 'const wchar_t*' to 'const char*' for argument '2' to 'int sscanf(const char*, const char*, ...)'
dupf.cpp:132: error: cannot convert 'const wchar_t*' to 'const char*' for argument '2' to 'int fprintf(FILE*, const char*, ...)'
dupf.cpp:137: error: cannot convert 'const wchar_t*' to 'const char*' for argument '2' to 'int fprintf(FILE*, const char*, ...)'
dupf.cpp:142: error: cannot convert 'const wchar_t*' to 'const char*' for argument '2' to 'int strcmp(const char*, const char*)'
dupf.cpp:145: error: cannot convert 'const wchar_t*' to 'const char*' for argument '2' to 'int sscanf(const char*, const char*, ...)'
dupf.cpp:146: error: cannot convert 'const wchar_t*' to 'const char*' for argument '2' to 'int fprintf(FILE*, const char*, ...)'
dupf.cpp:151: error: cannot convert 'const wchar_t*' to 'const char*' for argument '2' to 'int fprintf(FILE*, const char*, ...)'
dupf.cpp:155: error: cannot convert 'const wchar_t*' to 'const char*' for argument '2' to 'int fprintf(FILE*, const char*, ...)'
dupf.cpp:160: error: cannot convert 'const wchar_t*' to 'const char*' for argument '2' to 'int strcmp(const char*, const char*)'
dupf.cpp:161: error: cannot convert 'const wchar_t*' to 'const char*' for argument '2' to 'int strcmp(const char*, const char*)'
dupf.cpp:164: error: cannot convert 'const wchar_t*' to 'const char*' for argument '2' to 'int strcmp(const char*, const char*)'
dupf.cpp:165: error: cannot convert 'const wchar_t*' to 'const char*' for argument '2' to 'int strcmp(const char*, const char*)'
dupf.cpp:168: error: cannot convert 'const wchar_t*' to 'const char*' for argument '2' to 'int strcmp(const char*, const char*)'
dupf.cpp:169: error: cannot convert 'const wchar_t*' to 'const char*' for argument '2' to 'int strcmp(const char*, const char*)'
dupf.cpp:171: error: cannot convert 'const wchar_t*' to 'const char*' for argument '2' to 'int fprintf(FILE*, const char*, ...)'
dupf.cpp:174: error: ambiguous overload for 'operator=' in 'pi.SearchPathInfo::Mask = *((argv + 4u) + ((char**)(((unsigned int)i) * 4u)))'
/usr/include/wx-2.8/wx/string.h:676: note: candidates are: wxString& wxString::operator=(int) <near match>
/usr/include/wx-2.8/wx/string.h:956: note: wxString& wxString::operator=(wxChar) <near match>
/usr/include/wx-2.8/wx/string.h:970: note: wxString& wxString::operator=(const wxWCharBuffer&) <near match>
/usr/include/wx-2.8/wx/string.h:660: note: wxString& wxString::operator=(const wxString&) <near match>
dupf.cpp:178: error: cannot convert 'const wchar_t*' to 'const char*' for argument '2' to 'int fprintf(FILE*, const char*, ...)'
dupf.cpp:184: error: cannot convert 'const wchar_t*' to 'const char*' for argument '2' to 'int fprintf(FILE*, const char*, ...)'
dupf.cpp:249: error: char-array initialized from wide string
dupf.cpp:250: error: char-array initialized from wide string
dupf.cpp:251: error: char-array initialized from wide string
dupf.cpp:261: error: cannot convert 'const wchar_t*' to 'const char*' for argument '3' to 'int sprintf_s(char*, int, const char*, ...)'
dupf.cpp:262: error: cannot convert 'const wchar_t*' to 'const char*' for argument '3' to 'int sprintf_s(char*, int, const char*, ...)'
dupf.cpp:263: error: cannot convert 'const wchar_t*' to 'const char*' for argument '3' to 'int sprintf_s(char*, int, const char*, ...)'
dupf.cpp:266: error: cannot convert 'const wchar_t*' to 'const char*' for argument '3' to 'int sprintf_s(char*, int, const char*, ...)'
dupf.cpp:267: error: cannot convert 'const wchar_t*' to 'const char*' for argument '3' to 'int sprintf_s(char*, int, const char*, ...)'
dupf.cpp:270: error: cannot convert 'const wchar_t*' to 'const char*' for argument '3' to 'int sprintf_s(char*, int, const char*, ...)'
dupf.cpp:273: error: cannot convert 'const wchar_t*' to 'const char*' for argument '3' to 'int sprintf_s(char*, int, const char*, ...)'
dupf.cpp:277: error: cannot convert 'const wchar_t*' to 'const char*' for argument '2' to 'int fprintf(FILE*, const char*, ...)'
dupf.cpp: In function 'void PrintResults(const std::list<DuplicatesGroup, std::allocator<DuplicatesGroup> >&, const DuplicateFilesStats&, wxFile&, bool, bool)':
dupf.cpp:354: error: cannot convert 'const wchar_t*' to 'const char*' for argument '2' to 'int fprintf(FILE*, const char*, ...)'
dupf.cpp:392: error: cannot convert 'const wchar_t*' to 'const char*' for argument '2' to 'int fprintf(FILE*, const char*, ...)'
dupf.cpp:397: error: cannot convert 'const wchar_t*' to 'const char*' for argument '2' to 'int fprintf(FILE*, const char*, ...)'
dupf.cpp:401: error: cannot convert 'const wchar_t*' to 'const char*' for argument '2' to 'int fprintf(FILE*, const char*, ...)'
dupf.cpp: In function 'void DisplayHelp()':
dupf.cpp:407: error: cannot convert 'const wchar_t*' to 'const char*' for argument '2' to 'int fprintf(FILE*, const char*, ...)'
dupf.cpp:408: error: cannot convert 'const wchar_t*' to 'const char*' for argument '2' to 'int fprintf(FILE*, const char*, ...)'
dupf.cpp:409: error: cannot convert 'const wchar_t*' to 'const char*' for argument '2' to 'int fprintf(FILE*, const char*, ...)'
dupf.cpp:410: error: cannot convert 'const wchar_t*' to 'const char*' for argument '2' to 'int fprintf(FILE*, const char*, ...)'
dupf.cpp:411: error: cannot convert 'const wchar_t*' to 'const char*' for argument '2' to 'int fprintf(FILE*, const char*, ...)'
dupf.cpp:412: error: cannot convert 'const wchar_t*' to 'const char*' for argument '2' to 'int fprintf(FILE*, const char*, ...)'
dupf.cpp:413: error: cannot convert 'const wchar_t*' to 'const char*' for argument '2' to 'int fprintf(FILE*, const char*, ...)'
dupf.cpp:414: error: cannot convert 'const wchar_t*' to 'const char*' for argument '2' to 'int fprintf(FILE*, const char*, ...)'
dupf.cpp:415: error: cannot convert 'const wchar_t*' to 'const char*' for argument '2' to 'int fprintf(FILE*, const char*, ...)'
dupf.cpp:416: error: cannot convert 'const wchar_t*' to 'const char*' for argument '2' to 'int fprintf(FILE*, const char*, ...)'
dupf.cpp:417: error: cannot convert 'const wchar_t*' to 'const char*' for argument '2' to 'int fprintf(FILE*, const char*, ...)'
dupf.cpp:418: error: cannot convert 'const wchar_t*' to 'const char*' for argument '2' to 'int fprintf(FILE*, const char*, ...)'
dupf.cpp:419: error: cannot convert 'const wchar_t*' to 'const char*' for argument '2' to 'int fprintf(FILE*, const char*, ...)'
dupf.cpp:420: error: cannot convert 'const wchar_t*' to 'const char*' for argument '2' to 'int fprintf(FILE*, const char*, ...)'
make: *** [unixd/dupf.o] Error 1
error: Bad exit status from /var/tmp/rpm-tmp.59444 (%build)

gcc --version
gcc (GCC) 4.2.1 (SUSE Linux)

Discussion

  • Matthias Böhm

    Matthias Böhm - 2008-03-31

    Logged In: YES
    user_id=1948441
    Originator: NO

    1) Edit the makefile.unix file: Add at line 38 a --unicode=no, so that the complete line looks like this:
    wxconfigopt := --static --unicode=no

    then recompile. I forgot to add this, so if you have both a unicode version of wxWidgets and a ansi version, there can appear that problem.

    2) If that doesn't help, recontact me.

     
  • oc2pus

    oc2pus - 2008-03-31

    Logged In: YES
    user_id=1095826
    Originator: YES

    yes, that did the trick :)

    just a note:
    your configure is "borked" it doesn't detect wx-config correct, and if I pass the option --with-wx-config="/usr/bin/wx-config-2.8" the makefile still uses wx-config. So I builded the packages with a modified makefile.

    and a small warning from the compiler is left:
    dialog3.cpp:196:38: warning: "/*" within comment
    dialog3.cpp:1191:2: warning: no newline at end of file

    Packages for openSuSE are available here (upload is in progress):
    http://packman.links2linux.de/package/dupfinder

    have fun

     
  • Matthias Böhm

    Matthias Böhm - 2008-04-01
    • status: open --> closed
     

Log in to post a comment.