Open Y-Less opened 2 years ago
I deleted a comment I posted earlier because I thought I made a mistake. This was not a mistake after all (shouldn't have looked at it after getting up at 4:15 am :stuck_out_tongue: ) Anyway...
Paths must use backslashes, right? YSI-Includes even forces this (Fatal error 111: user error: Did you use 'YSI/y_hooks' instead of 'YSI\y_hooks'?
).
On Windows backslashes work fine.
Currently running ArchLinux, backslashes do not work so fine.
I can't include my own source files using backslashes in path (err 100). YSI does get included but than nags about that forward slash.
However,
When compiling with -Z+
everything possible way works fine (mixing forward and backslashes for my own files, including YSI with either too). Didn't create a seperate issue since I didn't find it really an issue yet (since there's still -Z at the moment). Any idea on this and if not, could this be addressed before -Z is dropped?
In case more information is needed...
cmake ../source/compiler/ -DCMAKE_C_FLAGS=-m32 -DCMAKE_BUILD_TYPE=Release -Wno-dev && make -j7
)alias pawncc='pawncc -\;+ -\(+ -i/home/kevin/.pawncc/includes_samp/
cli usage pawncc kgm.pwn -Z+
Imagine the following files (relative to gamemodes):
./kgm-src/assembly.inc
./kgm-src/core.inc
./kgm.pwn
kgm.pwn
//Definitions, not relevant
#include "src/core.inc"
src/core.inc
//Definition checks, set options according to env, etc
//Not relevant even though some compiler options may be altered; issue persists without them)
#define KGM_ENV
#include "src/assembly.inc"
src/assembly.inc
(less imaginary, this is the file as-is (without header comment) (yes, I'm aware I didn't change to slashes back to backslashes yet)
#include <a_samp>
#undef MAX_PLAYERS
#define MAX_PLAYERS MAX_SLOTS
//#undef MAX_SLOTS
//samp, plugins (non YSI includes)
#include <a_mysql>
#include <crashdetect>
#include <filemanager>
#include <samp_bcrypt>
#include <sscanf2>
//YSI includes
#if KGM_ENV < ENV_DEBUG_EXTRA
#define YSI_NO_HEAP_MALLOC
#else
#define YSI_YES_HEAP_MALLOC
#endif
#include <YSI_Coding/y_hooks>
#include <YSI_Coding/y_inline>
#include <YSI_Coding/y_timers>
#include <YSI_Coding/y_va>
#include <YSI_Data/y_foreach>
#include <YSI_Players/y_android>
//#include <YSI_Players/y_languages>
//#include <YSI_Players/y_text>
#include <YSI_Visual/y_commands>
#include <YSI_Visual/y_dialog>
//KGM: Utilities
#include "kgm-src/util/colors.inc"
#include "kgm-src/util/debug/entry.inc"
//KGM: Base init
#include "kgm-src/run/init/early.inc"
#if !defined KGM_CORE
#error Don't compile the .inc files - Compile the .pwn file under (PROJECT_ROOT)/gamemodes/ instead!
#endif
Issue description:
-Z
was added to fix one single breaking change, namely that of_inc_
auto-generated include guards. However, the need for this is long past; includes have been updated and can deal without those guards. Now the flag just causes more confusion as people seem to think it reverts all non-breaking changes as well, which was never the intention, then get surprised when it doesn't.Minimal complete verifiable example (MCVE):
Workspace Information: