From 512f46907e2bddc1d3f2fdd300f3f08164afe20f Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Mon, 2 Jul 2012 19:09:45 +0200 Subject: [PATCH] Compilation fixes for Windows. --- cib/checkresult.h | 2 +- cib/checktask.h | 2 +- cib/cib.h | 2 +- cib/cib.vcxproj | 110 +++++++++++++++++++++++ cib/configobjectadapter.h | 2 +- cib/host.h | 2 +- cib/hostgroup.h | 2 +- cib/macroprocessor.h | 2 +- cib/nagioschecktask.h | 2 +- cib/service.h | 2 +- cib/servicegroup.h | 2 +- components/checker/checker.vcxproj | 8 +- components/cibsync/cibsync.vcxproj | 92 +++++++++++++++++++ components/cibsync/cibsynccomponent.cpp | 2 +- components/delegation/delegation.vcxproj | 8 +- components/discovery/discovery.vcxproj | 8 +- icinga.sln | 40 +++++---- icinga/icinga.vcxproj | 20 ----- 18 files changed, 246 insertions(+), 62 deletions(-) create mode 100644 cib/cib.vcxproj create mode 100644 components/cibsync/cibsync.vcxproj diff --git a/cib/checkresult.h b/cib/checkresult.h index dd71c86d2..c57b8ecea 100644 --- a/cib/checkresult.h +++ b/cib/checkresult.h @@ -4,7 +4,7 @@ namespace icinga { -class I2_ICINGA_API CheckResult : public MessagePart +class I2_CIB_API CheckResult : public MessagePart { public: CheckResult(void) : MessagePart() { } diff --git a/cib/checktask.h b/cib/checktask.h index c05d3bdc8..e0217b90b 100644 --- a/cib/checktask.h +++ b/cib/checktask.h @@ -6,7 +6,7 @@ namespace icinga struct CheckTaskType; -class I2_ICINGA_API CheckTask : public Object +class I2_CIB_API CheckTask : public Object { public: typedef shared_ptr Ptr; diff --git a/cib/cib.h b/cib/cib.h index 8bff7780e..fb7d92723 100644 --- a/cib/cib.h +++ b/cib/cib.h @@ -11,7 +11,7 @@ enum InformationType CIB_ServiceStatus = 1<<2 }; -class CIB +class I2_CIB_API CIB { public: static void RequireInformation(InformationType type); diff --git a/cib/cib.vcxproj b/cib/cib.vcxproj new file mode 100644 index 000000000..4f5cfe636 --- /dev/null +++ b/cib/cib.vcxproj @@ -0,0 +1,110 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {538D7F53-A6A0-459A-AE4F-70DB135BC9AF} + Win32Proj + cib + + + + DynamicLibrary + true + MultiByte + + + DynamicLibrary + false + true + MultiByte + + + + + + + + + + + + + true + $(SolutionDir)\base;$(SolutionDir)\icinga;$(SolutionDir)\jsonrpc;$(IncludePath) + $(OutDir);$(LibraryPath) + + + false + $(SolutionDir)\base;$(SolutionDir)\icinga;$(SolutionDir)\jsonrpc;$(IncludePath) + $(OutDir);$(LibraryPath) + + + + + + Level3 + Disabled + _WINDLL;I2_CIB_BUILD;_DEBUG;%(PreprocessorDefinitions) + + + Windows + true + base.lib;icinga.lib;jsonrpc.lib;%(AdditionalDependencies) + + + + + Level3 + + + MaxSpeed + true + true + _WINDLL;I2_CIB_BUILD;%(PreprocessorDefinitions) + + + Windows + true + true + true + base.lib;icinga.lib;jsonrpc.lib;%(AdditionalDependencies) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/cib/configobjectadapter.h b/cib/configobjectadapter.h index b3cb41a93..7f94d6f36 100644 --- a/cib/configobjectadapter.h +++ b/cib/configobjectadapter.h @@ -4,7 +4,7 @@ namespace icinga { -class I2_ICINGA_API ConfigObjectAdapter +class I2_CIB_API ConfigObjectAdapter { public: ConfigObjectAdapter(const ConfigObject::Ptr& configObject) diff --git a/cib/host.h b/cib/host.h index 6db8b4f41..3ac03efdc 100644 --- a/cib/host.h +++ b/cib/host.h @@ -4,7 +4,7 @@ namespace icinga { -class I2_ICINGA_API Host : public ConfigObjectAdapter +class I2_CIB_API Host : public ConfigObjectAdapter { public: Host(const ConfigObject::Ptr& configObject) diff --git a/cib/hostgroup.h b/cib/hostgroup.h index 8c98626c6..3a5daf21e 100644 --- a/cib/hostgroup.h +++ b/cib/hostgroup.h @@ -4,7 +4,7 @@ namespace icinga { -class I2_ICINGA_API HostGroup : public ConfigObjectAdapter +class I2_CIB_API HostGroup : public ConfigObjectAdapter { public: HostGroup(const ConfigObject::Ptr& configObject) diff --git a/cib/macroprocessor.h b/cib/macroprocessor.h index 2bf5bc7f9..182656da2 100644 --- a/cib/macroprocessor.h +++ b/cib/macroprocessor.h @@ -4,7 +4,7 @@ namespace icinga { -class I2_ICINGA_API MacroProcessor +class I2_CIB_API MacroProcessor { public: static string ResolveMacros(const string& str, const Dictionary::Ptr& macros); diff --git a/cib/nagioschecktask.h b/cib/nagioschecktask.h index 824f99df1..6a7dd7594 100644 --- a/cib/nagioschecktask.h +++ b/cib/nagioschecktask.h @@ -4,7 +4,7 @@ namespace icinga { -class I2_ICINGA_API NagiosCheckTask : public CheckTask +class I2_CIB_API NagiosCheckTask : public CheckTask { public: typedef shared_ptr Ptr; diff --git a/cib/service.h b/cib/service.h index 4f524b686..d0e0ce898 100644 --- a/cib/service.h +++ b/cib/service.h @@ -22,7 +22,7 @@ enum ServiceStateType class CheckResult; -class I2_ICINGA_API Service : public ConfigObjectAdapter +class I2_CIB_API Service : public ConfigObjectAdapter { public: Service(const ConfigObject::Ptr& configObject) diff --git a/cib/servicegroup.h b/cib/servicegroup.h index 7c3edf850..6bde52320 100644 --- a/cib/servicegroup.h +++ b/cib/servicegroup.h @@ -4,7 +4,7 @@ namespace icinga { -class I2_ICINGA_API ServiceGroup : public ConfigObjectAdapter +class I2_CIB_API ServiceGroup : public ConfigObjectAdapter { public: ServiceGroup(const ConfigObject::Ptr& configObject) diff --git a/components/checker/checker.vcxproj b/components/checker/checker.vcxproj index 67d311df7..a2b22ebdf 100644 --- a/components/checker/checker.vcxproj +++ b/components/checker/checker.vcxproj @@ -40,12 +40,12 @@ true $(OutDir);$(LibraryPath) - $(SolutionDir)\base;$(SolutionDir)\jsonrpc;$(SolutionDir)\icinga;$(IncludePath) + $(SolutionDir)\base;$(SolutionDir)\jsonrpc;$(SolutionDir)\icinga;$(SolutionDir)\cib;$(IncludePath) false $(OutDir);$(LibraryPath) - $(SolutionDir)\base;$(SolutionDir)\jsonrpc;$(SolutionDir)\icinga;$(IncludePath) + $(SolutionDir)\base;$(SolutionDir)\jsonrpc;$(SolutionDir)\icinga;$(SolutionDir)\cib;$(IncludePath) @@ -60,7 +60,7 @@ Windows true - base.lib;dyn.lib;jsonrpc.lib;icinga.lib;%(AdditionalDependencies) + base.lib;dyn.lib;jsonrpc.lib;icinga.lib;cib.lib;%(AdditionalDependencies) @@ -80,7 +80,7 @@ true true true - base.lib;dyn.lib;jsonrpc.lib;icinga.lib;%(AdditionalDependencies) + base.lib;dyn.lib;jsonrpc.lib;icinga.lib;cib.lib;%(AdditionalDependencies) diff --git a/components/cibsync/cibsync.vcxproj b/components/cibsync/cibsync.vcxproj new file mode 100644 index 000000000..4a2063e3e --- /dev/null +++ b/components/cibsync/cibsync.vcxproj @@ -0,0 +1,92 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {704DDD8E-9E6D-4C22-80BD-6DE10F3A5E1C} + Win32Proj + cibsync + + + + DynamicLibrary + true + MultiByte + + + DynamicLibrary + false + true + MultiByte + + + + + + + + + + + + + true + $(SolutionDir)\base;$(SolutionDir)\jsonrpc;$(SolutionDir)\icinga;$(SolutionDir)\cib;$(IncludePath) + $(OutDir);$(LibraryPath) + + + false + $(SolutionDir)\base;$(SolutionDir)\jsonrpc;$(SolutionDir)\icinga;$(SolutionDir)\cib;$(IncludePath) + $(OutDir);$(LibraryPath) + + + + + + Level3 + Disabled + WIN32;_DEBUG;_WINDOWS;_USRDLL;CIBSYNC_EXPORTS;%(PreprocessorDefinitions) + + + Windows + true + base.lib;dyn.lib;jsonrpc.lib;icinga.lib;cib.lib;%(AdditionalDependencies) + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_WINDOWS;_USRDLL;CIBSYNC_EXPORTS;%(PreprocessorDefinitions) + + + Windows + true + true + true + base.lib;dyn.lib;jsonrpc.lib;icinga.lib;cib.lib;%(AdditionalDependencies) + + + + + + + + + + + + + \ No newline at end of file diff --git a/components/cibsync/cibsynccomponent.cpp b/components/cibsync/cibsynccomponent.cpp index 501764d76..99a23bc79 100644 --- a/components/cibsync/cibsynccomponent.cpp +++ b/components/cibsync/cibsynccomponent.cpp @@ -258,7 +258,7 @@ void CIBSyncComponent::RemoteObjectCommittedHandler(const Endpoint::Ptr& sender, m_SyncingConfig = true; object->Commit(); m_SyncingConfig = false; - } catch (const std::exception& ex) { + } catch (const std::exception&) { m_SyncingConfig = false; throw; } diff --git a/components/delegation/delegation.vcxproj b/components/delegation/delegation.vcxproj index 8cb021043..e0d9a9cbb 100644 --- a/components/delegation/delegation.vcxproj +++ b/components/delegation/delegation.vcxproj @@ -39,12 +39,12 @@ true - $(SolutionDir)\base;$(SolutionDir)\jsonrpc;$(SolutionDir)\icinga;$(IncludePath) + $(SolutionDir)\base;$(SolutionDir)\jsonrpc;$(SolutionDir)\icinga;$(SolutionDir)\cib;$(IncludePath) $(OutDir);$(LibraryPath) false - $(SolutionDir)\base;$(SolutionDir)\jsonrpc;$(SolutionDir)\icinga;$(IncludePath) + $(SolutionDir)\base;$(SolutionDir)\jsonrpc;$(SolutionDir)\icinga;$(SolutionDir)\cib;$(IncludePath) $(OutDir);$(LibraryPath) @@ -60,7 +60,7 @@ Windows true - base.lib;dyn.lib;jsonrpc.lib;icinga.lib;%(AdditionalDependencies) + base.lib;dyn.lib;jsonrpc.lib;icinga.lib;cib.lib;%(AdditionalDependencies) @@ -80,7 +80,7 @@ true true true - base.lib;dyn.lib;jsonrpc.lib;icinga.lib;%(AdditionalDependencies) + base.lib;dyn.lib;jsonrpc.lib;icinga.lib;cib.lib;%(AdditionalDependencies) diff --git a/components/discovery/discovery.vcxproj b/components/discovery/discovery.vcxproj index ee8f0c6b8..e2bf71091 100644 --- a/components/discovery/discovery.vcxproj +++ b/components/discovery/discovery.vcxproj @@ -39,12 +39,12 @@ true - $(SolutionDir)\base;$(SolutionDir)\jsonrpc;$(SolutionDir)\icinga;$(IncludePath) + $(SolutionDir)\base;$(SolutionDir)\jsonrpc;$(SolutionDir)\icinga;$(SolutionDir)\cib;$(IncludePath) $(OutDir);$(LibraryPath) false - $(SolutionDir)\base;$(SolutionDir)\jsonrpc;$(SolutionDir)\icinga;$(IncludePath) + $(SolutionDir)\base;$(SolutionDir)\jsonrpc;$(SolutionDir)\icinga;$(SolutionDir)\cib;$(IncludePath) $(OutDir);$(LibraryPath) @@ -60,7 +60,7 @@ Windows true - base.lib;jsonrpc.lib;icinga.lib;%(AdditionalDependencies) + base.lib;jsonrpc.lib;icinga.lib;cib.lib;%(AdditionalDependencies) @@ -80,7 +80,7 @@ true true true - base.lib;jsonrpc.lib;icinga.lib;%(AdditionalDependencies) + base.lib;jsonrpc.lib;icinga.lib;cib.lib;%(AdditionalDependencies) diff --git a/icinga.sln b/icinga.sln index 372c25499..b9d25a4eb 100644 --- a/icinga.sln +++ b/icinga.sln @@ -23,7 +23,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "icinga-app", "icinga-app\ic {EAD41628-BB96-4F99-9070-8A9676801295} = {EAD41628-BB96-4F99-9070-8A9676801295} {2E6C1133-730F-4875-A72C-B455B1DD4C5C} = {2E6C1133-730F-4875-A72C-B455B1DD4C5C} {17C93245-8C20-4316-9573-1AE41D918C10} = {17C93245-8C20-4316-9573-1AE41D918C10} - {697C6D7E-3109-484C-A7AF-384D28711610} = {697C6D7E-3109-484C-A7AF-384D28711610} {E58F1DA7-B723-412B-B2B7-7FF58E2A944E} = {E58F1DA7-B723-412B-B2B7-7FF58E2A944E} {38CE81CC-2660-4EF0-A936-4A337591DA3E} = {38CE81CC-2660-4EF0-A936-4A337591DA3E} {C1FC77E1-04A4-481B-A78B-2F7AF489C2F8} = {C1FC77E1-04A4-481B-A78B-2F7AF489C2F8} @@ -35,11 +34,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "configfile", "components\co {B26AFFA6-2BDF-42E6-A224-2591FFD9BFB7} = {B26AFFA6-2BDF-42E6-A224-2591FFD9BFB7} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "configrpc", "components\configrpc\configrpc.vcxproj", "{697C6D7E-3109-484C-A7AF-384D28711610}" - ProjectSection(ProjectDependencies) = postProject - {C1FC77E1-04A4-481B-A78B-2F7AF489C2F8} = {C1FC77E1-04A4-481B-A78B-2F7AF489C2F8} - EndProjectSection -EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo", "components\demo\demo.vcxproj", "{2E6C1133-730F-4875-A72C-B455B1DD4C5C}" ProjectSection(ProjectDependencies) = postProject {C1FC77E1-04A4-481B-A78B-2F7AF489C2F8} = {C1FC77E1-04A4-481B-A78B-2F7AF489C2F8} @@ -59,23 +53,31 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cJSON", "third-party\cJSON\ EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mmatch", "third-party\mmatch\mmatch.vcxproj", "{19CBCE06-3F5C-479A-BD75-E2AB6215D345}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dyntest", "dyntest\dyntest.vcxproj", "{E6FA740D-0939-4711-AFBC-3D9E913510A1}" - ProjectSection(ProjectDependencies) = postProject - {B26AFFA6-2BDF-42E6-A224-2591FFD9BFB7} = {B26AFFA6-2BDF-42E6-A224-2591FFD9BFB7} - EndProjectSection -EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "checker", "components\checker\checker.vcxproj", "{38CE81CC-2660-4EF0-A936-4A337591DA3E}" ProjectSection(ProjectDependencies) = postProject + {538D7F53-A6A0-459A-AE4F-70DB135BC9AF} = {538D7F53-A6A0-459A-AE4F-70DB135BC9AF} {8DD52FAC-ECEE-48C2-B266-E7C47ED485F8} = {8DD52FAC-ECEE-48C2-B266-E7C47ED485F8} {C1FC77E1-04A4-481B-A78B-2F7AF489C2F8} = {C1FC77E1-04A4-481B-A78B-2F7AF489C2F8} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "delegation", "components\delegation\delegation.vcxproj", "{17C93245-8C20-4316-9573-1AE41D918C10}" ProjectSection(ProjectDependencies) = postProject + {538D7F53-A6A0-459A-AE4F-70DB135BC9AF} = {538D7F53-A6A0-459A-AE4F-70DB135BC9AF} {8DD52FAC-ECEE-48C2-B266-E7C47ED485F8} = {8DD52FAC-ECEE-48C2-B266-E7C47ED485F8} {C1FC77E1-04A4-481B-A78B-2F7AF489C2F8} = {C1FC77E1-04A4-481B-A78B-2F7AF489C2F8} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cib", "cib\cib.vcxproj", "{538D7F53-A6A0-459A-AE4F-70DB135BC9AF}" + ProjectSection(ProjectDependencies) = postProject + {C1FC77E1-04A4-481B-A78B-2F7AF489C2F8} = {C1FC77E1-04A4-481B-A78B-2F7AF489C2F8} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cibsync", "components\cibsync\cibsync.vcxproj", "{704DDD8E-9E6D-4C22-80BD-6DE10F3A5E1C}" + ProjectSection(ProjectDependencies) = postProject + {538D7F53-A6A0-459A-AE4F-70DB135BC9AF} = {538D7F53-A6A0-459A-AE4F-70DB135BC9AF} + {C1FC77E1-04A4-481B-A78B-2F7AF489C2F8} = {C1FC77E1-04A4-481B-A78B-2F7AF489C2F8} + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -102,10 +104,6 @@ Global {E58F1DA7-B723-412B-B2B7-7FF58E2A944E}.Debug|Win32.Build.0 = Debug|Win32 {E58F1DA7-B723-412B-B2B7-7FF58E2A944E}.Release|Win32.ActiveCfg = Release|Win32 {E58F1DA7-B723-412B-B2B7-7FF58E2A944E}.Release|Win32.Build.0 = Release|Win32 - {697C6D7E-3109-484C-A7AF-384D28711610}.Debug|Win32.ActiveCfg = Debug|Win32 - {697C6D7E-3109-484C-A7AF-384D28711610}.Debug|Win32.Build.0 = Debug|Win32 - {697C6D7E-3109-484C-A7AF-384D28711610}.Release|Win32.ActiveCfg = Release|Win32 - {697C6D7E-3109-484C-A7AF-384D28711610}.Release|Win32.Build.0 = Release|Win32 {2E6C1133-730F-4875-A72C-B455B1DD4C5C}.Debug|Win32.ActiveCfg = Debug|Win32 {2E6C1133-730F-4875-A72C-B455B1DD4C5C}.Debug|Win32.Build.0 = Debug|Win32 {2E6C1133-730F-4875-A72C-B455B1DD4C5C}.Release|Win32.ActiveCfg = Release|Win32 @@ -126,10 +124,6 @@ Global {19CBCE06-3F5C-479A-BD75-E2AB6215D345}.Debug|Win32.Build.0 = Debug|Win32 {19CBCE06-3F5C-479A-BD75-E2AB6215D345}.Release|Win32.ActiveCfg = Release|Win32 {19CBCE06-3F5C-479A-BD75-E2AB6215D345}.Release|Win32.Build.0 = Release|Win32 - {E6FA740D-0939-4711-AFBC-3D9E913510A1}.Debug|Win32.ActiveCfg = Debug|Win32 - {E6FA740D-0939-4711-AFBC-3D9E913510A1}.Debug|Win32.Build.0 = Debug|Win32 - {E6FA740D-0939-4711-AFBC-3D9E913510A1}.Release|Win32.ActiveCfg = Release|Win32 - {E6FA740D-0939-4711-AFBC-3D9E913510A1}.Release|Win32.Build.0 = Release|Win32 {38CE81CC-2660-4EF0-A936-4A337591DA3E}.Debug|Win32.ActiveCfg = Debug|Win32 {38CE81CC-2660-4EF0-A936-4A337591DA3E}.Debug|Win32.Build.0 = Debug|Win32 {38CE81CC-2660-4EF0-A936-4A337591DA3E}.Release|Win32.ActiveCfg = Release|Win32 @@ -138,6 +132,14 @@ Global {17C93245-8C20-4316-9573-1AE41D918C10}.Debug|Win32.Build.0 = Debug|Win32 {17C93245-8C20-4316-9573-1AE41D918C10}.Release|Win32.ActiveCfg = Release|Win32 {17C93245-8C20-4316-9573-1AE41D918C10}.Release|Win32.Build.0 = Release|Win32 + {538D7F53-A6A0-459A-AE4F-70DB135BC9AF}.Debug|Win32.ActiveCfg = Debug|Win32 + {538D7F53-A6A0-459A-AE4F-70DB135BC9AF}.Debug|Win32.Build.0 = Debug|Win32 + {538D7F53-A6A0-459A-AE4F-70DB135BC9AF}.Release|Win32.ActiveCfg = Release|Win32 + {538D7F53-A6A0-459A-AE4F-70DB135BC9AF}.Release|Win32.Build.0 = Release|Win32 + {704DDD8E-9E6D-4C22-80BD-6DE10F3A5E1C}.Debug|Win32.ActiveCfg = Debug|Win32 + {704DDD8E-9E6D-4C22-80BD-6DE10F3A5E1C}.Debug|Win32.Build.0 = Debug|Win32 + {704DDD8E-9E6D-4C22-80BD-6DE10F3A5E1C}.Release|Win32.ActiveCfg = Release|Win32 + {704DDD8E-9E6D-4C22-80BD-6DE10F3A5E1C}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/icinga/icinga.vcxproj b/icinga/icinga.vcxproj index ec5070cf8..c15bac63b 100644 --- a/icinga/icinga.vcxproj +++ b/icinga/icinga.vcxproj @@ -11,38 +11,18 @@ - - - - - - - - - - - - - - - - - - - -