schwittlick / ofxDarknet

darknet neural network addon for openFrameworks
MIT License
496 stars 89 forks source link

build errors on windows #12

Closed jkruseAUT closed 7 years ago

jkruseAUT commented 7 years ago

Unfortunately, I am running into trouble:

C1083 cannot open include file: 'ofxOpenCv.h': No such file or directory

win10 x64, VS2015 (Community), ofxDarknet added via project generator and followed this: https://github.com/mrzl/ofxDarknet#setup

I have also tried to add ofxDarknet + ofxOpenCv to a new project and still get errors.

schwittlick commented 7 years ago

That seems exactly like my own setup and indeed ofxDarknet depends on ofxOpenCv, so you always have to add that in the project generator, too.

What kind of errors are you getting when you have ofxOpenCv included as well? Different errors?

jkruseAUT commented 7 years ago

So, added ofxOpenCv as well - which removes most errors (of course), but leaves me with two linker issues:

LNK2005 gpu_index already defined in cuda.obj LNK1169 one or more multiply defined symbols found

I should add, that since I've switched from CodeBlocks, some issues still throw me off track... probably a minor thing I should know about the C++ Linker in VS2015...

and lastly - a BIG THANKS for the quick response. I really appreciate this! (und beste Gruesse von Auckland nach Berlin!)

jkruseAUT commented 7 years ago

Any suggestion where to start addressing this issue?

schwittlick commented 7 years ago

I think I remember this problem..

First, can you make sure you pull the newest version from this repository. After that, try to build it again and if you're running in the same problem, try to uncomment this line in the code you're compiling: https://github.com/mrzl/ofxDarknet/blob/master/src/ofxDarknet.cpp#L13 Please let me know if this is fixing it, we're sometimes experiencing some inconsistencies when trying to prepare this library for osx and windows at the same time..

Thanks as well, please let me know if this solves it..

jkruseAUT commented 7 years ago

Yay! That worked for me, thank you so much.