WSL/SLF GitLab Repository

Commit f504046f authored by Mathias Bavay's avatar Mathias Bavay
Browse files

A small bug has been fixed for code::blocks (dll_import should not be set for...

A small bug has been fixed for code::blocks (dll_import should not be set for code::blocks on Windows). All #ifdef WIN32 have been replaced by #ifdef _WIN32 (which should be more standard). 

Version numbers have been pushed to 2.0.1 in order to prepare our upcoming release.
parent c4a67b91
......@@ -4,7 +4,7 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/tools/cmake/")
# Version of library
SET(VERSION_MAJOR 2 CACHE INTERNAL "")
SET(VERSION_MINOR 0 CACHE INTERNAL "")
SET(VERSION_PATCH 0 CACHE INTERNAL "")
SET(VERSION_PATCH 1 CACHE INTERNAL "")
PROJECT(meteoio)
ADD_SUBDIRECTORY(meteoio)
......@@ -188,6 +188,8 @@ if (GSOAPPP AND NOT EXISTS ${GSOAPPP})
set(GSOAPPP NOTFOUND CACHE FORCE)
endif(GSOAPPP AND NOT EXISTS ${GSOAPPP})
###########################################################
## CPACK section
###########################################################
set(CPACK_PACKAGE_DESCRIPTION "Meteorological preprocessing library")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Meteorological Input/Output preprocessing library: it covers data retrieval, data filtering, data transformations and spatial interpolations. Please refer to the included documentation and the included code examples!")
......@@ -251,8 +253,8 @@ IF(UNIX)
set(CPACK_GENERATOR "DEB;RPM;TGZ")
set(CPACK_DEBIAN_PACKAGE_NAME "meteoio")
set(CPACK_DEBIAN_PACKAGE_SECTION "devel")
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libstdc++6, libproj0")
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "i386")
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libstdc++6, libproj0") #objdump -p lib/libmeteoio.so | grep NEEDED | tr -s ' ' | cut -d' ' -f3 | tr '\n' ','
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "i386") #dpkg --print-architecture
set(CPACK_RPM_PACKAGE_NAME "meteoio")
set(CPACK_RPM_PACKAGE_LICENSE "LPGLv3")
set(CPACK_RPM_PACKAGE_REQUIRES "libstdc++6, libproj4")
......
......@@ -15,6 +15,7 @@ int main(int /*argc*/, char** argv) {
//we assume that the time given on the command line is in TZ=+1
IOUtils::convertString(d1,argv[1], 1.);
//io.setProcessingLevel(IOManager::raw); //set the processing level: raw, filtered or resampled
io.getMeteoData(d1, vecMeteo);
//writing some data out in order to prove that it really worked!
......
Begin4
Title: MeteoIO
Version: 2.0.0
Version: 2.0.1
Entered-date: 2011-02-15
Description: Meteorological data preprocessing library: it covers data retrieval, data filtering, data transformations and statistical spatial interpolations. Convenience classes are also available for related issues.
Keywords: meteorological data access filtering spatial interpolation
......
......@@ -19,7 +19,7 @@
namespace mio {
#ifdef WIN32
#ifdef _WIN32
DynamicLibrary::DynamicLibrary(HINSTANCE objFile) : i_objFile(objFile){}
#else
DynamicLibrary::DynamicLibrary(void* objFile) : i_objFile(objFile){}
......@@ -27,7 +27,7 @@ DynamicLibrary::DynamicLibrary(void* objFile) : i_objFile(objFile){}
DynamicLibrary::~DynamicLibrary(void)
{
#ifdef WIN32
#ifdef _WIN32
FreeLibrary(i_objFile);
#else
dlclose(i_objFile);
......@@ -42,7 +42,7 @@ PluginObject* DynamicLibrary::newObject(const std::string& name, const Config& c
}
// Get the loadObject() function. If it doesn't exist, return NULL.
#ifdef WIN32
#ifdef _WIN32
#pragma warning(disable:4191) //GetProcAddress does NOT return a FARPROC, the warning misses it...
const void (*loadSym)(const std::string&, const Config&) = (const void (*)(const std::string&, const Config&))GetProcAddress(i_objFile, "loadObject");
#else
......@@ -64,7 +64,7 @@ __extension__
DynamicLibrary* DynamicLoader::loadObjectFile(const std::string& file)
{
#ifdef WIN32
#ifdef _WIN32
HINSTANCE objFile = LoadLibrary(TEXT(file.c_str()));
#else
void* objFile = dlopen(file.c_str(), RTLD_NOW);
......@@ -78,7 +78,7 @@ DynamicLibrary* DynamicLoader::loadObjectFile(const std::string& file)
}
std::string DynamicLoader::getErrorMessage(){
#ifdef WIN32
#ifdef _WIN32
std::stringstream ss;
ss << GetLastError();
return ss.str();
......
......@@ -21,7 +21,7 @@
#include <meteoio/Config.h>
#ifndef USE_PRECOMPILED_HEADERS
#ifdef WIN32
#ifdef _WIN32
#include <direct.h>
#include <windows.h>
#undef max
......@@ -71,7 +71,7 @@ class PluginObject {
class DynamicLibrary {
protected:
// The handle to the shared library that was opened
#ifdef WIN32
#ifdef _WIN32
HINSTANCE i_objFile;
#else
void *i_objFile;
......@@ -86,7 +86,7 @@ class DynamicLibrary {
// Creates a new library, with the object file handle that is passed
// in. Protected so that only the DynamicLoader can create an
// instance (since it is declared friend.
#ifdef WIN32
#ifdef _WIN32
DynamicLibrary(HINSTANCE objFile);
#else
DynamicLibrary(void* objFile);
......
......@@ -32,7 +32,7 @@ IOException::IOException(const std::string& message, const std::string& position
} else {
msg = position + ": " + message;
}
#ifdef LINUX
#ifdef LINUX
void* tracearray[25]; //maximal size for backtrace: 25 pointers
size_t tracesize = backtrace(tracearray, 25); //obtains backtrace for current thread
char** symbols = backtrace_symbols(tracearray, tracesize); //translate pointers to strings
......
......@@ -53,7 +53,7 @@ namespace mio {
void IOHandler::registerPlugins()
{
#if defined(WIN32)
#if defined(_WIN32)
const std::string libsuffix = ".dll";
#elif defined(APPLE)
const std::string libsuffix = ".dylib";
......
......@@ -8,7 +8,7 @@
#ifndef _Included_SYNCHRONIZED_H_
#define _Included_SYNCHRONIZED_H_
#ifdef WIN32
#ifdef _WIN32
/* link to kernel32.dll */
#include <windows.h>
#undef max
......@@ -58,7 +58,7 @@ public:
Mutex()
{
#ifdef WIN32
#ifdef _WIN32
InitializeCriticalSection(&m_criticalSection);
#else
pthread_mutex_init(&m_criticalSection, NULL);
......@@ -69,7 +69,7 @@ public:
~Mutex()
{
#ifdef WIN32
#ifdef _WIN32
DeleteCriticalSection(&m_criticalSection);
#else
pthread_mutex_destroy( &m_criticalSection );
......@@ -80,7 +80,7 @@ public:
void lock()
{
#ifdef WIN32
#ifdef _WIN32
EnterCriticalSection(&m_criticalSection);
#else
pthread_mutex_lock( &m_criticalSection );
......@@ -91,7 +91,7 @@ public:
void unlock()
{
#ifdef WIN32
#ifdef _WIN32
LeaveCriticalSection(&m_criticalSection);
#else
pthread_mutex_unlock( &m_criticalSection );
......@@ -103,7 +103,7 @@ private:
* Critical section Object.
* Initialized at runtime, when Mutex instance is created
*/
#ifdef WIN32
#ifdef _WIN32
CRITICAL_SECTION m_criticalSection;
#else //assumes it's a Unix/Linux system
pthread_mutex_t m_criticalSection;
......
......@@ -15,7 +15,7 @@
You should have received a copy of the GNU Lesser General Public License
along with MeteoIO. If not, see <http://www.gnu.org/licenses/>.
*/
#if defined(_WIN32)
#if defined(_MSC_VER)
#if defined(OSG_LIBRARY_STATIC)
#define METEOIO_EXPORT
#elif defined(METEOIO_LIBRARY)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment