Raised This Month: $12 Target: $400
 3% 

Compiling SM Extension Error


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
gamemann
Veteran Member
Join Date: Sep 2009
Location: Mullica Hill, New Jersey
Old 09-22-2015 , 16:33   Compiling SM Extension Error
Reply With Quote #1

Hello everybody, I just started learning how to compile SM extensions. However, I have ran into an issue that I cannot resolve.
Error:
"1>c1xx : fatal error C1083: Cannot open source file: '..\..\smsdk_ext.cpp': No such file or directory"
Error with details: http://pastebin.com/qvBdA8pM

I've made an Environmental Variable.


I've also added the additional include directories:


However, this error still occurs. I am sure it is something I am doing wrong but I cannot figure this out (I started from scratch four times now). I believe it is looking for the ../../smsdk_ext.cpp instead of the $(SOURCEMOD1\public\smsdk_ext.cpp. However, I may be wrong. This only happens when I try to create the extension out of the smsdk/public folder (e.g. sourcemod/extensions/sample instead of sourcemod/sdk/sourcemod/public/sample).

Any help would be highly appreciated. I am using Visual Studio 2012.

Thanks.
__________________
Software/network engineer. I often work on a neat project called The Modding Community.

Check out my GitHub here!
gamemann is offline
Send a message via Skype™ to gamemann
Miu
Veteran Member
Join Date: Nov 2013
Old 09-22-2015 , 20:23   Re: Compiling SM Extension Error
Reply With Quote #2

Quote:
Originally Posted by gamemann View Post
I believe it is looking for the ../../smsdk_ext.cpp instead of the $(SOURCEMOD1\public\smsdk_ext.cpp. However, I may be wrong.
Have you tried that one instead?
Miu is offline
psychonic

BAFFLED
Join Date: May 2008
Old 09-22-2015 , 22:26   Re: Compiling SM Extension Error
Reply With Quote #3

The msvc projects for the sample extension should have been deleted from the repository as they are outdated and unsupported.

The included ambuild files should be used instead for compiling (which can also generate msvc proj files for editing, if wanted). Additionally, you probably want to be compiling against stable SM (the 1.7-dev branch at time of writing), unless you want to be running unstable SM on the server on which you wish to run the extension.
psychonic is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 09-23-2015 , 09:09   Re: Compiling SM Extension Error
Reply With Quote #4

Having said that, SourceMod 1.8's sample extension now includes the AMBuild files for a project that should work on previous SourceMod versions as well. The files for this are configure.py, AMBuildScript, AMBuilder, and PackageScript.

For a simple project, you should only have to modify AMBuilder and PackageScript.
__________________
Not currently working on SourceMod plugin development.
Powerlord is offline
gamemann
Veteran Member
Join Date: Sep 2009
Location: Mullica Hill, New Jersey
Old 09-24-2015 , 15:24   Re: Compiling SM Extension Error
Reply With Quote #5

Thank you for the replies! I've replaced my SMSDK folder with the SourceMod 1.7-dev branch. I am also learning how to use AMBuild, etc.

Thanks.
__________________
Software/network engineer. I often work on a neat project called The Modding Community.

Check out my GitHub here!
gamemann is offline
Send a message via Skype™ to gamemann
psychonic

BAFFLED
Join Date: May 2008
Old 09-24-2015 , 16:23   Re: Compiling SM Extension Error
Reply With Quote #6

For simple compiling instructions with the sample extension AMBuild files, as well as an example of them being used with just the minimal edits required, you can take a look at https://github.com/psychonic/dodhooks
psychonic is offline
Spirit_12
Veteran Member
Join Date: Dec 2012
Location: Toronto, CA
Old 09-24-2015 , 18:48   Re: Compiling SM Extension Error
Reply With Quote #7

Is there any advantage to compiling with Ambuild over the Makefile method? Also, if I followed your instructions, then with Ambuild we don't have to include directories manually?
__________________
Spirit_12 is offline
WildCard65
Veteran Member
Join Date: Aug 2013
Location: Canada
Old 09-24-2015 , 19:19   Re: Compiling SM Extension Error
Reply With Quote #8

From what I read, AMBuild is suppose to be faster then the Makefiles
__________________
WildCard65 is offline
Spirit_12
Veteran Member
Join Date: Dec 2012
Location: Toronto, CA
Old 09-24-2015 , 19:58   Re: Compiling SM Extension Error
Reply With Quote #9

Quote:
Originally Posted by WildCard65 View Post
From what I read, AMBuild is suppose to be faster then the Makefiles
That is just the compiling part. I'm asking, is there any other advantage beside faster compiling.
__________________
Spirit_12 is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 09-25-2015 , 09:40   Re: Compiling SM Extension Error
Reply With Quote #10

Quote:
Originally Posted by Spirit_12 View Post
That is just the compiling part. I'm asking, is there any other advantage beside faster compiling.
It's cross-platform and has a lot of the quirks with various C++ compilers already addressed. It can also create a distribution directory and copy files all to their appropriate places in it.
__________________
Not currently working on SourceMod plugin development.
Powerlord is offline
Reply


Thread Tools
Display Modes

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 07:41.


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