mirror of https://github.com/davisking/dlib.git
merged
This commit is contained in:
commit
11983d7291
|
@ -136,9 +136,9 @@ if (NOT TARGET dlib)
|
||||||
# we want to link to the right stuff depending on our platform.
|
# we want to link to the right stuff depending on our platform.
|
||||||
if (WIN32 AND NOT CYGWIN) ###############################################################################
|
if (WIN32 AND NOT CYGWIN) ###############################################################################
|
||||||
if (DLIB_NO_GUI_SUPPORT)
|
if (DLIB_NO_GUI_SUPPORT)
|
||||||
set (dlib_needed_libraries ws2_32)
|
set (dlib_needed_libraries ws2_32 winmm)
|
||||||
else()
|
else()
|
||||||
set (dlib_needed_libraries ws2_32 comctl32 gdi32 imm32)
|
set (dlib_needed_libraries ws2_32 winmm comctl32 gdi32 imm32)
|
||||||
endif()
|
endif()
|
||||||
elseif(APPLE) ############################################################################
|
elseif(APPLE) ############################################################################
|
||||||
find_library(pthreadlib pthread)
|
find_library(pthreadlib pthread)
|
||||||
|
|
|
@ -13,6 +13,11 @@
|
||||||
#include "../windows_magic.h"
|
#include "../windows_magic.h"
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
||||||
|
// tell visual studio to link to the library needed to call timeGetTime()
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#pragma comment (lib, "winmm.lib")
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __BORLANDC__
|
#ifdef __BORLANDC__
|
||||||
// Apparently the borland compiler doesn't define this.
|
// Apparently the borland compiler doesn't define this.
|
||||||
#define INVALID_FILE_ATTRIBUTES ((DWORD)-1)
|
#define INVALID_FILE_ATTRIBUTES ((DWORD)-1)
|
||||||
|
@ -89,7 +94,7 @@ namespace dlib
|
||||||
get_timestamp (
|
get_timestamp (
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
unsigned long temp = GetTickCount();
|
unsigned long temp = timeGetTime();
|
||||||
if (temp >= last_time)
|
if (temp >= last_time)
|
||||||
{
|
{
|
||||||
last_time = temp;
|
last_time = temp;
|
||||||
|
|
|
@ -383,7 +383,7 @@ namespace dlib
|
||||||
template <typename T>
|
template <typename T>
|
||||||
typename enable_if_c<std::numeric_limits<T>::is_integer>::type bind (
|
typename enable_if_c<std::numeric_limits<T>::is_integer>::type bind (
|
||||||
unsigned long idx,
|
unsigned long idx,
|
||||||
T& item
|
const T& item
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (sizeof(T) <= 4)
|
if (sizeof(T) <= 4)
|
||||||
|
@ -392,15 +392,15 @@ namespace dlib
|
||||||
bind_int64(idx, item);
|
bind_int64(idx, item);
|
||||||
}
|
}
|
||||||
|
|
||||||
void bind(unsigned long idx, std::string& item) { bind_text(idx, item); }
|
void bind(unsigned long idx, const std::string& item) { bind_text(idx, item); }
|
||||||
void bind(unsigned long idx, float& item ) { bind_double(idx, item); }
|
void bind(unsigned long idx, const float& item ) { bind_double(idx, item); }
|
||||||
void bind(unsigned long idx, double& item ) { bind_double(idx, item); }
|
void bind(unsigned long idx, const double& item ) { bind_double(idx, item); }
|
||||||
void bind(unsigned long idx, long double& item) { bind_double(idx, item); }
|
void bind(unsigned long idx, const long double& item) { bind_double(idx, item); }
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
typename disable_if_c<std::numeric_limits<T>::is_integer>::type bind (
|
typename disable_if_c<std::numeric_limits<T>::is_integer>::type bind (
|
||||||
unsigned long idx,
|
unsigned long idx,
|
||||||
T& item
|
const T& item
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
bind_object(idx, item);
|
bind_object(idx, item);
|
||||||
|
|
|
@ -379,7 +379,7 @@ namespace dlib
|
||||||
>
|
>
|
||||||
void bind (
|
void bind (
|
||||||
unsigned long parameter_id,
|
unsigned long parameter_id,
|
||||||
T& item
|
const T& item
|
||||||
) const;
|
) const;
|
||||||
/*!
|
/*!
|
||||||
requires
|
requires
|
||||||
|
|
|
@ -97,7 +97,7 @@ sudo apt-get install libx11-dev
|
||||||
<h2>Compiling on Windows Using GCC</h2>
|
<h2>Compiling on Windows Using GCC</h2>
|
||||||
<p>
|
<p>
|
||||||
The commands for gcc on windows are the same as above but you may also have to link
|
The commands for gcc on windows are the same as above but you may also have to link
|
||||||
(via the -l option) to the following libraries: gdi32, comctl32, user32, ws2_32, or imm32.
|
(via the -l option) to the following libraries: gdi32, comctl32, user32, winmm, ws2_32, or imm32.
|
||||||
However, it's worth pointing out that Visual Studio Express is free and a much better choice for
|
However, it's worth pointing out that Visual Studio Express is free and a much better choice for
|
||||||
windows development than gcc.
|
windows development than gcc.
|
||||||
</p>
|
</p>
|
||||||
|
|
Loading…
Reference in New Issue