Wargus / stratagus

The Stratagus strategy game engine
GNU General Public License v2.0
626 stars 119 forks source link

I'm so close to compiling Successfully! #58

Closed timfel closed 8 years ago

timfel commented 8 years ago

I am so close to being able compile the trunk release 8053, I only have one error showing up in the entire compiling/linking process!

This is the latest log read out from VC 2010

1>------ Build started: Project: ZERO_CHECK, Configuration: Debug Win32 ------ 2>------ Build started: Project: stratagus, Configuration: Debug Win32 ------ 2>LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library 2>MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup 2>C:\Games\Stratagus\trunk8053\bin\Debug\stratagus.exe : fatal error LNK1120: 1 unresolved externals 3>------ Build started: Project: ALL_BUILD, Configuration: Debug Win32 ------ 3> Build all projects 4>------ Skipped Build: Project: INSTALL, Configuration: Debug Win32 ------ 4>Project not selected to build for this solution configuration ========== Build: 2 succeeded, 1 failed, 1 up-to-date, 1 skipped ==========

I have all the libraries defined, but this one error (for now - who knows if any more will pop up if I get this one solved) is the ONLY ONE stopping it so far from becoming a functional executable.


Imported from Launchpad using lp2gh.

timfel commented 8 years ago

(by erstmap) If Stratagus were a movie, it'd be called The Uncompilables.

timfel commented 8 years ago

(by dinky-dye-aussie) Seriously? that was your helpful comment? lol...Don't worry I looked it up on Google. now it's off home to find out if the help I looked for, actually helps. With that wish me luck! I'll report my results asap.

timfel commented 8 years ago

(by iddqd-mail) Just add the SDLmain.lib in the Linker options

timfel commented 8 years ago

(by dinky-dye-aussie) That worked Cybermind, although there are a few problems with the game when you're playing...

The movies didn't run, so i had to disable them...not sure why they didn't work.

Also, when I play the game without OpenGL, it looks like it is running in debug mode, with all the tiles surrounded by boxes. When I use OpenGL, it runs like it should, and is actually quite smooth.

I did get revision 8076 and managed to successfully compile and link it, but when I played that revision, there were no resources available to the player or AI, instead of starting a map with say "30,000 gold", "20,000 wood" and 10,000 oil" it starts the game with no money values next to the resources, it just has a simple "o/o" character, and you cant build, because there are no resources available.

Other than that it compiles perfectly now in MSVC 2010 :)

timfel commented 8 years ago

(by iddqd-mail) Download new wargus scripts from trunk and replace the old ones

timfel commented 8 years ago

(by dinky-dye-aussie) Scripts Downloaded and installed and it works great :) I even tested out the Orc Expansion Campaign again, and the game goes to the "Defeated!" screen successfully when the Ogre gets killed now instead of crashing, so whatever has been changed to make this work right, dont change it!

I also played an entire skirmish game against the AI and it runs perfectly with no crashing and I won the game and it went to the Victory screen with no crashing either. Good to see the bugs are being delt with. Next thing I'd like to see is that massive chunk of code that is non-active at the moment in mainscr.cpp (I think) that controls what infopanel shows up depending on what is selected or being upgraded/trained, finally getting used...

timfel commented 8 years ago

(by erstmap) Hey Travis, could you share your compiled binary with me?

timfel commented 8 years ago

(by dinky-dye-aussie) Sure man i'll get the latest revision and compile that and put it up on the forums for everyone to download. I haven't got the net at home yet. It will be easier for me to do weekly builds for all the win32/64 ppl when i do tho. I will say the game runs much more stable with my revised exe - 8079, but i'm hoping to get revision 8102 and see how it goes.

Later - travis


Sent from my Nokia phone

-----Original Message----- From: Kyran Jackson Sent: 2/23/2012 10:58:19 PM To:

You received this bug notification because you are subscribed to the bug report. https://bugs.launchpad.net/bugs/937353

Title: I'm so close to compiling Successfully!

Status in Stratagus: New

Bug description: I am so close to being able compile the trunk release 8053, I only have one error showing up in the entire compiling/linking process!

This is the latest log read out from VC 2010

1>------ Build started: Project: ZERO_CHECK, Configuration: Debug Win32 ------ 2>------ Build started: Project: stratagus, Configuration: Debug Win32 ------ 2>LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library 2>MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup 2>C:\Games\Stratagus\trunk8053\bin\Debug\stratagus.exe : fatal error LNK1120: 1 unresolved externals 3>------ Build started: Project: ALL_BUILD, Configuration: Debug Win32 ------ 3> Build all projects 4>------ Skipped Build: Project: INSTALL, Configuration: Debug Win32 ------ 4>Project not selected to build for this solution configuration ========== Build: 2 succeeded, 1 failed, 1 up-to-date, 1 skipped ==========

I have all the libraries defined, but this one error (for now - who knows if any more will pop up if I get this one solved) is the ONLY ONE stopping it so far from becoming a functional executable.

To manage notifications about this bug go to: https://bugs.launchpad.net/stratagus/+bug/937353/+subscriptions

timfel commented 8 years ago

(by dinky-dye-aussie) I got the latest update (8111) and compiled it, but it crashed. I've downloaded the latest wargus scripts again (1635) and I'll put them in the scripts folder and see how that affects the game and let you all know if it solves the issue. If not I've got a few of the previous stratagus revisions - 8110, 8109, 8108 and even 8100 if the later revisions keep stuffing up.

I am getting internet very soon, so as soon as I do I'll put the latest revised code up on the forum as a compiled executable for you all.

timfel commented 8 years ago

(by joris-dauphin) What do you do to have a crash ?

timfel commented 8 years ago

(by dinky-dye-aussie) I dont know, I was running a release build, because the debug build has each tile surrounded by black, red or yellow squares depending on what tile type it is. I'll run a debug build and see if I can get it to crash again. If it doesn't I'll post a release compile of the stratagus exe on here.

timfel commented 8 years ago

(by dinky-dye-aussie) So I ran a debug build, and I ran the game. It was definitly in debug mode because when I was playing the game, it went to freeze up, but instead of just quiting it posted a handy message box. The Error was found to be in the file "action_resouce.cpp" on "Line 594" I searched this in VC, and all the line has written on it is - "Assert(source)".

Dunno why this would cause an error that would make the game flunk out and crash, but it did. This never happened with release 8079, it played great, but it's happening now with release 8119 which I downloaded and compiled today. Maybe something went awry when the action definitions were split into seperate header files...? I don't know.

That's what caused it to crash though.

timfel commented 8 years ago

(by dinky-dye-aussie) Also when I played a Campaign game - again the second orc mission on the expansion campaign - the Orge Hero won't even attack the enemy ogre magi or anyone else on the opposing team for that matter - he just runs away and all my other units just stand there doing nothing...is there something in the script files I need to change?

timfel commented 8 years ago

(by dinky-dye-aussie) And the Towers wont even fire too. what the?

timfel commented 8 years ago

(by iddqd-mail) I'm fixed bug with towers autoattack. Units will retaliate only if the target unit is in their react range, otherwise they will just run away. To prevent this, it's need to set SetRevealAttacker(true), but I don't know, if this is needed for Wargus

timfel commented 8 years ago

(by dinky-dye-aussie) Got your bug fixed revision cybermind and compiled it, also changed the "SetRevealAttacker" to true, and it had no effect on how the towers behaved or weather the units retaliated. I will later today be compiling revision 8110, as the action headers were split in 8111, so I want to see if this affects how the game works, hence testing 8110.

If 8110 works the way nature intended I will post an exe for you all. If not. I'll go back to 8079 and all users have to do then is down wargus trunk 1630 to make it all work properly.

timfel commented 8 years ago

(by dinky-dye-aussie) So I rescue the units and towers in the first level of the orc expansion, then I tempt the enemy back to my base which has two gaurd towers, and they fire and kill the enemy units no worries.

I rescue the base in the second orc expansion map, and tempt an enemy unit back to my base, and the towers won't fire at all! this feels like an LUA campaign script problem to me.

timfel commented 8 years ago

(by joris-dauphin) bug with tower don't attack has been introduced by myself in rev 8054. (&& replaced by ||) I have just fixed that.

timfel commented 8 years ago

(by dinky-dye-aussie) Thanks Joris that fixed the tower bug. I've compiled revision 8094 with that code change as that revision is the only one that enables the players units to still attack the enemy when they're in range without having to manually click the enemy, as the later revisions you do have to do this.

Am I being a pain man? seriously if I am let me know aye......I love the fact this code is being maintained though.

timfel commented 8 years ago

(by joris-dauphin) We lack seriously of tests on stratagus. So we just use users to test it (and dev are users).

So thanks to report bugs.

I am looking for the Assert problem.

timfel commented 8 years ago

(by erstmap) Binary is getting closer! Yay!

timfel commented 8 years ago

(by joris-dauphin) Fix typo, now "still units" defend in orc campaign expansion n°2

timfel commented 8 years ago

(by dinky-dye-aussie) That worked Joris, but now when the gold mine is empty and blows up it crashes. Line 654 of "action_resource.cpp" has the following code:

Assert(source);

I thought that line was (at one stage) commented out to stop the crash happening. I'll comment it out and recompile and test to see what happens and let you know as soon as I get a result.

timfel commented 8 years ago

(by dinky-dye-aussie) It just went to the line under that one, crashed the same way. I opted to "debug" the file and it went to line 655 which is this:

          Assert(source->ResourcesHeld <= 655350);

So I am thinking somewhere in revision history the mine crash bug has been re-introduced somehow. I'm trolling through the revisions that fixed this to see if any code has been taken out of the latest revision (8126).

timfel commented 8 years ago

(by erstmap) This mine crash has been a scorge on Stratagus since it moved to launchpad. No matter how many times it gets killed it just keeps coming back!

timfel commented 8 years ago

(by dinky-dye-aussie) I know man. I'm not sure it happens because code gets deleted, or even added to the action_resource.cpp file, but it has happened (I think) since the actions were split into seperate headers...I think...I'm not sure...

It's pretty much the only thing that's really narking me atm...but as Joris said, testing is good, and I'm prepared to keep compiling, linking and testing the life out of this game, so that all the poeple who play it can play it smoothly someday :)

timfel commented 8 years ago

(by joris-dauphin) I can reproduce the mine problem, I am currently working on it.

timfel commented 8 years ago

(by joris-dauphin) bug fixed. with rev 8130

timfel commented 8 years ago

(by dinky-dye-aussie) Joris man you're a legend! That fix, er, fixed it hehe. Now I just gotta get the SDL libraries off Pali that he uses to compile the game so hopefully I can get the cinematics to work correctly, then I'll release a binary for everyone to download. So lookin forward to that.

timfel commented 8 years ago

(by dinky-dye-aussie) does anyone here have the SDL.dll file in their stratagus 2.2.6. directory? if so email it to me. I did a fresh install of the game but it didn't install the SDL.dll file, and I need the right one to test the game out. Please help.

timfel commented 8 years ago

(by erstmap) I'm on the edge of my seat here...

timfel commented 8 years ago

(by dinky-dye-aussie) Well, Kyran, thanks for uploading your DLL for me, but I'm sorry to say it seems that it's the way MSVC compiles the code for the SDL library that affects how the movies look and behave.

I'll wait till I get SDL binaries off of Pali, then I'll try again. I really hope they work for us all. it would be the icing on the cake.

timfel commented 8 years ago

(by dinky-dye-aussie) Well. I checked to see if those libraries worked with MSVC, and they don't. I don't have linux so I can't compile stratagus for windows using the gcc cross compiler either...The only thing I can recommend Kyran - and anyone else wanting this fix - is that you put up with crappy looking movies, or disable them and then test this fix as much as you can to see how it goes.

I am putting build 8130 binary up on the stratagus forum for anyone interested in obtaining it and testing it for the development team. Also let me know how your movies play - i.e. if they're all rainbow like or not.

timfel commented 8 years ago

(by joris-dauphin) You can compile with gcc on windows using MinGW or CygWin.

timfel commented 8 years ago

(by dinky-dye-aussie) I'm trying to compile atm with MinGW. I did use CMAKE first to build MinGW Makefiles (should I have done this, or do I just use MinGW to compile from the get go?) I'm new to using MinGW and GCC/G++ to compile. I guess I've been lazy in the compiling/linking knowledge department, and I'm too used to having MSVC to do all those parameters for me.

I'd like a hand on how to setup my MinGW and Stratagus source directories. My current setup is as follows:

MinGW is in "C:\MinGW"

Stratagus source is in "C:\Games\Stratagus\trunk"

I know they say to create a directory called "build" and I've done that. I use the MinGW Shell to run the gcc/g++ compiler if that helps.