Error on Windows Building #259

Open
opened 2021-08-27 05:29:24 +02:00 by nowhereman1999 · 8 comments
nowhereman1999 commented 2021-08-27 05:29:24 +02:00 (Migrated from github.com)

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?

![image](https://user-images.githubusercontent.com/53631206/131066708-eb73726a-41ca-4075-a0ee-5f25342a7bb5.png) 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](https://user-images.githubusercontent.com/53631206/131067157-b1fc1e53-2c57-4253-b327-b0e2ff5d4cc0.png) 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?
nowhereman1999 commented 2021-08-27 05:30:02 +02:00 (Migrated from github.com)

CMakeLists.txt
here is my CMaKeLists.txt

[CMakeLists.txt](https://github.com/ceccocats/tkDNN/files/7063963/CMakeLists.txt) here is my CMaKeLists.txt
perseusdg commented 2021-08-28 09:18:35 +02:00 (Migrated from github.com)
have you removed the comment from this line https://github.com/ceccocats/tkDNN/blob/a992c9feb5fb5c7a64da59f6c5a6f0c1c1a6cf2d/include/tkDNN/DetectionNN.h#L20 to use opencv contrib ?
nowhereman1999 commented 2021-08-28 10:09:00 +02:00 (Migrated from github.com)

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?

> 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 2021-08-28 10:22:09 +02:00 (Migrated from github.com)

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

you can try passing in the eigen install directory using -DCMAKE_PREFIX_PATH=D;/opt/x64-windows (change the directory accordingly)
nowhereman1999 commented 2021-08-28 10:32:42 +02:00 (Migrated from github.com)

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?

> 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?
nowhereman1999 commented 2021-08-28 10:46:36 +02:00 (Migrated from github.com)

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?

I trid and the eigen path is still wrong, [CMakeLists.txt](https://github.com/ceccocats/tkDNN/files/7070407/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?
nowhereman1999 commented 2021-08-28 10:59:27 +02:00 (Migrated from github.com)

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?

![image](https://user-images.githubusercontent.com/53631206/131212171-5a04d9ef-2419-41e2-b100-d6136407dce0.png) this should be my own eigen directory,and here is my own compiled opencv and opencv_contrib directory ![image](https://user-images.githubusercontent.com/53631206/131212307-60118ef4-8af0-4639-8dfb-409d79b05919.png) 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](https://user-images.githubusercontent.com/53631206/131212435-19aeb558-4cab-43a9-96f1-6dc862c290c5.png) 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?
nowhereman1999 commented 2021-08-28 11:05:40 +02:00 (Migrated from github.com)

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

@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.
This repo is archived. You cannot comment on issues.
1 Participants
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mmr/tkDNN#259