#define __CPPLUGINS__CONFIG__H__
#include <cpPlugins/cpPlugins_Export.h>
+#include <cpPlugins_Config.h>
#include <string>
/*
* =========================================================================
*/
-#define ITK_MANUAL_INSTANTIATION
#define cpPlugins_CONFIG_FILE "plugins.cfg"
#define cpPlugins_QT4_USED @QT4_FOUND@
# ifndef WIN32_LEAN_AND_MEAN
# define WIN32_LEAN_AND_MEAN
# endif
-# ifndef NOMINMAX
-# define NOMINMAX
-# endif
+# define NOMINMAX
+# include <windows.h>
+# include <tchar.h>
#elif defined( linux ) || defined( __linux )
# define cpPlugins_SYS_LINUX
# define cpPlugins_PLUGIN_PREFIX "lib"
* Some functions
* =========================================================================
*/
+#include <iostream>
namespace cpPlugins
{
struct PathHelper
// ---------------------------------------------------------------------
inline static std::string CanonicalPath( const std::string& path )
{
+ std::string ret = "";
#ifdef cpPlugins_SYS_WINDOWS
TCHAR buffer[ 4096 ] = TEXT( "" );
TCHAR** lppPart = { NULL };
GetFullPathName( path.c_str( ), 4096, buffer, lppPart );
- return( std::string( buffer ) );
+ ret = std::string( buffer );
#else // cpPlugins_SYS_WINDOWS
- return( std::string( realpath( path.c_str( ), NULL ) ) );
+ char* canonical_path = realpath( path.c_str( ), NULL );
+ if( canonical_path != NULL )
+ {
+ ret = canonical_path;
+ free( canonical_path );
+
+ } // fi
#endif // cpPlugins_SYS_WINDOWS
+ return( ret );
}
};