aMule Forum

English => Compilation problems => Topic started by: DLH on December 20, 2008, 10:04:06 PM

Title: MSVC compilation workaround
Post by: DLH on December 20, 2008, 10:04:06 PM
Well, I gave up on cross-compiling for now(unresolved linking issues), so the only way left was MSVCE (MinGW on Windows(98 not XP) only worked out once for me with wxWidgets-2.6.6 and with slightly goofed up UI). I can empathize with people who expressed their reservations about this method before, as installing this behemoth feels like installing a new OS - it took roughly twice as long as compiling aMule itself. Upon loading the appropriate solution I was prompted to allow the project to be converted to the new format, but it failed to incorporate any of the wxWidgets modules. After some thinking I decided to open the individual *.dsp project files in wxWidgets\build\msw one by one and then save them as *.vcproj (lack of which VC++ was complaining about ) - to my surprise it worked. Too bad the MSVCE for all its bells and whistles isn't smart enough to do it by itself while converting the solution. Anyway, aMule eventually compiled, although resulting in an executable > 10MB( I chose the 'debug' edition - don't know if that matters). It crashes on exit and has a few other issues, but I'm aware SVN is for testing purposes. I wanted mainly to suggest the wxWidgets import workaround be added to the wiki. Also the patch for GeoIP.c doesn't seem to work (I ran it on Linux with 'rejected' return) - I had to modify it in an editor.
Title: Re: MSVC compilation workaround
Post by: Stu Redman on December 21, 2008, 03:51:33 PM
Did you read the wiki article (http://www.amule.org/wiki/index.php/HowTo_compile_with_Visual_Studio)? Without reading it it's probably hopeless.  ;)
Size does not depend much on debug/release (because debug infos are stored in an extra file). wxWidgets and Crypto++ carry a lot of weight around.
Windows 98 is not supported (it's 2008...) . Did you manage to compile/run aMule on it ?
Title: Re: MSVC compilation workaround
Post by: lfroen on December 21, 2008, 04:20:59 PM
Quote
so the only way left was MSVCE (MinGW on Windows(98 not XP)
Which begs for obvious "WHY?" question.
Title: Re: MSVC compilation workaround
Post by: DLH on December 21, 2008, 06:34:09 PM
Quote
Did you read the wiki article?
Not carefully enough, as it turns out. I missed the step with processing wx.dsw, so I added myself unnecessary labor.
Quote
Windows 98 is not supported (it's 2008...) . Did you manage to compile/run aMule on it ?
Perhaps I did not make myself clear enough. The only reason I'd resort to using Win98(and that was @2.1.3) was that the compilation on XP broke with errors like "gcc cannot find something or other". Recent versions of wxWidgets wouldn't compile on either OS + mingw/msys.
Quote
Which begs for obvious "WHY?" question.
You'd have to expand the question a bit.
Title: Re: MSVC compilation workaround
Post by: lfroen on December 22, 2008, 08:23:01 AM
Quote
You'd have to expand the question a bit.
"WHY?" means why one would use Win98 for anything?
Title: Re: MSVC compilation workaround
Post by: GonoszTopi on December 22, 2008, 01:56:54 PM
Recent versions of wxWidgets wouldn't compile on either OS + mingw/msys.

Code: [Select]
#! /bin/sh

../configure \
--prefix=/mingw \
--with-msw \
--enable-debug \
--disable-optimize \
--enable-unicode \
--disable-shared \
"$@"

make

This works for me with wxWidgets-2.8.9 on MinGW/MSYS. Note the --disable-shared, DLL version is broken. And I always use the complete wxWidgets source tarball (wxAll), platform-specific ones were broken some time ago, I don't know about 2.8.9.
Title: Re: MSVC compilation workaround
Post by: Stu Redman on December 22, 2008, 02:50:04 PM
wxMSW works fine with MinGW, at least since 2.8.7.
The tricky part is setting Mingw/Msys up in the first place, since there is no clean and full installer for the whole thing and you have to go hunting for packages.
Title: Re: MSVC compilation workaround
Post by: DLH on December 23, 2008, 01:38:33 AM
Quote
"WHY?" means why one would use Win98 for anything?
As an extra diagnostic tool to see if a particular problem is OS - related. I could recall other experiences that validate this argument, but they're beyond the scope of this forum, so I won't bore you with them.
As far as MinGW+Win goes I followed the howto to the letter. I'd be much happier if the Linux cross-compile worked out. Well, at least VC++ did so I don't have to blow steam over installing this mammoth for nothing.
Title: Re: MSVC compilation workaround
Post by: Stu Redman on December 23, 2008, 11:38:37 AM
"WHY?" means why one would use Win98 for anything?
It's running well on my old Pentium II with kiddie games (that fail on modern CPUs).

As far as MinGW+Win goes I followed the howto to the letter.
I'm not sure the wiki covers MinGW installation exactly to the letter. IIRC it was not that easy to set up.

You can get current Win32 binaries now from here (http://amule.jimdo.com) btw.
Title: Re: MSVC compilation workaround
Post by: DLH on December 23, 2008, 12:29:31 PM
Quote
You can get current Win32 binaries now from here btw.
Thanks, I know the binaries are out there. If I decide to compile myself it is to customize the binary.
Quote
Size does not depend much on debug/release
It does here
Title: Re: MSVC compilation workaround
Post by: Stu Redman on December 23, 2008, 02:38:46 PM
OK, that's the code optimization of the release build.  :)
Simply turning debug info on/off (which is otherwise independent of the build) has no effect (very different from gcc) since the debug info is stored in the .pdb .