tkDNN icon indicating copy to clipboard operation
tkDNN copied to clipboard

Error on Windows Building

Open Hezhexi2002 opened this issue 3 years ago • 8 comments

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 avatar Aug 27 '21 03:08 Hezhexi2002

CMakeLists.txt here is my CMaKeLists.txt

Hezhexi2002 avatar Aug 27 '21 03:08 Hezhexi2002

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

perseusdg avatar Aug 28 '21 07:08 perseusdg

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?

Hezhexi2002 avatar Aug 28 '21 08:08 Hezhexi2002

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

perseusdg avatar Aug 28 '21 08:08 perseusdg

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 avatar Aug 28 '21 08:08 Hezhexi2002

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 avatar Aug 28 '21 08:08 Hezhexi2002

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 avatar Aug 28 '21 08:08 Hezhexi2002

@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.

Hezhexi2002 avatar Aug 28 '21 09:08 Hezhexi2002