• Home
  • History
  • Annotate
  • only in this directory
NameDateSize

..07-Jun-20164

aLinkCreator/H16-May-20174

aMule/H16-May-20173

aMuleCMD/H16-May-20173

aMuleD/H16-May-20173

aMuleGUI/H16-May-20173

aMuleWeb/H16-May-20173

ed2k/H16-May-20173

fileview/H16-May-20173

fixwxGUIDs.plH A D07-Jun-20161.2 KiB

libs/H07-Jun-20167

makeconfig.cmdH A D07-Jun-20161 KiB

PCH.cppH A D07-Jun-2016118

PCH.hH A D07-Jun-20162.4 KiB

README - MSVC.txtH A D07-Jun-20163.8 KiB

UnitTests/H07-Jun-20168

version.rcH A D07-Jun-20161.4 KiB

wxCas/H16-May-20173

README - MSVC.txt

1How to build aMule with Visual Studio
2See also http://www.amule.org/wiki/index.php/HowTo_compile_with_Visual_Studio
3
4This solution for Microsoft's Visual Studio 2008 has been configured to be as easy as possible to set up. 
5
6However, given the size of the aMule project and the libraries it uses, along with limitations in the way Visual Studio works,
7a couple of items must be setup separately. Additionally, some source code files might need patching due to incompatibilities 
8with some generated files. 
9
10The solution expects to find the following items:
11
12* wxWidgets ( http://www.wxwidgets.org ) at a specific location: ..\..\wxWidgets\ from the solution directory.
13* crypto++ ( http://www.cryptopp.com/ ) at a specific location: ..\..\cryptopp\ from the solution directory.
14
15
16This means you must create a folder where you will compile aMule, and it must have this structure:
17
18- <Root folder> - Your main folder. You can name it whatever you want.
19 | 
20 | - wxWidgets ( wxWidgets sources, no intermediate subfolder )
21 |
22 | - wxWidgets29 ( wxWidgets 2.9 sources, only required if you want to build against unstable wx 2.9 )
23 |
24 | - cryptopp ( Crypto++ sources, no intermediate subfolder )
25 |
26 | - <amule-sources> ( aMule sources, no intermediate subfolder, can have any name )
27
28
29I hope this is simple enough to get you started. 
30
31If wxWidgets fails to compile, please read http://wiki.wxwidgets.org/Microsoft_Visual_CPP_Guide
32
33There is sometimes a problem with the cryptopp project in the release and debug build, if some projects fail to link
34and give you a warning about redefined symbols, go to the properties on the cryptopp project, configuration "release" and change
35the "Configuration Properties"->"C/C++"->"Code generation"->"Runtime library" to "Multithreaded DLL (/MD)"
36 in the release build or "Multithreaded Debug DLL (/MDd)" for the debug build. 
37
38There are four solutions:
391) aMule-MSVCE.sln
40   which includes aMule, aMule tools and aMule's internal libs
412) aMule-MSVCE-ExtLibs.sln
42   includes only wxWidgets and Crypto++ and builds a single library libext.lib from them. You must first build this solution before building aMule-MSVCE.sln
433) aMule-MSVCE-ExtLibs29.sln
44   same but using wxWidgets 2.9
454) aMule-MSVC.sln
46   includes everything and is organized in folders. It only works with the commercial edition of MSVC and is outdated now.
47
48The Debug/Release configs build against wxWidgets 2.8 (stable), Debug29/Release29 configs build against wxWidgets 2.9 (unstable)
49
50To build aMule with GeoIP see libs\libGeoIP\readme.txt . 
51Without it you get an error building libGeoIP when you build the full solution.
52Just ignore it or unload the libGeoIP project.
53
54
55If aMule fails to compile, here are some guidelines/patches to the most common problems:
56
57[*] If Scanner.cpp fails to compile, apply this change around line 1545:
58
59-        b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
60+        b->yy_is_interactive = 0;
61
62if necessary.
63
64[*] The file muuli_wdr.cpp can also fail if it hasn't been patched for MSVC in the current code. The most common problem comes 
65from this kind of lines:
66
67        _("For a film you can say its length, its story, language ...\n"
68          "and if it's a fake, you can tell that to other users of aMule."),
69
70Notice the opening and closing parentheses are on a different line, and the quotes opened again. While this is ok for gcc, Visual
71Studio won't allow it. Change this lines to be a single-line quoted text. In the above example, the result will be:
72
73	_("For a film you can say its length, its story, language ...\nand if it's a fake, you can tell that to other users of aMule."),
74
75And that should be it. Feel free to ask in the aMule forum at forum.amule.org, "Compilation problems" section if you have further
76doubts.
77