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: 1324
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.21 (Windows x64) | Windows 11 Pro | AsRock B850 Steel Legend Wifi | R7 9800x3D | 64GB RAM | RTX 5080 | ThermaltakeView 270 TG ARGB | build by vannicom​​
English is not my native language... (I often use DeepL.)
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