Commit c577e89b authored by Timothee Habra's avatar Timothee Habra
Browse files

compatible with linux if separate_lib OFF

parent 7ae8e9c0
......@@ -10,6 +10,12 @@ project(project_symbolic)
set( CMAKE_C_FLAGS_RELEASE "-O3" )
set( CMAKE_CXX_FLAGS_RELEASE "-O3" )
# flags
if (UNIX)
set(CMAKE_C_FLAGS "-fPIC")
set(CMAKE_EXE_LINKER_FLAGS "-fPIC")
endif (UNIX)
# release of debug
release_debug()
......
......@@ -10,6 +10,12 @@ project(Project_userfct)
set( CMAKE_C_FLAGS_RELEASE "-O3" )
set( CMAKE_CXX_FLAGS_RELEASE "-O3" )
# flags
if (UNIX)
set(CMAKE_C_FLAGS "-fPIC")
set(CMAKE_EXE_LINKER_FLAGS "-fPIC")
endif (UNIX)
# release of debug
release_debug()
......
......@@ -159,7 +159,7 @@ if ( FLAG_SEPARATE_BUILD ) # find MBSysC dynamic libraries
else ( )
target_link_libraries( ${Executable} MBsysC_loadXML MBsysC_module )
target_link_libraries( ${Executable} MBsysC_loadXML MBsysC_module project_symbolic)
if (NOT FLAG_SHARED_LIB)
......
#ifndef MBSYSC_LOADXML_EXPORT_H
#define MBSYSC_LOADXML_EXPORT_H
#ifdef _WIN32
#ifdef MBSYSC_LOADXML_STATIC_DEFINE
# define MBSYSC_LOADXML_EXPORT
# define MBSYSC_LOADXML_NO_EXPORT
#else
# ifndef MBSYSC_LOADXML_EXPORT
# ifdef MBsysC_loadXML_EXPORTS
/* We are building this library */
# define MBSYSC_LOADXML_EXPORT __declspec(dllexport)
# else
/* We are using this library */
# define MBSYSC_LOADXML_EXPORT __declspec(dllimport)
# endif
# endif
# ifndef MBSYSC_LOADXML_NO_EXPORT
# define MBSYSC_LOADXML_NO_EXPORT
# endif
#endif
#ifndef MBSYSC_LOADXML_DEPRECATED
# define MBSYSC_LOADXML_DEPRECATED __declspec(deprecated)
# define MBSYSC_LOADXML_DEPRECATED_EXPORT MBSYSC_LOADXML_EXPORT __declspec(deprecated)
# define MBSYSC_LOADXML_DEPRECATED_NO_EXPORT MBSYSC_LOADXML_NO_EXPORT __declspec(deprecated)
#endif
#else
# define MBSYSC_LOADXML_EXPORT
#endif
#define DEFINE_NO_DEPRECATED 0
#if DEFINE_NO_DEPRECATED
# define MBSYSC_LOADXML_NO_DEPRECATED
#endif
#endif
......@@ -2,29 +2,33 @@
#ifndef MBSYSC_MODULE_EXPORT_H
#define MBSYSC_MODULE_EXPORT_H
#ifdef MBSYSC_MODULE_STATIC_DEFINE
#ifdef _WIN32
#ifdef MBSYSC_MODULE_STATIC_DEFINE
# define MBSYSC_MODULE_EXPORT
# define MBSYSC_MODULE_NO_EXPORT
#else
# ifndef MBSYSC_MODULE_EXPORT
# ifdef MBsysC_module_EXPORTS
/* We are building this library */
# define MBSYSC_MODULE_EXPORT __declspec(dllexport)
# else
/* We are using this library */
# define MBSYSC_MODULE_EXPORT __declspec(dllimport)
# endif
# endif
# ifndef MBSYSC_MODULE_NO_EXPORT
# define MBSYSC_MODULE_NO_EXPORT
# endif
#endif
#ifndef MBSYSC_MODULE_DEPRECATED
# define MBSYSC_MODULE_DEPRECATED __declspec(deprecated)
# define MBSYSC_MODULE_DEPRECATED_EXPORT MBSYSC_MODULE_EXPORT __declspec(deprecated)
# define MBSYSC_MODULE_DEPRECATED_NO_EXPORT MBSYSC_MODULE_NO_EXPORT __declspec(deprecated)
#endif
#else
# define MBSYSC_MODULE_EXPORT
# define MBSYSC_MODULE_NO_EXPORT
#else
# ifndef MBSYSC_MODULE_EXPORT
# ifdef MBsysC_module_EXPORTS
/* We are building this library */
# define MBSYSC_MODULE_EXPORT __declspec(dllexport)
# else
/* We are using this library */
# define MBSYSC_MODULE_EXPORT __declspec(dllimport)
# endif
# endif
# ifndef MBSYSC_MODULE_NO_EXPORT
# define MBSYSC_MODULE_NO_EXPORT
# endif
#endif
#ifndef MBSYSC_MODULE_DEPRECATED
# define MBSYSC_MODULE_DEPRECATED __declspec(deprecated)
# define MBSYSC_MODULE_DEPRECATED_EXPORT MBSYSC_MODULE_EXPORT __declspec(deprecated)
# define MBSYSC_MODULE_DEPRECATED_NO_EXPORT MBSYSC_MODULE_NO_EXPORT __declspec(deprecated)
#endif
#define DEFINE_NO_DEPRECATED 0
......
......@@ -2,29 +2,33 @@
#ifndef PROJECT_USERFCT_EXPORT_H
#define PROJECT_USERFCT_EXPORT_H
#ifdef PROJECT_USERFCT_STATIC_DEFINE
#ifdef _WIN32
#ifdef PROJECT_USERFCT_STATIC_DEFINE
# define PROJECT_USERFCT_EXPORT
# define PROJECT_USERFCT_NO_EXPORT
#else
# ifndef PROJECT_USERFCT_EXPORT
# ifdef Project_userfct_EXPORTS
/* We are building this library */
# define PROJECT_USERFCT_EXPORT
# else
/* We are using this library */
# define PROJECT_USERFCT_EXPORT
# endif
# endif
# ifndef PROJECT_USERFCT_NO_EXPORT
# define PROJECT_USERFCT_NO_EXPORT
# endif
#endif
#ifndef PROJECT_USERFCT_DEPRECATED
# define PROJECT_USERFCT_DEPRECATED __declspec(deprecated)
# define PROJECT_USERFCT_DEPRECATED_EXPORT PROJECT_USERFCT_EXPORT __declspec(deprecated)
# define PROJECT_USERFCT_DEPRECATED_NO_EXPORT PROJECT_USERFCT_NO_EXPORT __declspec(deprecated)
#endif
#else
# define PROJECT_USERFCT_EXPORT
# define PROJECT_USERFCT_NO_EXPORT
#else
# ifndef PROJECT_USERFCT_EXPORT
# ifdef Project_userfct_EXPORTS
/* We are building this library */
# define PROJECT_USERFCT_EXPORT
# else
/* We are using this library */
# define PROJECT_USERFCT_EXPORT
# endif
# endif
# ifndef PROJECT_USERFCT_NO_EXPORT
# define PROJECT_USERFCT_NO_EXPORT
# endif
#endif
#ifndef PROJECT_USERFCT_DEPRECATED
# define PROJECT_USERFCT_DEPRECATED __declspec(deprecated)
# define PROJECT_USERFCT_DEPRECATED_EXPORT PROJECT_USERFCT_EXPORT __declspec(deprecated)
# define PROJECT_USERFCT_DEPRECATED_NO_EXPORT PROJECT_USERFCT_NO_EXPORT __declspec(deprecated)
#endif
#define DEFINE_NO_DEPRECATED 0
......
......@@ -7,7 +7,7 @@
#ifndef _SET_OUTPUT_H_
#define _SET_OUTPUT_H_
#include "MBsysC_utilities_export.h"
#include "mbsysc_utilities_export.h"
// funcions prototype
#ifdef __cplusplus // in case the function is called from a C++ file
......
......@@ -13,7 +13,7 @@
#ifndef MBS_BUFFER_h
#define MBS_BUFFER_h
#include "MBsysC_utilities_export.h"
#include "mbsysc_utilities_export.h"
/**
*
......
......@@ -11,7 +11,7 @@
#define mbs_mxtool_h
/*--------------------*/
#include "MBsysC_utilities_export.h"
#include "mbsysc_utilities_export.h"
void put_vector(double *v, int size, char *name);
......
......@@ -2,29 +2,33 @@
#ifndef MBSYSC_UTILITIES_EXPORT_H
#define MBSYSC_UTILITIES_EXPORT_H
#ifdef MBSYSC_UTILITIES_STATIC_DEFINE
#ifdef _WIN32
#ifdef MBSYSC_UTILITIES_STATIC_DEFINE
# define MBSYSC_UTILITIES_EXPORT
# define MBSYSC_UTILITIES_NO_EXPORT
#else
# ifndef MBSYSC_UTILITIES_EXPORT
# ifdef MBsysC_utilities_EXPORTS
/* We are building this library */
# define MBSYSC_UTILITIES_EXPORT __declspec(dllexport)
# else
/* We are using this library */
# define MBSYSC_UTILITIES_EXPORT __declspec(dllimport)
# endif
# endif
# ifndef MBSYSC_UTILITIES_NO_EXPORT
# define MBSYSC_UTILITIES_NO_EXPORT
# endif
#endif
#ifndef MBSYSC_UTILITIES_DEPRECATED
# define MBSYSC_UTILITIES_DEPRECATED __declspec(deprecated)
# define MBSYSC_UTILITIES_DEPRECATED_EXPORT MBSYSC_UTILITIES_EXPORT __declspec(deprecated)
# define MBSYSC_UTILITIES_DEPRECATED_NO_EXPORT MBSYSC_UTILITIES_NO_EXPORT __declspec(deprecated)
#endif
#else
# define MBSYSC_UTILITIES_EXPORT
# define MBSYSC_UTILITIES_NO_EXPORT
#else
# ifndef MBSYSC_UTILITIES_EXPORT
# ifdef MBsysC_utilities_EXPORTS
/* We are building this library */
# define MBSYSC_UTILITIES_EXPORT __declspec(dllexport)
# else
/* We are using this library */
# define MBSYSC_UTILITIES_EXPORT __declspec(dllimport)
# endif
# endif
# ifndef MBSYSC_UTILITIES_NO_EXPORT
# define MBSYSC_UTILITIES_NO_EXPORT
# endif
#endif
#ifndef MBSYSC_UTILITIES_DEPRECATED
# define MBSYSC_UTILITIES_DEPRECATED __declspec(deprecated)
# define MBSYSC_UTILITIES_DEPRECATED_EXPORT MBSYSC_UTILITIES_EXPORT __declspec(deprecated)
# define MBSYSC_UTILITIES_DEPRECATED_NO_EXPORT MBSYSC_UTILITIES_NO_EXPORT __declspec(deprecated)
#endif
#define DEFINE_NO_DEPRECATED 0
......
......@@ -9,7 +9,7 @@
#include <math.h>
#include "MBsysC_utilities_export.h"
#include "mbsysc_utilities_export.h"
double norm_vector(double *v, int n)
{
......
......@@ -14,7 +14,7 @@
#include <string.h>
#include <math.h>
#include "MBsysC_utilities_export.h"
#include "mbsysc_utilities_export.h"
#ifndef DBL_MAX
#define DBL_MAX 1.7976931348623158e+308
......
Markdown is supported
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