1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-07-06 01:10:23 +00:00

Fix to look for header libs relative to the $INCLUDE file

This commit is contained in:
Samuel Gomes 2023-03-24 06:13:21 +05:30
parent 5bd3192491
commit 2b6b04e36c
2 changed files with 11 additions and 3 deletions

View file

@ -4472,7 +4472,11 @@ DO
GOTO GotHeader
END IF
' a740g: Fallback to source path
libpath$ = FixDirectoryName(idepath$) + og_libpath$
IF inclevel > 0 THEN
libpath$ = getfilepath(incname(inclevel)) + og_libpath$
ELSE
libpath$ = FixDirectoryName(idepath$) + og_libpath$
END IF
libpath_inline$ = GetEscapedPath(libpath$)
IF _FILEEXISTS(libpath$ + x$ + ".h") THEN
headername$ = libpath_inline$ + x$ + ".h"
@ -4539,7 +4543,11 @@ DO
GOTO GotHeader
END IF
' a740g: Fallback to source path
libpath$ = FixDirectoryName(idepath$) + og_libpath$
IF inclevel > 0 THEN
libpath$ = getfilepath(incname(inclevel)) + og_libpath$
ELSE
libpath$ = FixDirectoryName(idepath$) + og_libpath$
END IF
libpath_inline$ = GetEscapedPath(libpath$)
IF _FILEEXISTS(libpath$ + x$ + ".h") THEN
headername$ = libpath_inline$ + x$ + ".h"

View file

@ -113,7 +113,7 @@ FUNCTION GetEscapedPath$ (path_name AS STRING)
GetEscapedPath = buf
END FUNCTION
' Adds a trailing \ or / if to the name if needed
' Adds a trailing \ or / to a directory name if needed
FUNCTION FixDirectoryName$ (dir_name AS STRING)
IF LEN(dir_name) > 0 AND RIGHT$(dir_name, 1) <> pathsep$ THEN
FixDirectoryName = dir_name + pathsep$