Difference between revisions of "HowTo compile on Win32 with MinGW"

From AMule Project FAQ
Jump to: navigation, search
(crypto++ out)
Line 23: Line 23:
 
[http://www.zlib.org zlib] compression library ->
 
[http://www.zlib.org zlib] compression library ->
 
[http://ftp.lug.udel.edu/pub/cygwin/release/mingw/mingw-zlib/mingw-zlib-1.2.1-1.tar.bz2 Download]
 
[http://ftp.lug.udel.edu/pub/cygwin/release/mingw/mingw-zlib/mingw-zlib-1.2.1-1.tar.bz2 Download]
 
[[libcrypto|Crypto++]] encryption library ->
 
[http://www.eskimo.com/~weidai/crypto51.zip Download]
 
  
 
[http://www.microsoft.com/windows Windows] port of [[wxWidgets]] library ->
 
[http://www.microsoft.com/windows Windows] port of [[wxWidgets]] library ->
Line 35: Line 32:
 
Generally, compile [[wxWidgets|wxMSW]] as static library. This avoids several linker issues, and provides you with static binary.
 
Generally, compile [[wxWidgets|wxMSW]] as static library. This avoids several linker issues, and provides you with static binary.
  
Link statically against ''[http://www.zlib.org zlib]'', ''[[libcrypto|crypto]]'', ''[http://curl.haxx.se curl]'' and ''[[wxWidgets|wxMSW]]'' to avoid distributing extranous DLLs (and generally make life simpler). At this point, this requires manually hacking ''src/Makefile'' (after running ''configure'') and changing the necessary ''-l***'' places to paths to static libraries.
+
Link statically against ''[http://www.zlib.org zlib]'', ''[http://curl.haxx.se curl]'' and ''[[wxWidgets|wxMSW]]'' to avoid distributing extranous DLLs (and generally make life simpler). At this point, this requires manually hacking ''src/Makefile'' (after running ''configure'') and changing the necessary ''-l***'' places to paths to static libraries.
  
 
You need to modify ''wx/setup.h'' file by hand (after installing [[wxWidgets|wx]]) and change ''[http://www.wxwindows.org/manuals/2.4.2/wx53.htm wxCheckListBox]'' to ''0'' (or, alternativly, configure [[wxWidgets|wx]] with ''--without-checklistbox''). Probably there's a better way around this, but I can't think of any right now.
 
You need to modify ''wx/setup.h'' file by hand (after installing [[wxWidgets|wx]]) and change ''[http://www.wxwindows.org/manuals/2.4.2/wx53.htm wxCheckListBox]'' to ''0'' (or, alternativly, configure [[wxWidgets|wx]] with ''--without-checklistbox''). Probably there's a better way around this, but I can't think of any right now.
Line 48: Line 45:
 
Since the 2004/07/17, you can find in [http://www.gnu.org/software/cvs CVS] the file ''amule.msp'' which is the project file relative to the [http://www.parinya.ca/mingwstudio.html MinGW Studio] IDE ([http://www.gnu.org/philosophy/free-sw.html Free] and under [http://www.gnu.org/copyleft/gpl.html GPL] at http://www.parinya.ca/ and shipped with precompiled [[wxWidgets|wxMSW]]).  
 
Since the 2004/07/17, you can find in [http://www.gnu.org/software/cvs CVS] the file ''amule.msp'' which is the project file relative to the [http://www.parinya.ca/mingwstudio.html MinGW Studio] IDE ([http://www.gnu.org/philosophy/free-sw.html Free] and under [http://www.gnu.org/copyleft/gpl.html GPL] at http://www.parinya.ca/ and shipped with precompiled [[wxWidgets|wxMSW]]).  
  
Install [http://www.parinya.ca/mingwstudio.html MinGW Studio], add [http://www.zlib.org Zlib], [http://curl.haxx.se Curl] and [[libcrypto|Crypto++]] compilled libs in The [http://www.parinya.ca/mingwstudio.html MinGW Studio] tree.
+
Install [http://www.parinya.ca/mingwstudio.html MinGW Studio], add [http://www.zlib.org Zlib] and [http://curl.haxx.se Curl] compiled libs in The [http://www.parinya.ca/mingwstudio.html MinGW Studio] tree.
  
 
Then, open ''amule.msp'' with [http://www.parinya.ca/mingwstudio.html MinGW Studio], press '''F7''', and [[aMule]] "should" be compiled :)
 
Then, open ''amule.msp'' with [http://www.parinya.ca/mingwstudio.html MinGW Studio], press '''F7''', and [[aMule]] "should" be compiled :)

Revision as of 13:39, 4 October 2004

by Madcat


List of things you need to compile aMule

Note: Some of these require manually moving includes/libs into the right directories.

Windows port of GNU C compiler -> Download

Minimal GNU shell for Windows -> Download

Developer toolkit for MSys (for CVS & co) -> Download

LibIConv (required by gettext) -> Download

GetText (for po files, autogen.sh, etc) -> Download

Curl library (compile w/o SSL support) -> Download

zlib compression library -> Download

Windows port of wxWidgets library -> Download


Common guidelines, issues, solutions

Generally, compile wxMSW as static library. This avoids several linker issues, and provides you with static binary.

Link statically against zlib, curl and wxMSW to avoid distributing extranous DLLs (and generally make life simpler). At this point, this requires manually hacking src/Makefile (after running configure) and changing the necessary -l*** places to paths to static libraries.

You need to modify wx/setup.h file by hand (after installing wx) and change wxCheckListBox to 0 (or, alternativly, configure wx with --without-checklistbox). Probably there's a better way around this, but I can't think of any right now.

Why don't distribute a compiled version?

Oh! Please compile it - it will be so much easier....


Compiling with MinGW Studio

Since the 2004/07/17, you can find in CVS the file amule.msp which is the project file relative to the MinGW Studio IDE (Free and under GPL at http://www.parinya.ca/ and shipped with precompiled wxMSW).

Install MinGW Studio, add Zlib and Curl compiled libs in The MinGW Studio tree.

Then, open amule.msp with MinGW Studio, press F7, and aMule "should" be compiled :)

Yes, I know, "compile" is not the same as "work" ... But it is a great begining

Compiling with MakefileWIN32

With MinSyS and MinGW, you can use the shipped MakefileWIN32.

Just rename configWIN32.h to config.h, edit MakefileWIN32 to give it the path of your compiler, and type make -f MakefileWIN32