Re: [Dclib-devel] install DLIB in visual C++ express
Brought to you by:
davisking
|
From: Davis K. <da...@dl...> - 2011-01-10 23:53:03
|
To use dlib you can either create your own visual c++ project manually and then add the folder containing dlib to your compiler's include search path and also add dlib/all/source.cpp if necessary. Or you can use CMake. I prefer to use CMake but if you will only develop on windows then you might prefer to use manually created visual studio projects. 1. The CMake opion: To create a project with cmake first go to www.cmake.org and download the cmake installer for windows. Once installed you can go into the dlib/examples folder and do the following: create a subfolder named anything you like. I usually name it build. Then open a command prompt in the build folder. Then type "cmake .." This will create a visual studio project in your build folder. Using this project you can build all the example programs in the example folder. If you look in the examples/CMakeLists.txt file you can see how the CMake project file is setup. You can also look at the dlib/test/CMakeLists.txt file for another example. It's relatively straight forward and there is also documentation about CMake on the cmake webpage. 2. The make your own visual studio project option: Go to the menu and click: File->New->Project. Select win32, Then select win32 console application. Name your project something. Then click ok and next, uncheck precompiled header, click finish. Now you have an empty project that should build. Next you just need to do two things. First, add the dlib/all/source.cpp file to your project. Right click on Source files->Add->existing item. Find the dlib/all/source.cpp file and add it. Next, right click on your project and go to properties. Then Configuration Properties -> C/C++ -> Additional Include directories. Add the folder which contains the dlib folder to your additional include directories. Now you should be able to compile. You should also be able to start #including parts of dlib and using them. Hope that helps. Cheers, Davis On Mon, Jan 10, 2011 at 6:16 PM, Jian Liang <lia...@ya...> wrote: > Hello, Dear DLIB Developers: > > I am new to C++ and DLIB, and would like to learn and practice it in my > daily work. I would like to install this library within the developing > environment of Visual C++ Express. But I could not find the installation > tutorial from the DLIB website. Can you let me know how to do it or provide > some on-line tutorial that I can follow? > > Thank you very much! > > Liangjian > > |