AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Coding MM:S Plugins & SM Extensions (https://forums.alliedmods.net/forumdisplay.php?f=75)
-   -   Compiling SM Extension Error (https://forums.alliedmods.net/showthread.php?t=272027)

gamemann 09-22-2015 16:33

Compiling SM Extension Error
 
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.
http://gflclan.com/gamemann/sharex/2...2_16-26-14.png

I've also added the additional include directories:
http://gflclan.com/gamemann/sharex/2...2_16-27-09.png

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 $(SOURCEMOD18)\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.

Miu 09-22-2015 20:23

Re: Compiling SM Extension Error
 
Quote:

Originally Posted by gamemann (Post 2345942)
I believe it is looking for the ../../smsdk_ext.cpp instead of the $(SOURCEMOD18)\public\smsdk_ext.cpp. However, I may be wrong.

Have you tried that one instead?

psychonic 09-22-2015 22:26

Re: Compiling SM Extension Error
 
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.

Powerlord 09-23-2015 09:09

Re: Compiling SM Extension Error
 
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.

gamemann 09-24-2015 15:24

Re: Compiling SM Extension Error
 
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.

psychonic 09-24-2015 16:23

Re: Compiling SM Extension Error
 
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

Spirit_12 09-24-2015 18:48

Re: Compiling SM Extension Error
 
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?

WildCard65 09-24-2015 19:19

Re: Compiling SM Extension Error
 
From what I read, AMBuild is suppose to be faster then the Makefiles

Spirit_12 09-24-2015 19:58

Re: Compiling SM Extension Error
 
Quote:

Originally Posted by WildCard65 (Post 2346626)
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.

Powerlord 09-25-2015 09:40

Re: Compiling SM Extension Error
 
Quote:

Originally Posted by Spirit_12 (Post 2346631)
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.


All times are GMT -4. The time now is 01:41.

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