Closed NiklasRosenstein closed 6 years ago
I've somewhat given up on DLIB_ISO_CPP_ONLY as I'm not sure there is still a real use case for it. Do you need to use it? I'm likely to remove it in a future dlib release if important use cases don't surface.
I remember I needed it before -- with an older MSVC version if I remember correctly. I don't need it anymore.
Cool. I'm still going to sit on it a bit but I'll probably remove the feature altogether soonish.
I am currently using it (turning this "DLIB_ISO_CPP_ONLY" feature ON) during cmake compile to shaving down the size of .lib file. However, I am having the same error.
I forgot all about this issue :/
If you want to make things smaller it's probably easier to just go remove .cpp files from the CMakeLists.txt file. That's really all that flag does and there are almost certainly more you could remove.
Thanks for the feedback. That's what I was trying to do by turning on the flag "DLIB_ISO_CPP_ONLY". It supposes to turn off all these following functions based on CMakeLists.txt file in dlib folder. " sockets/sockets_kernel_1.cpp bsp/bsp.cpp dir_nav/dir_nav_kernel_1.cpp dir_nav/dir_nav_kernel_2.cpp dir_nav/dir_nav_extensions.cpp linker/linker_kernel_1.cpp logger/extra_logger_headers.cpp logger/logger_kernel_1.cpp logger/logger_config_file.cpp misc_api/misc_api_kernel_1.cpp misc_api/misc_api_kernel_2.cpp sockets/sockets_extensions.cpp sockets/sockets_kernel_2.cpp sockstreambuf/sockstreambuf.cpp sockstreambuf/sockstreambuf_unbuffered.cpp server/server_kernel.cpp server/server_iostream.cpp server/server_http.cpp threads/multithreaded_object_extension.cpp threads/threaded_object_extension.cpp threads/threads_kernel_1.cpp threads/threads_kernel_2.cpp threads/threads_kernel_shared.cpp threads/thread_pool_extension.cpp threads/async.cpp timer/timer.cpp stack_trace.cpp cuda/cpu_dlib.cpp cuda/tensor_tools.cpp " However, the build fails becuse of these follwoing lines in "threads_kernel_1.h"
Solved the problem just by commenting those lines.
Now I can build it. :)
If I don't do that "Project.sln" can't compile the .lib as it fails to compile "kalman_filter.cpp"
Expected Behavior
Compiling
all/source.cpp
withDLIB_ISO_CPP_ONLY
defined to compile and not result in the error "DLIB_ISO_CPP_ONLY is defined so you can't use this OS dependent code. [...]".Current Behavior
Steps to Reproduce
Possible Resolution
It appears the following includes in
all/source.cpp
should be inside theDLIB_ISO_CPP_ONLY
guard. Currently, they follow directly after the closing#endif // DLIB_ISO_CPP_ONLY
.