compiler icon indicating copy to clipboard operation
compiler copied to clipboard

Cannot include file from the same folder

Open Misiur opened this issue 6 years ago • 8 comments

Environment: Windows 10 -> WSL ubuntu (optional -> docker ubuntu)

https://github.com/Misiur/compiler-poc

Fails to compile due to not finding the correct include from relative path

Misiur avatar Apr 02 '20 07:04 Misiur

Try inc/poci. Unfortunately include paths are horrible in pawn.

Y-Less avatar Apr 02 '20 08:04 Y-Less

I'm fully aware of historical intricaties of include paths. Does that mean I can finally use YSI/y_foreach and such?

Misiur avatar Apr 02 '20 12:04 Misiur

I've tried very hard to make YSI work with both / and \ - basically by just internally trying about 6 different variations of possible include path. However, it isn't perfect. The compiler generally uses the OS native separator, so / on *nix and \ on Windows. WSL I'm guessing may use \ not /, while most people use Windows hence the instruction to use \ for them.

Y-Less avatar Apr 02 '20 12:04 Y-Less

YSI does not work with / on linux in WSL in docker: /app/pawno/include/YSI/y_iterate.inc(76) : fatal error 100: cannot read from file: "..\YSI_Data\y_iterate"

Misiur avatar Apr 02 '20 12:04 Misiur

But it also fails with \ when included from /: ugrp/includes.inc(16) : fatal error 100: cannot read from file: "YSI\y_iterate"

Misiur avatar Apr 02 '20 12:04 Misiur

how are you not getting any user defined error while trying to include from YSI directory? are you on 4.x? cause it's kinda different in 5.x

AmyrAhmady avatar Apr 02 '20 13:04 AmyrAhmady

Yes. I've documented this weird behaviour somewhat extensively, but it is a mess. However, I was just talking about your original problem in your PoC, not YSI (because you offered $5).

Also what @AmyrAhmady said.

Y-Less avatar Apr 02 '20 13:04 Y-Less

This issue has been automatically marked as stale because it has not had recent activity.

stale[bot] avatar Jul 01 '20 17:07 stale[bot]