aMule Forum

English => Compilation problems => Topic started by: Radek on February 04, 2008, 02:25:26 PM

Title: SVN200802* under Win32/MingW: Problem while linking amule*.exe
Post by: Radek on February 04, 2008, 02:25:26 PM
Hi!

Since beginning of February I'm getting the following error while building my Win32-SVN-packages. Some Version of GetClassInfoW() seems to be missing. Any ideas?

Cheers!

Code: [Select]
g++  -DNOMINMAX -isystem /usr/include -D__CRYPTO_INSTALLED__ -g -D__DEBUG__ -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC -W -Wall -Wshadow -Wundef -ggdb -fno-inline -fmessage-length=0   -DUSE_WX_EXTENSIONS  -L/usr/lib  -o amule.exe  amule-RC4Encrypt.o amule-amule.o amule-BaseClient.o amule-ClientList.o amule-ClientCreditsList.o amule-ClientTCPSocket.o amule-ClientUDPSocket.o amule-DownloadClient.o amule-DownloadQueue.o amule-ECSpecialCoreTags.o amule-EMSocket.o amule-EncryptedStreamSocket.o amule-EncryptedDatagramSocket.o amule-ExternalConn.o amule-Friend.o amule-FriendList.o amule-HTTPDownload.o amule-IPFilter.o amule-KnownFileList.o amule-ListenSocket.o amule-MuleUDPSocket.o amule-SearchFile.o amule-SearchList.o amule-ServerConnect.o amule-ServerList.o amule-ServerSocket.o amule-ServerUDPSocket.o amule-SharedFileList.o amule-ThreadTasks.o amule-UploadBandwidthThrottler.o amule-UploadClient.o amule-UploadQueue.o amule-Kademlia.o amule-Search.o amule-Indexed.o amule-KademliaUDPListener.o amule-Prefs.o amule-RoutingZone.o amule-Contact.o  amule-amule-gui.o amule-amuleDlg.o amule-AddFriend.o amule-CatDialog.o amule-ChatSelector.o amule-ClientDetailDialog.o amule-FileDetailDialog.o amule-KadDlg.o amule-OScopeCtrl.o amule-PartFileConvert.o amule-PrefsUnifiedDlg.o amule-SearchDlg.o amule-ServerWnd.o amule-SharedFilesWnd.o amule-StatisticsDlg.o amule-SearchListCtrl.o amule-DownloadListCtrl.o amule-ClientListCtrl.o amule-FriendListCtrl.o amule-ServerListCtrl.o amule-SharedFilesCtrl.o amule-MuleTrayIcon.o amule-TransferWnd.o  amule-ClientCredits.o amule-ECSpecialMuleTags.o amule-KnownFile.o amule-GetTickCount.o amule-GuiEvents.o amule-Logger.o amule-PartFile.o amule-Preferences.o amule-Proxy.o amule-Server.o amule-Statistics.o amule-StatTree.o amule-SHAHashSet.o amule-TerminationProcess.o amule-UserEvents.o amule-OtherFunctions.o amule-NetworkFunctions.o -L. -lmuleappcommon -Llibs/common -Llibs/ec/cpp -lmulecommon -lec   -lbfd -liberty -lcryptopp -L. -lmuleappcore -L. -lmuleappgui  -L/mingw/lib  -mthreads  -Wl,--subsystem,windows -mwindows /mingw/lib/libwx_mswu_adv-2.8.a /mingw/lib/libwx_mswu_core-2.8.a /mingw/lib/libwx_baseu_net-2.8.a /mingw/lib/libwx_baseu-2.8.a -lwxregexu-2.8 -lwxexpat-2.8 -lwxtiff-2.8 -lwxjpeg-2.8 -lwxpng-2.8 -lz -lrpcrt4 -loleaut32 -lole32 -luuid -lwinspool -lwinmm -lshell32 -lcomctl32 -lcomdlg32 -lctl3d32 -ladvapi32 -lwsock32 -lgdi32  amulerc.o -lz
./libmuleappgui.a(libmuleappgui_a-MuleListCtrl.o): In function `ZN13CMuleListCtrlC2EP8wxWindowiRK7wxPointRK6wxSizelRK11wxValidatorRK8wxString':
p:/sources/amule-cvs/src/MuleListCtrl.cpp:83: undefined reference to `wxControl::GetClassInfoW() const'
collect2: ld returned 1 exit status
make[3]: *** [amule.exe] Error 1
Title: Re: SVN200802* under Win32/MingW: Problem while linking amule.exe
Post by: wuischke on February 04, 2008, 02:34:20 PM
Well, as far as I know there's already a definition of GetClassInfo [1] (http://msdn2.microsoft.com/en-us/library/ms633578(VS.85).aspx) and thus there's a macro replacing GetClassInfo with GetClassInfoW.

As the occurence is in wx code, I don't know how to circumvent this, the usual #include <wx/msw/winundef.h> didn't work when I tried it. The real question is, why this worked earlier and complains now. Can you help me by telling me the last version which still worked and the first which was broken?
Title: Re: SVN200802* under Win32/MingW: Problem while linking amule.exe
Post by: Radek on February 04, 2008, 02:40:03 PM
The last snapshot I could compile without problems was 20080129. But I'm not sure if the following snapshots all had the same problem. I think there was some other error for a few days.

I'll just have to try to find the exact version by "binary search", I guess ;-)
Title: Re: SVN200802* under Win32/MingW: Problem while linking amule.exe
Post by: Radek on February 04, 2008, 08:25:06 PM
Now I can say for certain that this error was introduced sometime between 20080130 and 20080201.

The snapshot from 20080201 hast the reported error, while the snapshots from 20080130 and 20080131 have some other error (some problem with type conversion) and never reach this part of the building process. 20080129 compiled just fine.

The source that looks suspicious to me is extern/wxWidgets/listctrl.cpp. But I don't know enough about wxWidgets to really understand the inheritance issues involved and don't have the time right now to dig deeper (though like to do that sort of thing - it's fun 8) )

Cheers,
Radek
Title: Re: SVN200802* under Win32/MingW: Problem while linking amule.exe
Post by: wuischke on February 04, 2008, 09:39:57 PM
Thanks for your work, this makes finding the source of the error already a lot easier. I'll report back later.

This time, I blame Xaignar. :P
Title: Re: SVN200802* under Win32/MingW: Problem while linking amule.exe
Post by: GrayFox.i0n on February 04, 2008, 10:07:33 PM
Hi,
I experienced the same issue while trying to compile.
I wish i could give more help, but my knowledgements are too limited.
I hope u can go through this issue soon :D

Great job!
Title: Re: SVN200802* under Win32/MingW: Problem while linking amule.exe
Post by: wuischke on February 04, 2008, 10:11:20 PM
Mh, I declare Xaignar innocent, I think I fixed it. Please try it again with tomorrow's tarball.

(I added a #include <wx/msw/winundef.h> to the top of src/MuleListCtrl.h...don't know why it's suddenly necessary)

Edit: Just in case you are bored: Do translations work for you?
Title: Re: SVN200802* under Win32/MingW: Problem while linking amule.exe
Post by: GrayFox.i0n on February 04, 2008, 10:23:42 PM
Last time i tryed the translations didnt work.
I will try with tomorrows tarball and ireport immediately

Thanks
Title: SVN20080205 under Win32/MingW: Problem while linking amulegui.exe
Post by: Radek on February 05, 2008, 01:06:55 PM
Hi!

Now amule.exe links fine (so does ed2k.exe).

But! I have the following messages while linking amulegui.exe...

Code: [Select]
g++  -DNOMINMAX -isystem /usr/include -D__CRYPTO_INSTALLED__ -g -D__DEBUG__ -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC -W -Wall -Wshadow -Wundef -ggdb -fno-inline -fmessage-length=0   -DUSE_WX_EXTENSIONS  -L/usr/lib  -o amulegui.exe  amulegui-amule-remote-gui.o amulegui-amule-gui.o amulegui-amuleDlg.o amulegui-AddFriend.o amulegui-CatDialog.o amulegui-ChatSelector.o amulegui-ClientDetailDialog.o amulegui-FileDetailDialog.o amulegui-KadDlg.o amulegui-OScopeCtrl.o amulegui-PartFileConvert.o amulegui-PrefsUnifiedDlg.o amulegui-SearchDlg.o amulegui-ServerWnd.o amulegui-SharedFilesWnd.o amulegui-StatisticsDlg.o amulegui-SearchListCtrl.o amulegui-DownloadListCtrl.o amulegui-ClientListCtrl.o amulegui-FriendListCtrl.o amulegui-ServerListCtrl.o amulegui-SharedFilesCtrl.o amulegui-MuleTrayIcon.o amulegui-TransferWnd.o  amulegui-ClientCredits.o amulegui-ECSpecialMuleTags.o amulegui-KnownFile.o amulegui-GetTickCount.o amulegui-GuiEvents.o amulegui-Logger.o amulegui-PartFile.o amulegui-Preferences.o amulegui-Proxy.o amulegui-Server.o amulegui-Statistics.o amulegui-StatTree.o amulegui-SHAHashSet.o amulegui-TerminationProcess.o amulegui-UserEvents.o amulegui-OtherFunctions.o amulegui-NetworkFunctions.o -L. -lmuleappgui  -L/mingw/lib  -mthreads  -Wl,--subsystem,windows -mwindows /mingw/lib/libwx_mswu_adv-2.8.a /mingw/lib/libwx_mswu_core-2.8.a /mingw/lib/libwx_baseu_net-2.8.a /mingw/lib/libwx_baseu-2.8.a -lwxregexu-2.8 -lwxexpat-2.8 -lwxtiff-2.8 -lwxjpeg-2.8 -lwxpng-2.8 -lz -lrpcrt4 -loleaut32 -lole32 -luuid -lwinspool -lwinmm -lshell32 -lcomctl32 -lcomdlg32 -lctl3d32 -ladvapi32 -lwsock32 -lgdi32  -L. -lmuleappcommon -Llibs/common -Llibs/ec/cpp -lmulecommon -lec   -lbfd -liberty -lcryptopp amuleguirc.o -lz
libs/common/libmulecommon.a(libmulecommon_a-FileFunctions.o): In function `ZN12CDirIterator10HasSubDirsERK8wxString':
p:/sources/amule-cvs/src/libs/common/FileFunctions.cpp:92: undefined reference to `wxDir::HasSubDirs(wxString const&)'
libs/common/libmulecommon.a(libmulecommon_a-FileFunctions.o): In function `Z13UnpackZipFileRK8wxStringPPKw':
p:/sources/amule-cvs/src/libs/common/FileFunctions.cpp:133: undefined reference to `wxArchiveFSHandler::wxArchiveFSHandler()'
p:/sources/amule-cvs/src/libs/common/FileFunctions.cpp:135: undefined reference to `wxArchiveFSHandler::FindFirst(wxString const&, int)'
p:/sources/amule-cvs/src/libs/common/FileFunctions.cpp:159: undefined reference to `wxArchiveFSHandler::~wxArchiveFSHandler()'
p:/sources/amule-cvs/src/libs/common/FileFunctions.cpp:164: undefined reference to `wxArchiveFSHandler::FindNext()'
p:/sources/amule-cvs/src/libs/common/FileFunctions.cpp:167: undefined reference to `wxArchiveFSHandler::~wxArchiveFSHandler()'
p:/sources/amule-cvs/src/libs/common/FileFunctions.cpp:167: undefined reference to `wxArchiveFSHandler::~wxArchiveFSHandler()'
collect2: ld returned 1 exit status
make[3]: *** [amulegui.exe] Error 1

@wuischke
I never tried translations. I always use the English version.
But I remember an error message during configure. Something about a syntax problem concerning translations. I will take a closer look.

Edit:
I did take a closer look - see this post (http://forum.amule.org/index.php?topic=14372.0). Maybe the second error message has to do with it. I didn't really check it...

Cheers!
Title: Re: SVN200802* under Win32/MingW: Problem while linking amule*.exe
Post by: wuischke on February 06, 2008, 05:17:17 PM
Linking should be OK now.

Thanks a lot for your other post, I'll try to have a look at it later.
Title: Re: SVN200802* under Win32/MingW: Problem while linking amule*.exe
Post by: GrayFox.i0n on February 07, 2008, 01:56:06 PM
Today's build (08-02-07) compiles fine for me.
Languages dont work at all still.
I went to the locale folder and i copyed the entire locale dir and pasted it in the same directory as amule.exe, and when i go to prefrences only "System default" language is there.
Itryed also making a folder called locale and putting the other language folders inside without any succeed... :(
Title: Re: SVN200802* under Win32/MingW: Problem while linking amule*.exe
Post by: Radek on February 07, 2008, 02:01:47 PM
Same for me - compilation works finally...