Page 1 of 1

Import and Import C accept var for path to lib

Posted: Mon Jun 01, 2015 10:32 pm
by IdeasVacuum
It seems utterly daft that Import and Import C only accept a literal path to a lib, given that the lib could be in different places on different machines or OS versions etc.

Re: Import and Import C accept var for path to lib

Posted: Mon Jun 01, 2015 11:29 pm
by skywalk
Variables are unknown at Import time.
You can use #MyLib$ = "somelib.lib" and CompilerIf's.

Re: Import and Import C accept var for path to lib

Posted: Wed Jun 03, 2015 10:21 am
by IdeasVacuum
Variables are unknown at Import time.
So that is the problem to be solved.

Re: Import and Import C accept var for path to lib

Posted: Wed Jun 03, 2015 6:04 pm
by freak
The imported libraries are combined into the final executable when you compile. Variables only have a value once the program is running. That is why only constant expressions are allowed.

It is like asking for variables to be allowed in IncludeFile statements.

[FIXED] Re: Import and Import C accept var for path to lib

Posted: Wed Jun 03, 2015 10:58 pm
by IdeasVacuum
That makes sense :)