Open Mrucznik opened 5 years ago
Change to
#include <YSI-Data\y_iterate>
Then I get cannot read from file: "YSI-Data\y_iterate"
.
It's weird. I got working on Windows, but not trying yet in Linux.
EDIT: I'm building on container Ubuntu i386 and it's working.
I created repository in which I reproduced this error: https://github.com/Mrucznik/samp-ysi-bug https://travis-ci.com/Mrucznik/samp-ysi-bug
When I replace compiler flag -Z- to -Z+ it compiling without errors. But I need -Z-
"pawn-lang/YSI-Includes@4.x"
So you're using YSI 4... But if I recall correctly the new include method wasn't enforced until YSI 5. You probably just need to change YSI_Data
to YSI
. I'm not positive and I'd check but I'm at work on my phone.
4.x had those paths, they've actually been there a long time. It was only 5.x that started enforcing it. But if you fixed it already, great.
@Mrucznik
Hey, sorry for pinging. But could you solve the problem? I need -Z-
too.
You can't use the old includes on Linux without compatibility mode. They were written before there was a Linux compiler, so were never designed to work on Linux. -Z+
will enable some settings to make Linux behave more like Windows - why exactly do you need -Z-
?
You can't use the old includes on Linux without compatibility mode. They were written before there was a Linux compiler, so were never designed to work on Linux.
-Z+
will enable some settings to make Linux behave more like Windows - why exactly do you need-Z-
?
I may be somewhat beginner to PAWN, but I had some issues with y_hooks and file includes (like only first file in the directory is included and not the rest) - I could not understand why though. But later on, I had checked the compiler page and If I understood correctly the docs page of the compiler, when the -Z+
flag is passed, the compiler creates include guard for each file. Since I had files with the same name but in different directories, -Z-
appeared as magical solution to all my problems and they were gone suddenly. But I see the point. Thanks for the explanation. Guess I will mess with file namings and such in my project as alternative solution.
I get this error only when I build on linux (Ubuntu 16.04.6 LTS amd64) using Travis CI. On windows everything is ok.
Error:
test.pwn:2 (fatal) cannot read from file: "YSI_Data\y_iterate"
Code:
For compiling I use sampctl and my pawn.json looks like this: