I am upgrading an old project from dlib version 18.18. At that time dlib was a header-only library, so I only needed to add dlib to my include path and I was all set. My project is built using visual studio (originally 2015, now 2019).
Newer dlib versions require compiling dlib. I got things to work with version 19.19 by adding all/source.cpp to my visual studio project and making some modifications to get around errors (adding /bigobj to the compile options and dealing with precompiled headers). However my resulting DLL grows from 2 MB to 10 MB in size.
The only thing I am using from dlib is the bobyqa optimization function, which appears to still be a header only implementation. Is there any way continue to use dlib as a header -only library?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Dlib is still just as header only as it always has been. However, I added
that dlib/test_for_odr_violations.h file because I constantly get questions
from people who were doing silly things with their builds, getting errors
that have nothing to do with dlib, and asking me about it. If you blank
out the contents of dlib/test_for_odr_violations.h it will all be header
only again.
I am upgrading an old project from dlib version 18.18. At that time dlib was a header-only library, so I only needed to add dlib to my include path and I was all set. My project is built using visual studio (originally 2015, now 2019).
Newer dlib versions require compiling dlib. I got things to work with version 19.19 by adding all/source.cpp to my visual studio project and making some modifications to get around errors (adding /bigobj to the compile options and dealing with precompiled headers). However my resulting DLL grows from 2 MB to 10 MB in size.
The only thing I am using from dlib is the bobyqa optimization function, which appears to still be a header only implementation. Is there any way continue to use dlib as a header -only library?
Well, I shouldn't say "all". Dlib has never been all header only. But it
should work like you expect.
Dlib is still just as header only as it always has been. However, I added
that dlib/test_for_odr_violations.h file because I constantly get questions
from people who were doing silly things with their builds, getting errors
that have nothing to do with dlib, and asking me about it. If you blank
out the contents of dlib/test_for_odr_violations.h it will all be header
only again.
That works. Thanks!