Dynamic ".lib" and ".dll" files apart from source

Everything else that doesn't fall into one of the other PB categories.
LiK137
Enthusiast
Enthusiast
Posts: 282
Joined: Wed Jun 23, 2010 5:13 pm

Dynamic ".lib" and ".dll" files apart from source

Post by LiK137 »

Hi,
Source imports functions from ".lib" file which linked to ".dll"
if in compiler options "Current Directory" defined to path where library files located then program is compiled and run OK.
But what if source is using different libraries from different locations. Is there any option to set current directory in the source before importing functions?
User avatar
Bisonte
Addict
Addict
Posts: 1233
Joined: Tue Oct 09, 2007 2:15 am

Re: Dynamic ".lib" and ".dll" files apart from source

Post by Bisonte »

LiK137 wrote:... Is there any option to set current directory in the source before importing functions?...
As one word ;)
PureBasic 6.10 LTS (Windows x86/x64) | Windows10 Pro x64 | Asus TUF X570 Gaming Plus | R9 5900X | 64GB RAM | GeForce RTX 3080 TI iChill X4 | HAF XF Evo | build by vannicom​​
English is not my native language... (I often use DeepL to translate my texts.)
LiK137
Enthusiast
Enthusiast
Posts: 282
Joined: Wed Jun 23, 2010 5:13 pm

Re: Dynamic ".lib" and ".dll" files apart from source

Post by LiK137 »

Bisonte,
thank You for reply.
You misunderstood me, as one word changes path for executable but I am talking about source, precompile directory.
Assume source file located in "/Project1/Source/Source1.pb" folder and libraries are "/Project1/Libs/Lib1.lib" and "/Project1/Libs/Lib1.dll"

Then:
import "../Libs/Lib1.lib" - throws "Lib1.dll" not found

I of course will use dll and prototype if no way with ".lib"
Post Reply