Jump to content

nolf2 toolkit source code does not compile error "compiler is out of heap space"


FireFox-
 Share

Recommended Posts

Hello everyone,

my name's Marco,

 

I would like to develop a mod for nolf2 but i'm having some issue...

after i installed no one lives forever 2,the patches and the toolkit i'm having problems with the source code.

it compiles at first but then it aborts telling me "compiler is out of heap space."

 

i own the italian version of no one lives forever 2 but before posting here i decided to see if the problem persist with the english version too and i got the same results it compiles a bit and then i get this error compiler is out of heap space.

i'm only able to compile cres.dll but everything else which is game specific does not compile at all.

 

i'm using windows xp professional with service pack 3,visual studio 6.0 enterprise sp6,directx SDK 8.1,nolf 2 italian patched to the last patch available which is 1.3,nolf2 toolkit.

 

here are the steps that i did:

 

1)Installing the no one lives forever 2 game using Recommended (Full install)

 

2)installed directX 8.1

 

3)I patched the game with the proper italian patches nolf2_update_it_10_11.exe (this is the italian 1.1 patch)

and then i applied the patch 1.3 which is nolf2_update_it_13.exe

 

4)after patching the game with the 1.3 patch i installed the nolf2 toolkit si_nolf2_tools_en_10.exe,

and then i extracted the content of the toolkit when it asked me to do.

 

5) after that, i extracted the source code in its own directory named Souce and then i setup the environment variables as described in the help document. (the game is installed in C:\NOLF2 otherwise it will not recognize a copy command and will throw an error if i don't do that.)

 

6) i opened the project within visual c++ 6.0 as described in the help file using the Game\T02.dsw workspace which includes everything in it and skipped the sourcesafe code control since i don't have the monolith database in my pc.

 

7)i tried to compile the source code as-is before modifying it but it does not compile and gives me "compiler is out of heap space" error.

 

the same process has been done with the english version too except for the third point which i used the english patches instead of the italian. but the result remains the same

 

can someone help me trying to resolve this?

 

did i do something wrong? if so where?

 

Thank you in advance for the help

 

Greetings Marco :)

Edited by FireFox-
Link to comment
Share on other sites

Some suggestions are here: http://forums.techarena.in/software-development/1412784.htm. It isn't VS6, but VS7 should be close enough to give you some stuff to try.

hello FortranDragon,

thank you for the reply i'll check the thread u gave me and i'll try what is being suggested there and then i report back here if everything works or i get the same problem.

just another question shall i run the source code using administrator's privileges or may i open it using the normal user in visual studio?

 

thank you in advance for the help

Link to comment
Share on other sites

It has been years since I used VS6, so I would suggest trying the options first as a normal user. If that doesn't work you might run VS6 as an administrator to see if that allows the source code to be compiled. Given that many people ran NT/2000/XP as an administrator that might be what is stopping the source from compiling.

Link to comment
Share on other sites

I guess the docs recommend to compile the whole with the compiler shipped with Visual Studio .NET 2003 (msvc 7 then?). You may look into that direction. Just realise that the game got published when Windows XP was one year old and back then, rights managment was just nonexistent on Windows. Expect a lot of stuffs to be working only with admin rights.

 

Meanwhile, I'm dreaming to see a port of this code that uses g++ or clang++ and not their weird compiler with their weird solution files. But since I had a small look into the code, I can tell you there is a lot of #ifdef specific between msvc 6 and 7; so porting this would be a nightmare I guess... Even worse those whole uses MFC and not some classic posix standard library.

Link to comment
Share on other sites

hello FortranDragon,

thank you for the reply,the error has been solved there were /zm1000 in some projects settings which were causing the error,

after i changed it to /zm500 it worked :),now it compiles fine :)

 

Thank you for your help :)

 

Greetings Marco

Link to comment
Share on other sites

Hi Barto and Larry,

I guess the docs recommend to compile the whole with the compiler shipped with Visual Studio .NET 2003 (msvc 7 then?). You may look into that direction. Just realise that the game got published when Windows XP was one year old and back then, rights managment was just nonexistent on Windows. Expect a lot of stuffs to be working only with admin rights.

 

Meanwhile, I'm dreaming to see a port of this code that uses g++ or clang++ and not their weird compiler with their weird solution files. But since I had a small look into the code, I can tell you there is a lot of #ifdef specific between msvc 6 and 7; so porting this would be a nightmare I guess... Even worse those whole uses MFC and not some classic posix standard library.

 

the document shipped with the toolkit refers to Visual C++ 6.0 to build the source code,unfortunately visual c++ 6.0 is also known as the non standard IDE/compiler since it is not standard at all,for now it works on visual c++ 6.0,i agree with you it is heavily based on MFC... (i hate MFC :) ),i think the engine had been developed with microsoft cooperation that's why it is using MFC as base.

 

Not meaning to sound facetious but I really don't understand this Greek language your boys speak of! :cry2:

 

it is too difficult to explain since this is something related to Programming and Programming Languages, what i can tell you is that "the heap" is a "special" portion of memory used by pointers in c++ which may increase or decrease its size dynamically by allocating or deallocating it (when using malloc(),free(),new ,sizeof() etc.), pointers are kinda dangerous if someone does not know how to use them properly.

 

in Java the heap is known as the stack or stack pointer dont' remember exactly. but it should be the same.

 

Greetings Marco

Edited by FireFox-
Link to comment
Share on other sites

Thanks Eliteone for the link, it's clear that Microsoft decided to make a free (as free beer would a few bearded guys say) version of visual studio called community edition but I really doubt it will work entirely as we would want because there might be some compatibility issues. Notice I have not tested since my windows version is lacking some space to install it :P.

I think they also decided to change the syntax of the project files and converting to what the latest version uses was not working as one would expect (cmake anyone?).

 

@FireFox-:

You're right (because it's written on wikipedia page of lithtech - well that's not the best justification I could do) that microsoft was heavily involved. Lithtech - as I imagine - was also a way to expose DirectX 8 to the public. Not surprising they used as much tech from microsoft as possible.

 

@Larry:

Let me do an allegory to explain you the heap. It might not be entirely correct but I try to get the best idea out of it.

You're tinkering something with wood.

 

You are firstly bringing the wood from the shop. It's long to go there and you cannot really carry a lot in your car. Mostly like the hard drive.

 

Then, to store your stuffs you are working with more efficiently, you put everything on a shelf when you start to work. But when you are done, you clean it for the next day. Compare this to the actual RAM in your computer. It is faster to get your piece of wood, but there is less volume than what the shop has.

 

Finally, for each bit of work you need to do, you have your working bench where you can stick all your tool and the plank you are working with. This is the stack, it's really fast and it's where you do the actual job. You have your blueprints (program), your planks and your current work. The heap could be compared as the space you would put your current work and your planks on the bench.

 

So to explain what FireFox-'s problem was, he was simply out of space to put planks on his bench.

 

As a sidenote, I have seen 2 repos on github about the lithtech engine that tried to do some work in it. I guess both project failed to materialize sadly...

https://github.com/jsj2008/lithtech

https://github.com/bibendovsky/ltjs

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Guidelines Privacy Policy.