oradzhabov/FakeFace

Trying to compile VirtualCamManager

obstriker opened this issue · 9 comments

Hi,
I'm trying to compile the code and face this issue and I'm not sure how to deal with it .

got an error 2

What did I miss ? (I linked dlib , opencv and boost and they work )

Hi.
It seems that you did not compile(or link correctly) "strmbase"-project before building the VirtualCamDevice.
Ensure that project "strmbase" were compiled successfully before.
Although, I was sure that project's dependencies had to compile it automatically.

I've just recompiled VirtualCamDevice(with dependencies) on MSVC.2015.x64 Release/Debug without errors.

Hey ,
Thank you for you reply and your help , I was able to compile a few libraries from 'third' folder which help me solve those errors but then I face this error with both 'VirtualCamManager' and 'VirtualCamDevice'

got an error 2

I tuned all projects to be x64 on release
libraries were (opencv 3.1 , dlib 18.18 , boost 1.55)

Hi.
Please check property Linker=>Advenced=>Taget Machine to value MachineX64 for all projects in solution. Although I'm sure that CMake dealed with it automatically.
Actually, whole solution could be rebuilded by one click without any struggles.

I would suggest to check dlib, OpenCV and boost which you installed/built - did they correspond to the x64 platform and yours MSVC version.

Okay I tried to cmake the project with coresponding libraries but it seems like cmake cannot find boost libraries .
What am I doing wrong? ( I searched online for this but nothing helps )
error

(I compiled boost as the instructions guided and also if I include ref in Visual Studio boost works)

Hello.
I've cloned repository to temp folder and trying to recreate the project from the scratch.
You where right - boost do not connected to solution automatically.

To solve issue I followed next steps in cmake:

  1. Find entity BOOST_INCLUDEDIR in cmake and set it to folder where Include folder from boost installed folder
    Now I set it to "E:/SDK/boost/boost_1_65_1"
  2. Click Configure in cmake. It will provide error like yours or similar "No Boost libraries were found. You may need to set BOOST_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT to the location of Boost."
  3. Click "Add Entity" in cmake and add name "BOOST_LIBRARYDIR" with value - path where lib/dll files of boost for you MSVC.
    Now I set it to "E:/SDK/boost/boost_1_65_1/lib64-msvc-14.0"
  4. Click Configure in cmake. Now it finished with success and you click Generate.
  5. Release were rebuild successfully.

Thank you very much for your help. Most likely when I were working on this project, my environment was different and OS bypassed this issue.

Okay , first of all thanks a lot for your time consuming it really helps me , thank you.
I found that compiling boost on windows from source library is not easy ( with cmake configuration and etc..) and I didnt find lib64-msvc-14.0 folder so I downloaded a windows msi installer of boost and it solved the issues.

I was able to configure and generate but generate gave me those warnings:

WARNING: Target "VirtualCamManager" requests linking to directory "C:/Users/user/Desktop/dlib-18.18/dlib/build/install/lib". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "VirtualCamManager" requests linking to directory "C:/Users/user/Desktop/dlib-18.18/dlib/build/install/lib". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "VirtualCamManager" requests linking to directory "C:/Users/user/Desktop/dlib-18.18/dlib/build/install/lib". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "VirtualCamManager" requests linking to directory "C:/Users/user/Desktop/dlib-18.18/dlib/build/install/lib". Targets may link only to libraries. CMake is dropping the item.

cmake output:
Selecting Windows SDK version 10.0.16299.0 to target Windows 10.0.10586.
dlib information:
Using dlib-18.18.0
dlib_INCLUDE_DIRS: C:/Users/user/Desktop/dlib-18.18/include
dlib_LIBRARIES: C:/Users/user/Desktop/dlib-18.18/dlib/build/install/lib;ws2_32;winmm;comctl32;gdi32;imm32
OpenCV information:
OpenCV_INCLUDE_DIRS: C:/Users/user/Downloads/opencv/build/include;C:/Users/user/Downloads/opencv/build/include/opencv
OpenCV_LIBRARIES: opencv_core;opencv_photo;opencv_video;opencv_objdetect;opencv_calib3d;opencv_features2d;opencv_flann;opencv_highgui;opencv_imgproc;opencv_imgcodecs
OpenCV_LIBRARY_DIRS:
Boost version: 1.61.0
Found the following Boost libraries:
filesystem
system
Boost information:
Boost_INCLUDE_DIRS: C:/local/boost_1_61_0
Boost_LIBRARIES: optimized;C:/local/boost_1_61_0/lib64-msvc-14.0/boost_filesystem-vc140-mt-1_61.lib;debug;C:/local/boost_1_61_0/lib64-msvc-14.0/boost_filesystem-vc140-mt-gd-1_61.lib;optimized;C:/local/boost_1_61_0/lib64-msvc-14.0/boost_system-vc140-mt-1_61.lib;debug;C:/local/boost_1_61_0/lib64-msvc-14.0/boost_system-vc140-mt-gd-1_61.lib
Boost_LIBRARY_DIRS: C:/local/boost_1_61_0/lib64-msvc-14.0
Configuring done
WARNING: Target "VirtualCamManager" requests linking to directory "C:/Users/user/Desktop/dlib-18.18/dlib/build/install/lib". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "VirtualCamManager" requests linking to directory "C:/Users/user/Desktop/dlib-18.18/dlib/build/install/lib". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "VirtualCamManager" requests linking to directory "C:/Users/user/Desktop/dlib-18.18/dlib/build/install/lib". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "VirtualCamManager" requests linking to directory "C:/Users/user/Desktop/dlib-18.18/dlib/build/install/lib". Targets may link only to libraries. CMake is dropping the item.
Generating done

Then I clicked "Open Project" and tried to compile the project , I compiled all of them but the "VirtualCamManager" , the errors were:

error

Guess you missed some in building steps.
Please check carefully all points from Readme.md with attention to boost connection.

Hi , I followed your readme instructions very tightly plus I tried 3 different pcs and changed to different versions of libraries (I thought maybe it's the root of the issue) and it didn't work out / solved the issue.

1 question about the readme is how do you have msvc2010 folder in the dlib (I compiled it with cmake and I have different folders and nothing like msvc).
(from D:/DLIB/dlib-18.18/build/msvc2010.x32/install/lib/cmake/dlib).

other than this I don't know what could cause this problem..

Hi. msvc2010.x32 was subfolder where I've placed the build. Name of folder help me to find specific build if it necessary. Neighbor folder could have name for example "msvc.2015.x64" or "gcc.x64"