comparison Plugins/Engine/SharedLibrary.cpp @ 1631:0d074f5f6069

fix
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 21 Sep 2015 13:33:50 +0200
parents ffd23c0104af
children eb8fbcf008b5
comparison
equal deleted inserted replaced
1630:ffd23c0104af 1631:0d074f5f6069
46 #error Support your platform here 46 #error Support your platform here
47 #endif 47 #endif
48 48
49 namespace Orthanc 49 namespace Orthanc
50 { 50 {
51 SharedLibrary::SharedLibrary(const std::string& path) : handle_(NULL) 51 SharedLibrary::SharedLibrary(const std::string& path) :
52 path_(path),
53 handle_(NULL)
52 { 54 {
53 path_ = boost::filesystem::canonical(path).string();
54
55 #if defined(_WIN32) 55 #if defined(_WIN32)
56 handle_ = ::LoadLibraryA(path_.c_str()); 56 handle_ = ::LoadLibraryA(path_.c_str());
57 if (handle_ == NULL) 57 if (handle_ == NULL)
58 { 58 {
59 LOG(ERROR) << "LoadLibrary(" << path_ << ") failed: Error " << ::GetLastError(); 59 LOG(ERROR) << "LoadLibrary(" << path_ << ") failed: Error " << ::GetLastError();