ceccocats / tkDNN

Deep neural network library and toolkit to do high performace inference on NVIDIA jetson platforms
GNU General Public License v2.0
717 stars 209 forks source link

Error on Windows Building #259

Open Hezhexi2002 opened 3 years ago

Hezhexi2002 commented 3 years ago

image I changed my CMaKeLists,txt into the master branch version and I replace the "unistd.h" with "windows.h" and now I met this new problem,I think the reson for that maybe my opencv path because I used my compiled opencv and opencv_contrib with cuda support and I edit in the CMaKeLists.txt and set the OpenCV_DIR into my own path and here is the cmake result: image It can find my opencv but does it can not find my opencv_contrib or something else which cause the problem?Hope you can help me?

Hezhexi2002 commented 3 years ago

CMakeLists.txt here is my CMaKeLists.txt

perseusdg commented 3 years ago

have you removed the comment from this line https://github.com/ceccocats/tkDNN/blob/a992c9feb5fb5c7a64da59f6c5a6f0c1c1a6cf2d/include/tkDNN/DetectionNN.h#L20 to use opencv contrib ?

Hezhexi2002 commented 3 years ago

have you removed the comment from this line https://github.com/ceccocats/tkDNN/blob/a992c9feb5fb5c7a64da59f6c5a6f0c1c1a6cf2d/include/tkDNN/DetectionNN.h#L20 to use opencv contrib ?

No,I haven't removed that before,I will remove that and build again,but now the error for me is the cmake can't detect my own eigen path correctly,Do you know how to solve that?

perseusdg commented 3 years ago

you can try passing in the eigen install directory using -DCMAKE_PREFIX_PATH=D;/opt/x64-windows (change the directory accordingly)

Hezhexi2002 commented 3 years ago

you can try passing in the eigen install directory using -DCMAKE_PREFIX_PATH=D;/opt/x64-windows (change the directory accordingly)

so this means I need to change the directory into my own eigen directory?

Hezhexi2002 commented 3 years ago

I trid and the eigen path is still wrong, CMakeLists.txt Could you please see the external statement I add at L50 and L55?And is there something wrong with my usage of the set command?

Hezhexi2002 commented 3 years ago

image this should be my own eigen directory,and here is my own compiled opencv and opencv_contrib directory image I search in the internet and found that cmake can detect packages through xxxConfig.cmake and I think that's the reason why it can't detect my own eigen because the statement I add in the CMaKeLists.txt to set the eigen and opencv is like this image and in the "D:\Program Files\lib\build\install" directory there is a OpenCVConfig.cmake but in the "D:\Program Files\lib\dep\EIGEN\install\include\eigen3\Eigen" directory there is not a Config.cmake,so maybe that's the reason for the error?

Hezhexi2002 commented 3 years ago

@perseusdg I'm very sorry that I can't reply you in time because I'm currently not at home.And I will try the method you suggest later,hope you can excuse me.