{"action":"created","issue":{"url":"https://api.github.com/repos/Zeex/pawn/issues/59","labels_url":"https://api.github.com/repos/Zeex/pawn/issues/59/labels{/name}","comments_url":"https://api.github.com/repos/Zeex/pawn/issues/59/comments","events_url":"https://api.github.com/repos/Zeex/pawn/issues/59/events","html_url":"https://github.com/Zeex/pawn/issues/59","id":70408386,"number":59,"title":"-i (path for include files) option for Linux compiler does not work","user":{"login":"ziggi","id":1020099,"avatar_url":"https://avatars.githubusercontent.com/u/1020099?v=3","gravatar_id":"","url":"https://api.github.com/users/ziggi","html_url":"https://github.com/ziggi","followers_url":"https://api.github.com/users/ziggi/followers","following_url":"https://api.github.com/users/ziggi/following{/other_user}","gists_url":"https://api.github.com/users/ziggi/gists{/gist_id}","starred_url":"https://api.github.com/users/ziggi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ziggi/subscriptions","organizations_url":"https://api.github.com/users/ziggi/orgs","repos_url":"https://api.github.com/users/ziggi/repos","events_url":"https://api.github.com/users/ziggi/events{/privacy}","received_events_url":"https://api.github.com/users/ziggi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-04-23T13:16:07Z","updated_at":"2015-04-23T15:11:58Z","closed_at":null,"body":"**-i** option on Windows works fine, but on Linux this ignored.\r\n\r\nI have this file struct:\r\n```\r\n.\r\n├── !compile.sh\r\n├── !compile.bat\r\n├── compiler\r\n│   ├── includes\r\n│   │   ├── a_http.inc\r\n│   │   ├── a_npc.inc\r\n│   │   ├── a_objects.inc\r\n│   │   ├── a_players.inc\r\n│   │   ├── a_sampdb.inc\r\n│   │   ├── a_samp.inc\r\n│   │   ├── a_vehicles.inc\r\n│   │   ├── core.inc\r\n│   │   ├── datagram.inc\r\n│   │   ├── file.inc\r\n│   │   ├── float.inc\r\n│   │   ├── string.inc\r\n│   │   └── time.inc\r\n│   ├── libpawnc.so\r\n│   ├── pawncc\r\n│   ├── pawncc.exe\r\n│   ├── pawncc.pdb\r\n│   ├── pawnc.dll\r\n│   └── pawnc.pdb\r\n├── gamemodes\r\n├── plugins\r\n├── scriptfiles\r\n└── sources\r\n    └── Open-GTO.pwn\r\n```\r\n\r\n!compile.sh:\r\n```bash\r\n#/bin/bash\r\n\r\nexport LD_LIBRARY_PATH=$(pwd)\"/compiler/:$LD_LIBRARY_PATH\"\r\n\r\nNAME=\"Open-GTO\"\r\n\r\n./compiler/pawncc \"-;+ -(+ -icompiler/includes\" sources/$NAME.pwn\r\n\r\nif [ $(stat -c%s \"$NAME.amx\") -gt 0 ];\r\nthen\r\n\tmv $NAME.amx gamemodes/\r\nelse\r\n\trm $NAME.amx\r\nfi\r\n```\r\n\r\n!compile.bat:\r\n```bat\r\nset name=Open-GTO\r\ncompiler\\pawncc.exe -;+ -(+ -icompiler/includes sources\\%name%.pwn\r\nif exist %name%.amx ^\r\nmove %name%.amx gamemodes\\\r\npause\r\n```\r\n\r\nOn Linux i get this error:\r\n```\r\ncompiler/includes/a_samp.inc(17) : fatal error 100: cannot read from file: \"core\"\r\n```\r\nOn Windows all works fine.\r\n\r\nCurrently i made this \"hack\":\r\nI changed it in **a_samp.inc**:\r\n```Pawn\r\n#include <core>\r\n#include <float>\r\n#include <string>\r\n#include <file>\r\n#include <time>\r\n#include <datagram>\r\n#include <a_players>\r\n#include <a_vehicles>\r\n#include <a_objects>\r\n#include <a_sampdb>\r\n```\r\non it:\r\n```Pawn\r\n#include \"compiler/includes/core\"\r\n#include \"compiler/includes/float\"\r\n#include \"compiler/includes/string\"\r\n#include \"compiler/includes/file\"\r\n#include \"compiler/includes/time\"\r\n#include \"compiler/includes/datagram\"\r\n#include \"compiler/includes/a_players\"\r\n#include \"compiler/includes/a_vehicles\"\r\n#include \"compiler/includes/a_objects\"\r\n#include \"compiler/includes/a_sampdb\"\r\n#include \"compiler/includes/a_http\"\r\n```"},"comment":{"url":"https://api.github.com/repos/Zeex/pawn/issues/comments/95620514","html_url":"https://github.com/Zeex/pawn/issues/59#issuecomment-95620514","issue_url":"https://api.github.com/repos/Zeex/pawn/issues/59","id":95620514,"user":{"login":"ziggi","id":1020099,"avatar_url":"https://avatars.githubusercontent.com/u/1020099?v=3","gravatar_id":"","url":"https://api.github.com/users/ziggi","html_url":"https://github.com/ziggi","followers_url":"https://api.github.com/users/ziggi/followers","following_url":"https://api.github.com/users/ziggi/following{/other_user}","gists_url":"https://api.github.com/users/ziggi/gists{/gist_id}","starred_url":"https://api.github.com/users/ziggi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ziggi/subscriptions","organizations_url":"https://api.github.com/users/ziggi/orgs","repos_url":"https://api.github.com/users/ziggi/repos","events_url":"https://api.github.com/users/ziggi/events{/privacy}","received_events_url":"https://api.github.com/users/ziggi/received_events","type":"User","site_admin":false},"created_at":"2015-04-23T15:11:58Z","updated_at":"2015-04-23T15:11:58Z","body":"> Are you compiling from the same directory where compile.sh is?\r\n\r\nYes.\r\n\r\n> Try replacing relative paths with absolute ones, that definitely should help. You can get the absolute path to compiler.sh from within the script itself via something like $(dirname $(readlink $0)) (for example, see here) and append your include directory to that.\r\n\r\nI tried it, but it did not help.\r\n\r\nI made small repo for test it: https://github.com/ziggi/pawn_linux_test\r\nMy new **!compile.sh**:\r\n```Pawn\r\n#/bin/bash\r\n\r\nexport LD_LIBRARY_PATH=$(pwd)\"/compiler/:$LD_LIBRARY_PATH\"\r\n\r\nNAME=\"test\"\r\n\r\ninclude_path=\"$(dirname $(readlink -f $NAME))/compiler/includes\"\r\n\r\n./compiler/pawncc \"-;+ -(+ -i$include_path\" sources/$NAME.pwn\r\n\r\nif [ $(stat -c%s \"$NAME.amx\") -gt 0 ];\r\nthen\r\n\tmv $NAME.amx gamemodes/\r\nelse\r\n\trm $NAME.amx\r\nfi\r\n```"}}