pawn-lang / compiler

Pawn compiler for SA-MP with bug fixes and new features - runs on Windows, Linux, macOS
Other
301 stars 71 forks source link

default include path for standard libraries? #722

Open RodrigoDornelles opened 1 year ago

RodrigoDornelles commented 1 year ago

I'm building a development container on linux, with some samp tools (without sampctl), where everything is pre-installed, I'm wondering if there is a default includes folder. (like /usr/local/include or /usr/ local/include/pawno)

so you don't need to use the -i flag for samp and pawn standard includes.

if this feature does not exist, it would be interesting, so GCC compilers.

eg

use

$ pawncc gamemodes/bare.pwn

instead

$ pawncc -i/usr/loca/include gamemodes/bare.pwn
Zeex commented 1 year ago

Have you tried putting your includes in a include subdirectory inside the directory where pawncc is? It might just work. Another approach: put pawncc in bin and all the includes in include at the same directory level.

https://github.com/pawn-lang/compiler/blob/master/source/compiler/sc1.c#L1434