do NOT append extension to the library names which already have it!
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13559 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -21,22 +21,23 @@
|
|||||||
#include "wx/wxprec.h"
|
#include "wx/wxprec.h"
|
||||||
|
|
||||||
#ifdef __BORLANDC__
|
#ifdef __BORLANDC__
|
||||||
#pragma hdrstop
|
#pragma hdrstop
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if wxUSE_DYNAMIC_LOADER
|
#if wxUSE_DYNAMIC_LOADER
|
||||||
|
|
||||||
#ifdef __WINDOWS__
|
#ifdef __WINDOWS__
|
||||||
#include "wx/msw/private.h"
|
#include "wx/msw/private.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef WX_PRECOMP
|
#ifndef WX_PRECOMP
|
||||||
#include "wx/log.h"
|
#include "wx/log.h"
|
||||||
#include "wx/intl.h"
|
#include "wx/intl.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "wx/dynload.h"
|
#include "wx/filename.h" // for SplitPath()
|
||||||
|
|
||||||
|
#include "wx/dynload.h"
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
// implementation
|
// implementation
|
||||||
@@ -75,8 +76,17 @@ bool wxDynamicLibrary::Load(wxString libname, int flags)
|
|||||||
{
|
{
|
||||||
wxASSERT_MSG(m_handle == 0, _T("Library already loaded."));
|
wxASSERT_MSG(m_handle == 0, _T("Library already loaded."));
|
||||||
|
|
||||||
if( !(flags & wxDL_VERBATIM) )
|
// add the proper extension for the DLL ourselves unless told not to
|
||||||
libname += GetDllExt();
|
if ( !(flags & wxDL_VERBATIM) )
|
||||||
|
{
|
||||||
|
// and also check that the libname doesn't already have it
|
||||||
|
wxString ext;
|
||||||
|
wxFileName::SplitPath(libname, NULL, NULL, &ext);
|
||||||
|
if ( ext.empty() )
|
||||||
|
{
|
||||||
|
libname += GetDllExt();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#if defined(__WXMAC__) && !defined(__UNIX__)
|
#if defined(__WXMAC__) && !defined(__UNIX__)
|
||||||
FSSpec myFSSpec;
|
FSSpec myFSSpec;
|
||||||
|
Reference in New Issue
Block a user