Raised This Month: $ Target: $400
 0% 

How to compile on windows?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Carolus
Member
Join Date: Jun 2010
Old 07-15-2010 , 07:10   How to compile on windows?
Reply With Quote #1

Hi,

I have been trying to compile the sample_mm and stub_mm plugins without succes.

I have read http://wiki.alliedmods.net/Metamod:Source_Environment

But there are (many) key actions missing to actually get it compiled.
Also, it seems to be written for 1.7 (but I was told here that 1.8 & 1.7 instructions are the same)

For example, I'm pretty sure I have to add quite some directories for the <includes> to work (as in tier0 and whatnot),..but I'm still unable to compile.

For some reason whichever Sourcehook.h 's parent folder I add to the included dirs list, it won't compile...

Can someone please help me trough the steps that are required to compile the sample_mm?

Thanks a lot!

PS: I'm using VS2008
__________________
Carolus is offline
Carolus
Member
Join Date: Jun 2010
Old 07-15-2010 , 13:07   Re: How to compile on windows?
Reply With Quote #2

A good screenshot is worth a lot of words I guess,

here is my problem :

http://ns310806.ovh.net/mmproblem.png
__________________
Carolus is offline
Fyren
FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren
Join Date: Feb 2106
Old 07-16-2010 , 08:05   Re: How to compile on windows?
Reply With Quote #3

The Windows section of the wiki article explains what you do to set up paths.
Fyren is offline
Carolus
Member
Join Date: Jun 2010
Old 07-21-2010 , 08:13   Re: How to compile on windows?
Reply With Quote #4

I finally found out what is missing in that article.

You have to go to

Project > sample_mm properties > Configuration Properties > C/C++ Properties

There you can see the "additional include dirs" which is where the environment variables are used.

It is important to know this configuration depends on what solution configuration you have VS set. (the dropdown right to the green 'Play' button)

By default it's set to work for Dark Messiah..Change that and the environment variables names will have changed as well, so make sure it all matches.
__________________
Carolus is offline
Keeper
Senior Member
Join Date: Nov 2006
Old 09-23-2010 , 19:28   Re: How to compile on windows?
Reply With Quote #5

I am trying to compile SourceMM admittedly for the first time. I have fixed errors I have found, but I wanted to see why I had the errors in the first place ( for future updates in the SVN ).

Quote:
fatal error C1083: Cannot open include file: 'metamod_version.h': No such file or directory
It's not in the include directory search path. It's in the "smm_main\public" directory.

The linker also crashes when I compile due to the resource.rc file. And I get this error when I edit the resource:

Quote:
error RC2104 : undefined keyword or key name: BINARY_NAME
The preprocessor is there
Code:
BINARY_NAME=\"$(TargetFileName)\"
If I replace the BINARY_NAME definition with any string it compiles fine.

This second one doesn't make sense to me ... it should work. I wanted to make sure about the first one.

EDIT: Ok this second one only happens on the debug build. This is due to incremental linking. So I'll continue to work around this for debugging purposes by excluding the .rc file from being used in the debug configs.

Last edited by Keeper; 09-23-2010 at 22:31.
Keeper is offline
ToXedVirus
Member
Join Date: Mar 2007
Old 09-26-2010 , 21:28   Re: How to compile on windows?
Reply With Quote #6

Quote:
Originally Posted by Keeper View Post
fatal error C1083: Cannot open include file: 'metamod_version.h': No such file or directory.
I guess the metamod_version.h file is generated by AMBuild, but there is actually NO REFERENCE AT ALL ON HOW TO USE IT.
ToXedVirus is offline
Keeper
Senior Member
Join Date: Nov 2006
Old 09-26-2010 , 22:07   Re: How to compile on windows?
Reply With Quote #7

that one was easy, I just created a link in both core and core_legacy directories to the file in the /public directory.

Turns out the incremental building is just an issue on 2008. On 2010, it works just fine. Go figure.

Ah well, moving on
Keeper is offline
ToXedVirus
Member
Join Date: Mar 2007
Old 09-26-2010 , 22:20   Re: How to compile on windows?
Reply With Quote #8

Quote:
Originally Posted by Keeper View Post
that one was easy, I just created a link in both core and core_legacy directories to the file in the /public directory.

Turns out the incremental building is just an issue on 2008. On 2010, it works just fine. Go figure.

Ah well, moving on
Linux and Makefiles over here
ToXedVirus is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 13:52.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode