Official eMule-Board: How To Build Emule 0.50A With Vs 2008 - Official eMule-Board

Jump to content


  • (2 Pages)
  • +
  • 1
  • 2

How To Build Emule 0.50A With Vs 2008

#1 User is offline   ElKarro 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 10
  • Joined: 07-February 10

Posted 10 April 2010 - 12:58 AM

I've just built (with hundreds of warnings, of course) 0.50a with Visual Studio 2008.
Since things are almost the same, please refer to my previuos topic: http://forum.emule-p...howtopic=148548

I shortened on the package this time, the archive is organized as follows:

"original" -> "kept" contains strictly eMule sources; "removed" contains library sources shipped with eMule;
"patch" -> "patch1" modifies original sources; "patch2" adds libraries already configured

kept + removed = eMule0.50a-Sources (the original distributed package)
kept + (patch1 + patch2) = solution fully buildable with Visual Studio 2008


Here's the link to the VS Solution with libs updated to March 14 2010 (release date of newest zlib):
ed2k://|file|eMule0.50a%20on%20VS2008%20-%20libs%20updated%20to%202010-03-14.rar|5878015|6273E19DA69ECC1E930D68BC6EFB320F|h=446W7SWTA3FILGUQMZIPQ4ORDAZOW2PX|/

To avoid confusion, I don't remove the link to the original archive with which I started this topic, it includes previous releases of zlib and libpng:
ed2k://|file|eMule0.50a%20on%20VS2008.rar|5737204|6C7E0F11F672AD48A07699EF21F73292|h=WZ62I4MWBOQBMWYZQR54U6PRMXF46VS7|/

Both files are on KAD.

Reminder:
open ".\srchybrid\emule_vc9-all.sln"
build "Release|Win32" or "Debug|Win32 config"


ElKarro

This post has been edited by ElKarro: 13 April 2010 - 04:41 PM

0

#2 User is offline   schnulli900 

  • Member
  • PipPip
  • Group: Members
  • Posts: 35
  • Joined: 25-December 02

Posted 11 April 2010 - 06:43 PM

Thanks for the package, works fine for me. I had to install DirectX SDK August 2007 to compile under Windows 7 Ultimate. :clap:
schnulli900
AMD Athlon 64 3000+
1GB-80GB-DSL 4096/512
WXP Pro SP2
0

#3 User is offline   ElKarro 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 10
  • Joined: 07-February 10

Posted 12 April 2010 - 07:15 AM

Thanks to you for the info about Win7

ElKarro
0

#4 User is offline   skynetman 

  • Premium Member
  • PipPipPipPipPip
  • Group: Debugger
  • Posts: 278
  • Joined: 13-September 02

Posted 13 April 2010 - 10:27 AM

I keep having an alert window every time i start emule.exe (Release win32):

"emule.exe was not linked with /SafeSEH!"

Tried both /SAFESEH and /SAFESEH:NO in linking additional parameters but does not compile any more...

Any idea?

Vista 64bit here

This post has been edited by skynetman: 13 April 2010 - 10:28 AM

Skynetman
eMule official beta tester
Admin di www.emule.it, la pi¨ completa Guida ad Emule in Italiano
Responsabile del canale italiano ufficiale di supporto Emule: server ircchat.emule-project.net , canale #emule-italian
0

#5 User is offline   Some Support 

  • Last eMule
  • PipPipPipPipPipPipPip
  • Group: Yes
  • Posts: 3628
  • Joined: 27-June 03

Posted 13 April 2010 - 10:40 AM

Quote

but does not compile any more...


That description might not be detailed enough to figure out the reason (but most likely you didn't compiled the libs properly with this options in case you created your own project files instead using the included ones).

#6 User is offline   skynetman 

  • Premium Member
  • PipPipPipPipPip
  • Group: Debugger
  • Posts: 278
  • Joined: 13-September 02

Posted 13 April 2010 - 12:30 PM

Quote

That description might not be detailed enough to figure out the reason (but most likely you didn't compiled the libs properly with this options in case you created your own project files instead using the included ones).

Tested again from scratch
I merged the sources correctly then
1) launched emule_vc9-all.sln
2) Configuration manager --> Release + Win32
3) Build Solution

It compiles ok, but the exe has the above alert every time on start.

Then i tried with /SAFESEH (in emule--> linker --> command line --> additional option):

And the result is:
1>zlibstat.lib(inffas32.obj) : error LNK2026: module unsafe for SAFESEH image.
1>zlibstat.lib(gvmat32.obj) : error LNK2026: module unsafe for SAFESEH image.
1>cryptlib.lib(asn.obj) : MSIL .netmodule or module compiled with /GL found; restarting link with /LTCG; add /LTCG to the link command line to improve linker performance
1>Generating code
1>Finished generating code
1>zlibstat.lib(inffas32.obj) : error LNK2026: module unsafe for SAFESEH image.
1>zlibstat.lib(gvmat32.obj) : error LNK2026: module unsafe for SAFESEH image.
1>Release_vc9\emule.exe : fatal error LNK1281: Unable to generate SAFESEH image.
1>Build log was saved at "file://g:\eMule0.50a on VS2008\test\eMule\srchybrid\Release_vc9\BuildLog.htm"
1>emule - 5 error(s), 757 warning(s)
========== Build: 0 succeeded, 1 failed, 9 up-to-date, 0 skipped ==========


I then tried changing zlib compiling parameters as my old 49c ones with no success.
Any idea?

This post has been edited by skynetman: 13 April 2010 - 01:23 PM

Skynetman
eMule official beta tester
Admin di www.emule.it, la pi¨ completa Guida ad Emule in Italiano
Responsabile del canale italiano ufficiale di supporto Emule: server ircchat.emule-project.net , canale #emule-italian
0

#7 User is offline   Some Support 

  • Last eMule
  • PipPipPipPipPipPipPip
  • Group: Yes
  • Posts: 3628
  • Joined: 27-June 03

Posted 13 April 2010 - 03:43 PM

As i guessed already: It doesn't compiles because you compiled the libraries without safeseh.

#8 User is offline   ElKarro 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 10
  • Joined: 07-February 10

Posted 13 April 2010 - 04:40 PM

libpng 1.4.0 and zlib 1.2.3 were obsolete at eMule 0.50a release time, so I repacked with the new ones (1.4.1 - 1.2.4)
look at post #1
0

#9 User is offline   skynetman 

  • Premium Member
  • PipPipPipPipPip
  • Group: Debugger
  • Posts: 278
  • Joined: 13-September 02

Posted 14 April 2010 - 11:05 AM

anyway /SafeSEH error still there...
Skynetman
eMule official beta tester
Admin di www.emule.it, la pi¨ completa Guida ad Emule in Italiano
Responsabile del canale italiano ufficiale di supporto Emule: server ircchat.emule-project.net , canale #emule-italian
0

#10 User is offline   ElKarro 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 10
  • Joined: 07-February 10

Posted 14 April 2010 - 12:28 PM

If your building fails on the package I posted without any change, then I've no idea... But we can try to investigate...

I see you got error LNK2026 on inffas32.obj and gvmat32.obj modules (folder .\zlib\contrib\masmx86).
Those objs (given with zlib v1.2.3 package) were originally assemblated from inffas32.asm and gvmat32.asm (look at batch and readme files), so zlibstat.vcproj links them without re-assembly.

Try this:
set Release|Win32 config, go to configuration manager and change from Release to ReleaseWithoutAsm for zlibstat. Rebuild all.

Note: in zlib v1.2.4 gvmat32.asm was replaced by match686.asm.
In the re-pack I adjusted zlibstat.vcproj adding a pre-build step to assembly inffas32.asm-match686.asm each time, and to move their objs to tmp folder thogether with the other temp files.

This post has been edited by ElKarro: 14 April 2010 - 12:30 PM

0

#11 User is offline   skynetman 

  • Premium Member
  • PipPipPipPipPip
  • Group: Debugger
  • Posts: 278
  • Joined: 13-September 02

Posted 14 April 2010 - 01:15 PM

The building is ok with the original package but i have always the runtime alert window on start (but then emule starts and works correctly!)

Posted Image

If i add /SafeSEH to emule Linker command line then (new package) i have the same code error as before even without ASM:

10>zlibstat.lib(inffas32.obj) : error LNK2026: module unsafe for SAFESEH image.
10>zlibstat.lib(match686.obj) : error LNK2026: module unsafe for SAFESEH image.
10>Release_vc9\emule.exe : fatal error LNK1281: Unable to generate SAFESEH image.


Could it be a problem related to /nodefaultlib?
http://msdn.microsof...y/9a89h429.aspx

I do not understand why it seems i'm the only one with the problem anyway :cry2:
Skynetman
eMule official beta tester
Admin di www.emule.it, la pi¨ completa Guida ad Emule in Italiano
Responsabile del canale italiano ufficiale di supporto Emule: server ircchat.emule-project.net , canale #emule-italian
0

#12 User is offline   Matrik 

  • Splendid Member
  • PipPipPipPip
  • Group: Members
  • Posts: 215
  • Joined: 02-February 04

Posted 14 April 2010 - 02:14 PM

Hello everybody :punk:

Quote

i'm the only one with the problem anyway
:cry2:


No , you are not alone. :angelnot:
for me , build ok with many warnings !!! and when I run my .exe , I have the same you :cry2:
Posted Image
[edit] I build on vista SP1 [/edit]
Thx for your help :respect:

This post has been edited by Matrik: 14 April 2010 - 02:25 PM

ISSA-NISSA
.:Aqui Finda Sian Nissart:.
0

#13 User is offline   nullzone 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 3
  • Joined: 14-April 10

Posted 14 April 2010 - 02:28 PM

View PostMatrik, on 14 April 2010 - 03:14 PM, said:

Hello everybody :punk:

Quote

i'm the only one with the problem anyway
:cry2:


No , you are not alone. :angelnot:

...snip...


I have the same issue compiling in a W7 x64 Professional. Maybe could it be a problem related to compiling in Windows 7/Vista x64 even 32bits version? Tbh, I havent got any free time to do some tests. I will update here as soon as I have any free time to do it (if somebody hasnt done it before).

Cheers,

Nullzone.

This post has been edited by nullzone: 14 April 2010 - 02:29 PM

0

#14 User is offline   Some Support 

  • Last eMule
  • PipPipPipPipPipPipPip
  • Group: Yes
  • Posts: 3628
  • Joined: 27-June 03

Posted 14 April 2010 - 03:05 PM

View Postskynetman, on 14 April 2010 - 02:15 PM, said:

The building is ok with the original package but i have always the runtime alert window on start (but then emule starts and works correctly!)

Posted Image

If i add /SafeSEH to emule Linker command line then (new package) i have the same code error as before even without ASM:

10>zlibstat.lib(inffas32.obj) : error LNK2026: module unsafe for SAFESEH image.
10>zlibstat.lib(match686.obj) : error LNK2026: module unsafe for SAFESEH image.
10>Release_vc9\emule.exe : fatal error LNK1281: Unable to generate SAFESEH image.


Could it be a problem related to /nodefaultlib?
http://msdn.microsof...y/9a89h429.aspx

I do not understand why it seems i'm the only one with the problem anyway :cry2:


I don't mean to be rude, but i already told you two times and the error message is quite clear too: YOU NEED TO COMPILE ALL OTHER LIBS WITH SAFESEH NOT ONLY EMULE, otherwise it won't work.

If you don't manage to do this and only want to use the release for yourself you could also just remove the warning out of the sourcecode.

#15 User is offline   nullzone 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 3
  • Joined: 14-April 10

Posted 14 April 2010 - 04:10 PM

View PostSome Support, on 14 April 2010 - 04:05 PM, said:

..snipp..

I don't mean to be rude, but i already told you two times and the error message is quite clear too: YOU NEED TO COMPILE ALL OTHER LIBS WITH SAFESEH NOT ONLY EMULE, otherwise it won't work.

If you don't manage to do this and only want to use the release for yourself you could also just remove the warning out of the sourcecode.


Hello,

I am new using VS so ... I dont have a chance about where I should add the /safeseh option to get the libs compiled with that support as well.
The only component of the full solution which a "Linker" option available is the "emule" pack.

Posted Image

Where should we add the option in "each" lib package? there is not a Properties -> Linker -> Command line... (Example: zlib pack)

Posted Image

I can perfectly understand that it is so basic for u, but sadly I am so newbie yet.

Thx by advance...

Note: I am trying to learn .. dont be so hard with me pls :) it's the first question I do.

This post has been edited by nullzone: 14 April 2010 - 04:11 PM

0

#16 User is offline   tHeWiZaRdOfDoS 

  • Man, what a bunch of jokers...
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 5630
  • Joined: 28-December 02

Posted 14 April 2010 - 04:25 PM

View PostSome Support, on 14 April 2010 - 05:05 PM, said:

I don't mean to be rude, but i already told you two times and the error message is quite clear too: YOU NEED TO COMPILE ALL OTHER LIBS WITH SAFESEH NOT ONLY EMULE, otherwise it won't work.

If you don't manage to do this and only want to use the release for yourself you could also just remove the warning out of the sourcecode.

Maybe you can give detailed instructions about that? I had to remove the SAFESEH option from one of my projects, too, due to an incompatible lib. MSDN says you have to re-compile all libs with a recent V$-edition but this won't help.
The thing is that you cannot set the SAFESEH option on libraries (only when compiling via ml.exe) but there must be some settings that have to be turned ON and some that must be turned OFF for the lib to be SAFESEH compatible... but I couldn't find a list or information at all.
0

#17 User is offline   skynetman 

  • Premium Member
  • PipPipPipPipPip
  • Group: Debugger
  • Posts: 278
  • Joined: 13-September 02

Posted 14 April 2010 - 07:50 PM

View PosttHeWiZaRdOfDoS, on 14 April 2010 - 06:25 PM, said:

Maybe you can give detailed instructions about that? I had to remove the SAFESEH option from one of my projects, too, due to an incompatible lib. MSDN says you have to re-compile all libs with a recent V$-edition but this won't help.
The thing is that you cannot set the SAFESEH option on libraries (only when compiling via ml.exe) but there must be some settings that have to be turned ON and some that must be turned OFF for the lib to be SAFESEH compatible... but I couldn't find a list or information at all.


As above :)
Skynetman
eMule official beta tester
Admin di www.emule.it, la pi¨ completa Guida ad Emule in Italiano
Responsabile del canale italiano ufficiale di supporto Emule: server ircchat.emule-project.net , canale #emule-italian
0

#18 User is offline   Some Support 

  • Last eMule
  • PipPipPipPipPipPipPip
  • Group: Yes
  • Posts: 3628
  • Joined: 27-June 03

Posted 14 April 2010 - 08:32 PM

Ok, actually i stand corrected - i didn't looked it up, you don't have to link the libs with /safeseh. Sorry. However the problem is most likely still with the libs compiled with the wrong parameter. If you use the project files included in the official source release (even if you use a higher VS version you should be able to use them) they should compile just fine (i didn'T looked into the package linked here, but it seems to use other names/directories too - btw we actually still used zlib 1.2.3 but it shouldn't matter i think).

#19 User is offline   tHeWiZaRdOfDoS 

  • Man, what a bunch of jokers...
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 5630
  • Joined: 28-December 02

Posted 15 April 2010 - 05:43 AM

Right, it works with the official project(s)... but the question is: WHY doesn't it work in the cases mentioned above or WHAT parameters have to be set to what setting to make it work?
0

#20 User is offline   buzz 

  • Golden eMule
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 860
  • Joined: 25-December 02

Posted 15 April 2010 - 07:02 AM

I managed to compile after adding the /Safeseh parameter to the command line in the properties of the ASM-files (inffas32.asm and gvmat32.asm )!
Add /safeseh directly after ml.exe
You then have to manually clean and rebuild both the asm-files and the lib.

This post has been edited by buzz: 15 April 2010 - 08:08 AM

0

  • Member Options

  • (2 Pages)
  • +
  • 1
  • 2

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