davisking / dlib

A toolkit for making real world machine learning and data analysis applications in C++
http://dlib.net
Boost Software License 1.0
13.58k stars 3.38k forks source link

unable to build dnn_mmod_train_find_cars_ex.cpp #1206

Closed jangstar closed 6 years ago

jangstar commented 6 years ago

Current Behavior

I creaed my own .xml files for both training and testing sets in order to use the example of mmod_train_find cars_ex.cpp. However,it gave me some of lnk2005 errors.

these are

LNK2005 "bool __cdecl dlib::cuda::can_access_peer(class dlib::tensor const &, class dlib::tensor const &)" (?can_access_peer@cuda@dlib@@YA_NAEBVtensor@2@0@Z) already defined in dlib_19.1.lib(dlib_generated_cuda_dlib.cu.obj) LNK2005 "void cdel dlib::cuda::device_synchronize(int)" (?device_synchronize@cuda@dlib@@YAXH@Z)already defined in dlib_19.1.lib(dlib_generated_cuda_dlib.cu.obj) LNK2005 "int cdel dlib::cuda::get_device(void)" (?get_device@cuda@dlib@@YAHXZ) already defined in dlib_19.1.lib(dlib_generated_cuda_dlib.cu.obj) NLK2005 "void __cdel dlib::cuda::set_device(int)" (?set_device@cuda@dlib@@YAXH@Z) already defined in dlib_19.1.lib(dlib_generated_cuda_dlib.cu.obj) LNK1169 one or more multiply defined symbols found

I used cmake and type the exact commands in the "dlib.net/compile.html" instruction. only mmod_traind_findcars_example is not working. other cpp examples such as find cars, face detection are working.

Steps to Reproduce

davisking commented 6 years ago

Use the new version of dlib and fill out the issue template (and read it's instructions in their entirety).

frodyan commented 5 years ago

I have same problem. I use newest version of Dlib (19.16), CUDA 10, cudnn 7.4.1.5. Platform: win64, visual studio 15, dlib was building with cmake (with cuda support).

davisking commented 5 years ago

Fill out the issue template