static link 3rd party library, only VC++ works but not UE4

Hi,

I’m helping a team of researchers set up a VR Lab. They have some equipment that uses the parallel port to receive triggers. They would like to use the equipment in VR/UE4. Parallel ports aren’t common nowadays but there is a library that can be used for this purpose. I made a simple program to verify that it works.

Using A new, community-hosted Unreal Engine Wiki - Announcements - Unreal Engine Forums I first tried to make a plugin, where a Blueprint library class would write to the parallel port. The plugin compiles and links but when a Project using the plugin is loaded, it stops at ~70% with an error message like “Unable to load module …”. If I check the log I get:

[2017.02.14-10.31.15:398][ 0]LogModuleManager:Warning: ModuleManager: Unable to load module ‘C:/UnrealProjects/VRSwap/Plugins/ParallelPort/Binaries/Win64/UE4Editor-ParallelPort.dll’ because the file couldn’t be loaded by the OS.

I figured I had done something wrong with the plugin since I have never made one before. I tried to make a simple project with an actor class to interface with the parallel port, but I ended up with pretty much the same thing:

[2017.02.14-14.14.29:862][ 0]LogModuleManager:Warning: ModuleManager: Unable to load module ‘C:/UnrealProjects/basicProj/Binaries/Win64/UE4Editor-basicProj-157.dll’ because the file couldn’t be loaded by the OS.

Is there some verbose flag I could set to see what is wrong? The simple(non-UE4) program above is running and thus VStudio/“Visual C++” can statically link the library. I recompiled the library(it’s pretty old, 200x-ish) myself to see if it would change anything but there is no difference.

Any idea what I can do to get the library working in UE4?

UE4 simple project if anybody would be so kind and have a look

Cheers,

Daniel

EDIT: See comment below. I have an import library and not a static library, if that makes any difference.

So I just figured out that I have an import library and not a static library. Why the bleep do they have the same extension? Argh… I am more used to developing on Linux. :wink:

Why did my sample project(non-UE4) work when I added the import library to the linker and not an actual static library? Are they similar but I still need the dll somewhere and I don’t have to do LoadLibrary etc?

I tried adding the library dll to the projects binary folder but that doesn’t seem to work.

What do I need to do? Is this more what I should do?

I would be pretty interested in this too, as i am a researcher trying to connect UE4/VR and GSR/HRV, and the trigger signal would be very helpful. Could you solve the problem? And maybe have some kind of plugin? I stumbled across some C++ Code (GitHub - dgromer/ue4-misc: Miscellaneous stuff for Unreal Engine 4) but i was not able to get it running.