Raised This Month: $32 Target: $400
 8% 

Omit optional include on compiling plugin.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Nerus
Senior Member
Join Date: Aug 2010
Location: Poland
Old 10-20-2018 , 07:36   Omit optional include on compiling plugin.
Reply With Quote #1

I don't understand how it's works, but I'm trying to omit include on compilation.

Code:
Line: 30 and 31


I guess there is no any optional include - if include not exist as a file, compilator will omit it.

Last edited by Nerus; 10-20-2018 at 13:59.
Nerus is offline
Maxximou5
AlliedModders Donor
Join Date: Feb 2013
Old 10-20-2018 , 16:16   Re: Omit optional include on compiling plugin.
Reply With Quote #2

As you've probably seen in your link, #undef REQUIRE_PLUGIN is so that if the include exists it will be included; otherwise, it will be omitted.
Maxximou5 is offline
Fyren
FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren
Join Date: Feb 2106
Old 10-20-2018 , 17:14   Re: Omit optional include on compiling plugin.
Reply With Quote #3

If you #include a file that doesn't exist, the compiler will error. Any other behavior is a bug. You can #tryinclude, but you'll still have to #ifdef off code because some stuff will not get defined if the include doesn't exist.

REQUIRE_PLUGIN is not magic in any way. It's just a define. It will not help you if you #include a file that doesn't exist.
Fyren 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 23:00.


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