Official eMule-Board: Emule V0.51D Reproducible Build - Official eMule-Board

Jump to content


Page 1 of 1

Emule V0.51D Reproducible Build

#1 User is offline   megaT 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 62
  • Joined: 09-May 20

Posted 21 May 2020 - 12:26 PM

Hello folks,

right now Im trying to build an emule v0.51d debug version (guess that's the one fox88 maintains).
It would be great if there would be a precise version list of all 3rd party libraries required.

So far Im having 2 problems, my debug environment is:
Windows 8.1
Visual Studio 2015 (also 2019 available)

The libraries Im using:
libpng 1.6.37
zlib 1.2.3
cryptopp 5.6.5 (might be too new, but seems to work for compiling)
mbedtls 2.16.2 (not the correct version?)
miniupnc 2.1.20191224
ResizableLib (old lib ver? Comes with ATLserver, also required)

The biggest issue I've is an linker error caused by MFC's CSocket classes:
1>Emule.obj : error LNK2001: unresolved external symbol "class CProcessLocal<class _AFX_SOCK_STATE> _afxSockState" (?_afxSockState@@3V?$CProcessLocal@V_AFX_SOCK_STATE@@@@A)

Not sure where to get this, MFC is supposed to magically sort their dependencies out? There are no other libraries I have to link against?
afcSockState seems to be in 'sockimpl.h' which is part of the SDK itself.
All this is required for CAsyncSocket (and further MFC socket communication)

Another problem I have had, probably only partially solved is caued by mbedTLS.
The version I've downloaded seems to require to setup a platform-dependent threading declaration.
Which is governed by a bunch of define macros: MBEDTLS_THREADING_ALT MBEDTLS_THREADING_C MBEDTLS_FS_IO -
the using header for eMule is TLSthreading.h - these declaration indicate that it was once written for mbedTLS.
But there is something missing, first mbedtls_threading_mutex_t is not defined.
I figured that it must be a struct holding win32 API CRITICIAL_SECTION and an int or bool flag "is_valid".

What mbedTLS also now requires seems to be an implementation of mbedtls_threading_set_alt which I've not much clue what it is supposed to do.
It's function signature is:
void mbedtls_threading_set_alt(void(*mutex_init)(mbedtls_threading_mutex_t *), void(*mutex_free)(mbedtls_threading_mutex_t *),
								int(*mutex_lock)(mbedtls_threading_mutex_t *), int(*mutex_unlock)(mbedtls_threading_mutex_t *)

So one shall pass the platform-native function calls and then it uses them to initialize, what, its state? No clue.
Maybe someone can lead me in the right dierction which versions to use - or to fill these gaps here.

Thanks

Edit:
Well I managed to get it to link, specifying an instance of _afxSockState in emule.cpp, probably not realy the correct way of doing this.
For now it runs and hasn't crashed yet.

This post has been edited by megaT: 21 May 2020 - 01:44 PM

0

  • Member Options

Page 1 of 1

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users