aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: Visual Studio 2008 baby steps  (Read 7958 times)

woutermense

  • Full Member
  • ***
  • Karma: 18
  • Offline Offline
  • Posts: 154
Visual Studio 2008 baby steps
« on: August 24, 2008, 04:29:00 PM »

MingW was giving me too much trouble so I decided to give Visual Studio a swing. Since I only have some experience in compiling software in a Linux environment, this is all new to me. I read the Wiki article on compiling with Visual Studio, but I still have some questions.

1) I downloaded Visual Studio Express Edition. It is a free version. Some things in the Wiki refer to Solution Folders but the free version does not support these. So if i want to build all external libraries, what should i pick from the list? My best guess would be cryptlib and everything wx*.

2) After compiling the external libraries, I want to compile amuleGUI and amuleCMD. amuleGUI sometimes succesfully compiles and sometimes i get an error (don't understand why, yet).
Code: [Select]
1>Linking...
1>CVTRES : fatal error CVT1100: duplicate resource.  type:MANIFEST, name:1, language:0x0409
1>LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt

3) AmuleCMD compilation generates another error for me, and I never succesfully compiled it.
Code: [Select]
1>------ Build started: Project: aMuleCMD, Configuration: Debug Win32 ------
1>Embedding manifest...
1>.\Debug\aMuleCMD.exe.intermediate.manifest : general error c1010070: Failed to load and parse the manifest. The system cannot find the file specified.
1>Build log was saved at "file://c:\Documents and Settings\wouter\Desktop\aMule\trunk\MSVC Solution\aMuleCMD\Debug\BuildLog.htm"
1>aMuleCMD - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 2 up-to-date, 0 skipped ==========

So, somebody got any tips?
Logged

Stu Redman

  • Administrator
  • Hero Member
  • *****
  • Karma: 214
  • Offline Offline
  • Posts: 3739
  • Engines screaming
Re: Visual Studio 2008 baby steps
« Reply #1 on: August 31, 2008, 12:57:25 PM »

1) Yeah, that's a limitation of the free version (there have to be some...) I'll make a clean project without folders for the free version some day.
2) There are sometimes problems with files being locked by other apps. For example Sysinternal Process Explorer locks the pdb, preventing a rebuild.
   Also, MSVC is far from bug free I'm afraid, and all of the development power goes into the dot-net stuff currently.  >:(
3) The project for amulecmd is just an empty dummy at the moment and does nothing useful.
Logged
The image of mother goddess, lying dormant in the eyes of the dead, the sheaf of the corn is broken, end the harvest, throw the dead on the pyre -- Iron Maiden, Isle of Avalon

woutermense

  • Full Member
  • ***
  • Karma: 18
  • Offline Offline
  • Posts: 154
Re: Visual Studio 2008 baby steps
« Reply #2 on: September 03, 2008, 10:16:24 PM »

1)  So, what do I need to do, in order? cryptopp, all things starting with wx, anything else?

2) So, since some software can block, I tried again to compile amuleGUI after a clean unpack of all the sources, following the wiki guide to the letter. No go.

3) I'm no programmer and i cannot find the relevant pieces of code to put together. Are there specific problems in creating a project for amuleCMD or should I be able to do it?
Logged

Stu Redman

  • Administrator
  • Hero Member
  • *****
  • Karma: 214
  • Offline Offline
  • Posts: 3739
  • Engines screaming
Re: Visual Studio 2008 baby steps
« Reply #3 on: September 03, 2008, 11:09:56 PM »

1) simply building the entire solution should do the trick (except for the amulecmd)
2) what error message did you get ?
3) If you can't figure out which files to add to the project you're doomed.  ;)

I'll try it with the Express edition and make a new solution for it (and a project for the cmd if it runs at all). But I'll have to move to a different computer, since I don't know what happens if I install Express and Full in parallel...
Logged
The image of mother goddess, lying dormant in the eyes of the dead, the sheaf of the corn is broken, end the harvest, throw the dead on the pyre -- Iron Maiden, Isle of Avalon

woutermense

  • Full Member
  • ***
  • Karma: 18
  • Offline Offline
  • Posts: 154
Re: Visual Studio 2008 baby steps
« Reply #4 on: September 04, 2008, 05:37:16 PM »

2) Same error as before, complaining about the manifest. Seems to happen only if you do the Debug build, but I have to double check that.

3) Yeah, I'm pretty much doomed then :) Can't find a folder which says 'contains mulecmd files' or any file with 'Hello, amulecmd code right here'. It is well hidden I guess, or maybe I'm not looking right.
Logged

Stu Redman

  • Administrator
  • Hero Member
  • *****
  • Karma: 214
  • Offline Offline
  • Posts: 3739
  • Engines screaming
Re: Visual Studio 2008 baby steps
« Reply #5 on: September 04, 2008, 10:05:09 PM »

If you want to give it a try yourself look in src/Makefile.am for amulecmd_SOURCES and work your way from there. But I haven't tried it and can't say if it compiles at all.
Logged
The image of mother goddess, lying dormant in the eyes of the dead, the sheaf of the corn is broken, end the harvest, throw the dead on the pyre -- Iron Maiden, Isle of Avalon

Stu Redman

  • Administrator
  • Hero Member
  • *****
  • Karma: 214
  • Offline Offline
  • Posts: 3739
  • Engines screaming
Re: Visual Studio 2008 baby steps
« Reply #6 on: September 07, 2008, 06:17:25 PM »

2) Same error as before, complaining about the manifest. Seems to happen only if you do the Debug build, but I have to double check that.
Yes, debug build was flawed. Will be fixed in tomorrow's tarball.

Edit: here's a working aMuleCMD project for you.
« Last Edit: September 07, 2008, 11:50:53 PM by sturedman »
Logged
The image of mother goddess, lying dormant in the eyes of the dead, the sheaf of the corn is broken, end the harvest, throw the dead on the pyre -- Iron Maiden, Isle of Avalon

woutermense

  • Full Member
  • ***
  • Karma: 18
  • Offline Offline
  • Posts: 154
Re: Visual Studio 2008 baby steps
« Reply #7 on: September 09, 2008, 04:25:27 PM »

I tried to make a project file for amuleCMD myself, which didn't work out too good. I got a lot of linker errors at the linking stage of amuleCMD. So I downloaded your project file to try that one out. But it had the same problem, massive errors at the final linking stage. Maybe you had to make some changes in other project files as well? I had hoped that these changes made it to last night's tarball, but they didn't.
Logged

Stu Redman

  • Administrator
  • Hero Member
  • *****
  • Karma: 214
  • Offline Offline
  • Posts: 3739
  • Engines screaming
Re: Visual Studio 2008 baby steps
« Reply #8 on: September 10, 2008, 10:46:31 PM »

Now - where did my post from yesterday go ?  ???
The project is VC9, while the other projects are currently VC8. I'm planning to switch it all to VC9 Express, but in one step and not partially. That's why it's not commited yet.

The problem is the solution which defines the project dependencies (and thus the libs to be linked with). Right-click amulecmd in the solution explorer and select "project dependencies". Then check base, core, libmulecommon, libmuleec, net and wxzlib.
Logged
The image of mother goddess, lying dormant in the eyes of the dead, the sheaf of the corn is broken, end the harvest, throw the dead on the pyre -- Iron Maiden, Isle of Avalon

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795
Re: Visual Studio 2008 baby steps
« Reply #9 on: September 11, 2008, 08:11:19 PM »

Now - where did my post from yesterday go ?  ???

Server database rollback.
Logged

Stu Redman

  • Administrator
  • Hero Member
  • *****
  • Karma: 214
  • Offline Offline
  • Posts: 3739
  • Engines screaming
Re: Visual Studio 2008 baby steps
« Reply #10 on: September 11, 2008, 08:28:43 PM »

And I thought I forgot to hit the "Post" button.  ;D
Logged
The image of mother goddess, lying dormant in the eyes of the dead, the sheaf of the corn is broken, end the harvest, throw the dead on the pyre -- Iron Maiden, Isle of Avalon

woutermense

  • Full Member
  • ***
  • Karma: 18
  • Offline Offline
  • Posts: 154
Re: Visual Studio 2008 baby steps
« Reply #11 on: September 12, 2008, 06:11:39 PM »

All is compiling fine now, great job! :)

Something else: does Visual Studio have the ability to generate backtraces? I have found the option to create a minidump file, but in the backtraces forum rules are to post only backtraces.

Are the devs are planning to move away from MingW?  I got that impression from recent conversations on the forum.
Logged

wuischke

  • Developer
  • Hero Member
  • *****
  • Karma: 183
  • Offline Offline
  • Posts: 4292
Re: Visual Studio 2008 baby steps
« Reply #12 on: September 12, 2008, 06:40:53 PM »

How can one read such a minidump-file? I have used VS, but never seen/used such a file.

Anyway, we do not abandon mingw, but some developers simply prefer VS over mingw and as it offers apparently superior debugging abilities, that's a good thing.
Logged

woutermense

  • Full Member
  • ***
  • Karma: 18
  • Offline Offline
  • Posts: 154
Re: Visual Studio 2008 baby steps
« Reply #13 on: September 12, 2008, 08:10:47 PM »

You can open it with Visual Studio and run a debug session. It will reproduce the error immediately instead of running the program. I've attached a dump for you or testing purposes. You'll have to remove the .png extension first, because the forum doesn't allow to attach .dmp files.
Logged

wuischke

  • Developer
  • Hero Member
  • *****
  • Karma: 183
  • Offline Offline
  • Posts: 4292
Re: Visual Studio 2008 baby steps
« Reply #14 on: September 12, 2008, 08:40:36 PM »

Ah, I understand. A very useful feature.

I'm currently on Linux and therefore can't test the file, but I have allowed the dmp file extension for further bug reports - please attach the file and write something about the circumstances when you report the crash - thank you!
Logged