How to compile EMULE in Visual C ++. Net 2003

xiaoxiao2021-03-06  79

Author: XCyber ​​Date: 2004-10-10e-mail: XCyber@sohu.com

Compilation Environment: Microsoft Visual C .NET 2003 (V7.0) EMULE Version: 0.44B

[1] Download source code and support library 1. Download emule v0.44b Source code http://www.emule-project.com/2.crypto v5.1 http://www.eskimo.com/~weidai/cryptlib .html3.zlib v1.2.1 http://www.gzip.org/zlib/4.id3lib v3.8.3 http://sourceforge.net/projects/id3lib/5.libpng http://www.libpng.org/ Pub / PNG / Libpng.html or http://sourceforge.net/projects/libpng/6.resizablelib 1.3 http://sourceforge.net/projects/resizablelib/

[2] Compile the library required for EMULE. Note: All library projects of all library projects are unified with multi-threaded (/ mt)

1.Crypto V5.1 For VC . Net 2003 compiler, we have to make the following modifications to the source code:

In the file in integer.cpp AllocatorBase :: pointer AlignedAllocator :: allocate (size_type n, const void *) to CPP_TYPENAME AllocatorBase :: pointer AlignedAllocator :: allocate (size_type n, Const void *)

Pubkey.h file in the template class DL_KeyImpl: public PK {public: typedef GP GroupParameters; OID GetAlgorithmID () const {return GetGroupParameters () GetAlgorithmID ();} to template class DL_KeyImpl: public PK {public:. typedef GP GroupParameters; O GetAlgorithmID () const {return GetGroupParameters () GetAlgorithmID ();} release version then compiled, and the generated headers cryptlib.lib Put it Crypto51 under EMULE.

2.ResizAblelib 1.3 compiles the Release Static version, copy the ResizAbleLib.lib and header file to the resizablelib under the emule.

3. Zlib v1.2.1 First, open the Zlib / Makefile.msc file, change cflags = -nologo -md -O2 $ (LOC) to cflags = -nologo -mt -O2 $ (LOC) unified use / MT Runtime Library . Then, run NMAKE / A / F WIN32 / Makefile.msc under ZLIB / under. (Running NMAKE Run the VC7 / BIN / VCVARS32.BAT registration of VS.NET 2003, put the generated Zlib.lib and header file to ZLIB under EMULE. 4.Libpng Enter PNG / Projects / Visualc6 Opens the libpng engineering, add the previously generated Zlib header file and library file path to the libPng engineering, compile into lib asm release, then renamed libpng.lib to png.lib, including header files Copy PNG under EMULE.

5. Id3lib v3.8.3 Decompression ID3LIB V3.8.3, change config.h.win32 to config.h, then enter the libprj of the decompression, and open the project file, remove the ID3lib v3.8.3 comes with the header file path of the Zlib library. , Add a header file that compiles the Zlib library prior to compiles the Release version. Copy the generated ID3lib.lib and header file to the ID3 under EMULE.

6.cxImage Enter Emule / CXImage, open engineering files, set the correct PNG and ZLIB library files and header files, then compile the release version, copy the generated cximage.lib to emule / cximage.

[3] The compiler eMule open DialogMinTrayBtn.cpp following #if 0 // define this to use that source file as template #define TEMPLATE template #else // define this to instantiate functions for class 'BASE' right in this CPP module #define TEMPLATE #define BASE CResizableDialog #endif to #if 0 // define this to use that source file as template #define TEMPLATE template #else // define this to instantiate functions for class 'BASE' Right in this cpp module #define Template Template <> #define base cresizabledialog #ENDIF Check if the required header file directory and library files are correct, then you can compile the release version of emule. If all EMULE support libraries are compiled / MT compilation, there should be no problems with links, if there is still a runtime library symbol conflict, some runtime libraries can be ignored in the link parameters.

转载请注明原文地址:https://www.9cbs.com/read-108284.html

New Post(0)