My notebook runs 64-bit Windows 10 (8 GB RAM), and already have VS2017 (with all the latest updates) installed. I'm trying to build the dlib examples, and after 8 hours it still stuck at compiling dnn_face_recognition_ex.cpp.
Steps to reproduce:
So far, these are the examples that are successfully compiled.

Wonder why compiling dnn_face_recognition_ex.cpp take so loooong. Antivirus was disabled before compilation started.
Visual Studio 2017 seems to be buggier than Visual Studio 2015. Other people have reported problems. I haven't even successfully installed it. I tried half a dozen times to install VC2017 but the installer crashed every time at some random point. One of the times it took part of windows with it and I needed to restore some files before my desktop functioned correctly.
In any case, this isn't a dlib bug. You should report this to the visual studio dev team and maybe they will fix it. As of right now my recommendation is to avoid visual studio 2017.
I did some more testing and through commenting code , I found out that the following line is causing the build to stuck forever .
anet_type net;
Here is the minimum code from the face recognition example which is not compiling
using namespace dlib;
using namespace std;
template class, int, typename> class block, int N, template
using residual = add_prev1
template class, int, typename> class block, int N, template
using residual_down = add_prev2
template
using block = BN
template
template
template
template
template
template
template
using anet_type = loss_metric
alevel1<
alevel2<
alevel3<
alevel4<
max_pool<3, 3, 2, 2, relu
;
int main()
{
anet_type net;
}
I think the problem is in loading the dnn module itself but when I was testing the dnn example in visual studio 2017 and it worked perfectly fine
Link : http://dlib.net/dnn_introduction_ex.cpp.html (Tested and working in VS2017)
I thought may be this information can help to solve this issue
We know. Sometimes VC2017 glitches out when working with the dnn code and sometimes it doesn't. No one has found a workaround yet.
Davis was right with the VS2017 glitch , I downloaded the newer version of Visual Studio 2017 Community(Version 15.5.2) and now it works like a charm without any issues what so ever . Just make sure you build the dlib library again with cmake and newer version of VS 2017 .
Yes, the very latest VS2017 now works.
I'm curious. The latest VS2017 (15.5) doesn't work with Cuda 9, so you have to run 15.4 or choose the v140 toolset in 15.5.
So how did you get all the required features (ie 15.5) to run dlib and get cuda working at the same time?
Visual Studio 2017 seems to be buggier than Visual Studio 2015. Other people have reported problems. I haven't even successfully installed it. I tried half a dozen times to install VC2017 but the installer crashed every time at some random point. One of the times it took part of windows with it and I needed to restore some files before my desktop functioned correctly.
In any case, this isn't a dlib bug. You should report this to the visual studio dev team and maybe they will fix it. As of right now my recommendation is to avoid visual studio 2017.
confirm, I meet same problem with VS 2017, install VS 2015 solve all problems
Most helpful comment
Visual Studio 2017 seems to be buggier than Visual Studio 2015. Other people have reported problems. I haven't even successfully installed it. I tried half a dozen times to install VC2017 but the installer crashed every time at some random point. One of the times it took part of windows with it and I needed to restore some files before my desktop functioned correctly.
In any case, this isn't a dlib bug. You should report this to the visual studio dev team and maybe they will fix it. As of right now my recommendation is to avoid visual studio 2017.