Search code examples
windowsvisual-c++darknet

How do I include DarkHelp inside my cmake project on Windows


Darkhelp works hand in hand with Darknet I have built Darkhelp using cmake on windows and have the build directory ready. I would like to statically link the .lib file to my own cmakelists.txt

I used find_library(DARKHELP NAMES darkhelp HINTS "libs/darkhelp/lib") and inside libs/darkhelp/lib there is darkhelp.lib abd darkhelp.dll I can build the application and it compiles just fine. However, when I run my application I get an error saying "The code execution cannot proceed because darknet.exe was not found. Reinstalling the program may fix this problem."

Any help will be appreciated


Solution

  • The DarkHelp project itself has a subfolder called example_project that shows exactly how you should include the DarkHelp library into another project.

    There is also the src-apps examples that might be useful. You definitely should not need darknet.exe to run an application that links against darknet and darkhelp. That would indicate something is wrong with your dependencies, or something broke during linking.

    What version of Darknet and DarkHelp are you using? You should be using Darknet v2.0-126 and DarkHelp 1.7.12. And importantly -- did you install the NSIS installation executables after you built them?

    Lastly: join the Darknet/YOLO discord if you haven't: https://discord.gg/zSq8rtW

    Disclaimer: I'm the author of DarkHelp, and I maintain Darknet.