Using third party {.dll .lib .h} in ProJucer


I have my third-party library: x.dll x.lib x.h

 I have copied them into my project tree, so I have Foo/sources/{my code} and Foo/X/{x.dll x.lib x.h}

In the ProJucer build pane, I put 'x.lib' into the 'external libraries to link' text box [*].

It builds but gives runtime error 'x.dll not found'.

Apparently I need to either have x.dll in my system path or in the same folder as my executable.

The latter would obviously be preferable, as it keeps everything together.

 But can I do this from ProJucer?


[*] I have to put an absolute path to make this work. Again this is ugly because it is not portable. What should the relative path be? I'm failing to guess it...


I'm still on Juce 3, but in the Introjucer I set up a Post-build command for my Visual Studio configuration. It runs a Python script that copies some DLLs into the build folder (along with a couple other things specific to my application).


hmm that feature doesn't seem to have made it across yet, at least as far as I can see.

For the time being I've just copied the .dll into my executable folder.

I was worried that the ProJucer would repopulate the Xcode build, and I would have to redo the copy each time I 'save and launch in IDE', but fortunately this is not the case!


PS I suppose it would be possible to package the .dll as a resource, and write some start-up code that copies it to the folder (that contains the executable) if it is not there already.