aMule Forum
English => Compilation problems => Topic started by: chrber on January 09, 2005, 02:25:29 PM
-
I have problems compiling the CVS version of aMule. I compiled wxWidgets 2.5.3 with --enable-unicode and that's all.
Now make gives me this error message:
make[4]: Entering directory `/usr/local/src/amule-cvs/src'
if g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/local/lib/wx/include/gtk2-unicode-release-2.5 -I/usr/local/include/wx-2.5 -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DWX_PRECOMP -DNO_GCC_PRAGMA -DXTHREADS -D_REENTRANT -DXUSE_MTSAFE_API -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/X11R6/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/freetype2/config -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -D__GTK2__ -O2 -pipe -march=athlon-xp -DUSE_EMBEDDED_CRYPTO -W -Wall -g -ggdb -fno-inline -D__DEBUG__ -fmessage-length=0 -MT amule-UDPSocket.o -MD -MP -MF ".deps/amule-UDPSocket.Tpo" \
-c -o amule-UDPSocket.o `test -f 'UDPSocket.cpp' || echo './'`UDPSocket.cpp; \
then mv -f ".deps/amule-UDPSocket.Tpo" ".deps/amule-UDPSocket.Po"; \
else rm -f ".deps/amule-UDPSocket.Tpo"; exit 1; \
fi
UDPSocket.cpp: In member function `void CUDPSocket::ProcessPacket(CSafeMemFile&, int16, int8, const wxString&, uint16)':
UDPSocket.cpp:283: error: conversion from `CHAR*' to `wxString' is ambiguous
/usr/local/include/wx-2.5/wx/string.h:660: note: candidates are: wxString::wxString(wxChar, size_t)
/usr/local/include/wx-2.5/wx/string.h:649: note: wxString::wxString(int)
-
chrber,
Strange, I have latest cvs here but I have no error with unicode. This is probably fixed in current CVS, try tomorrow tarball. In the mean time, if you want you can post here lines UDPSocket.cpp:273-293, so that I can confirm it to you, or even tell you the fix.
Cheers!
-
UDPSocket.cpp:273-288
for (uint32 i = 0; i < uTags; ++i) {
CTag tag(packet);
if (tag.tag.specialtag == ST_SERVERNAME && tag.tag.type == 2) {
update->SetListName(char2unicode(tag.tag.stringvalue));
} else if (tag.tag.specialtag == ST_DESCRIPTION && tag.tag.type == 2) {
update->SetDescription(char2unicode(tag.tag.stringvalue));
} else if (tag.tag.specialtag == ST_DYNIP && tag.tag.type == 2) {
update->SetDynIP(char2unicode(tag.tag.stringvalue));
} else if (tag.tag.specialtag == ST_VERSION && tag.tag.type == 2) {
update->SetVersion(char2unicode(tag.tag.stringvalue));
} else if (tag.tag.specialtag == ST_VERSION && tag.tag.type == 3) {
wxString strVersion;
strVersion.Printf(wxT("%u.%u"), tag.tag.intvalue >> 16, tag.tag.intvalue & 0xFFFF);
update->SetVersion(strVersion);
} else if (tag.tag.specialtag == ST_AUXPORTSLIST && tag.tag.type == 2) {
update->SetAuxPortsList(tag.tag.stringvalue);
} else {
// Unknown tag
;
}
}
-
chrber,
You were right, cvs tarball was broken for UNICODE builds. I am committing the fix now. You can try tomorrow tarball or apply the following patch.
Cheers!