From: rnv Date: Tue, 12 Nov 2013 11:53:55 +0000 (+0000) Subject: Win32 compilation. X-Git-Tag: V7_3_0a1~9 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=7ced17c754aabe2ecd43a150123b1f22053317fe;p=modules%2Fyacs.git Win32 compilation. --- diff --git a/src/bases/Test/basesTest.cxx b/src/bases/Test/basesTest.cxx index acd5135fd..851a6b6f2 100644 --- a/src/bases/Test/basesTest.cxx +++ b/src/bases/Test/basesTest.cxx @@ -55,6 +55,7 @@ void *BasesTest::th1_1(void *st) _var+=2; _s1.post(); _s2.post(); + return 0; } void *BasesTest::th1_2(void *st) @@ -63,6 +64,7 @@ void *BasesTest::th1_2(void *st) _s2.wait(); _glob<< myName << _var; _s2.post(); + return 0; } void *BasesTest::th1_3(void *st) @@ -70,6 +72,7 @@ void *BasesTest::th1_3(void *st) char myName=*((char *) st); _glob<< myName << _var++; _s1.post(); + return 0; } void *BasesTest::th2_1(void *) @@ -86,6 +89,7 @@ void *BasesTest::th2_1(void *) _m.unlock(); Thread::sleep(100000); } + return 0; } void *BasesTest::myFunc(void *n) @@ -103,7 +107,8 @@ void *BasesTest::myFunc(void *n) DEBTRACE("thread " << id << " frees " << i << " resources"); free_resources(id, i); } -} + return 0; + } void BasesTest::get_resources(int id, int amount) { @@ -201,7 +206,7 @@ void BasesTest::test3() } for (i=0; i unsigned Bloc::appendIfAlreadyFound(std::list< std::vector >& res, const std::vector& startRes, Node *node, std::map >& fastFinder) { - std::map >::const_iterator iter=fastFinder.find(node); + std::map >::iterator iter=fastFinder.find(node); if(iter==fastFinder.end()) return 0; unsigned ret=0; std::vector::iterator, std::set::iterator > > li; - li.push_back(std::pair::iterator, std::set::iterator>(((*iter).second).begin(),((*iter).second).end())); + std::pair::iterator, std::set::iterator> ipr(((*iter).second).begin(),((*iter).second).end()); + li.push_back(ipr); std::vector work(startRes); std::list< std::vector >::iterator where=res.end(); where--; std::list< std::vector >::iterator updates=where; @@ -144,8 +145,9 @@ namespace YACS } else { - const std::set& s=fastFinder[*(li.back().first)]; - li.push_back(std::pair::iterator, std::set::iterator>(s.begin(),s.end())); + std::set& s=fastFinder[*(li.back().first)]; + std::pair::iterator, std::set::iterator> pr(s.begin(),s.end()); + li.push_back(pr); } } else diff --git a/src/engine/SharedPtr.hxx b/src/engine/SharedPtr.hxx index d1150711b..a1dcf2cae 100644 --- a/src/engine/SharedPtr.hxx +++ b/src/engine/SharedPtr.hxx @@ -53,6 +53,7 @@ SharedPtr &SharedPtr::operator=(const SharedPtr& other) _ptr->decrRef(); _ptr=other._ptr; _ptr->incrRef(); + return *this; } template diff --git a/src/engine/Test/CMakeLists.txt b/src/engine/Test/CMakeLists.txt index 681c9c113..d39ec21ab 100644 --- a/src/engine/Test/CMakeLists.txt +++ b/src/engine/Test/CMakeLists.txt @@ -35,6 +35,15 @@ SET(_link_LIBRARIES YACSBases ) +# additional preprocessor / compiler flags +ADD_DEFINITIONS( + ${OMNIORB_DEFINITIONS} +) + +IF(WIN32) + ADD_DEFINITIONS(-DNOGDI) +ENDIF(WIN32) + # --- sources --- SET(PluginOptEvTest1_SOURCES diff --git a/src/engine/Test/ContainerTest.cxx b/src/engine/Test/ContainerTest.cxx index fce21bacb..b64089408 100644 --- a/src/engine/Test/ContainerTest.cxx +++ b/src/engine/Test/ContainerTest.cxx @@ -49,7 +49,7 @@ bool ContainerTest::isAlreadyStarted(const ComponentInstance *inst) const return _alreadyStarted; } -void ContainerTest::start(const ComponentInstance *inst) throw(Exception) +void ContainerTest::start(const ComponentInstance *inst) throw(YACS::Exception) { if(_alreadyStarted) throw Exception("ContainerTest already started !!!!"); @@ -67,7 +67,7 @@ Container *ContainerTest::clone() const return new ContainerTest; } -void ContainerTest::checkCapabilityToDealWith(const ComponentInstance *inst) const throw(Exception) +void ContainerTest::checkCapabilityToDealWith(const ComponentInstance *inst) const throw(YACS::Exception) { if(inst->getKind()!=SUPPORTED_COMP_KIND) throw Exception("ContainerTest not compatible with this type of instance."); @@ -87,7 +87,7 @@ bool ContainerTest2::isAlreadyStarted(const ComponentInstance *inst) const return _alreadyStarted; } -void ContainerTest2::start(const ComponentInstance *inst) throw(Exception) +void ContainerTest2::start(const ComponentInstance *inst) throw(YACS::Exception) { if(_alreadyStarted) throw Exception("ContainerTest already started !!!!"); @@ -110,7 +110,7 @@ void ContainerTest2::initAllContainers() _counter=0; } -void ContainerTest2::checkCapabilityToDealWith(const ComponentInstance *inst) const throw(Exception) +void ContainerTest2::checkCapabilityToDealWith(const ComponentInstance *inst) const throw(YACS::Exception) { if(inst->getKind()!=SUPPORTED_COMP_KIND) throw Exception("ContainerTest not compatible with this type of instance."); diff --git a/src/engine/Test/RuntimeForEngineIntegrationTest.cxx b/src/engine/Test/RuntimeForEngineIntegrationTest.cxx index ec6e184f8..6d2c4d9bc 100644 --- a/src/engine/Test/RuntimeForEngineIntegrationTest.cxx +++ b/src/engine/Test/RuntimeForEngineIntegrationTest.cxx @@ -19,11 +19,13 @@ #include "RuntimeForEngineIntegrationTest.hxx" #include "ComponentInstanceTest.hxx" +#include "Exception.hxx" #include "ToyNode.hxx" #include "TypeCode.hxx" #include +#include + -using namespace std; using namespace YACS::ENGINE; void RuntimeForEngineIntegrationTest::setRuntime() @@ -32,17 +34,17 @@ void RuntimeForEngineIntegrationTest::setRuntime() Runtime::_singleton = new RuntimeForEngineIntegrationTest; } -ElementaryNode* RuntimeForEngineIntegrationTest::createNode(const string& implementation, const string& name) throw(Exception) +ElementaryNode* RuntimeForEngineIntegrationTest::createNode(const std::string& implementation, const std::string& name) throw (YACS::Exception) { if (implementation == ToyNode::MY_IMPL_NAME) return new ToyNode(name); else if(implementation == LimitNode::MY_IMPL_NAME) return new LimitNode(name); - string what="RuntimeForEngineIntegrationTest does not handle this implementation: " + implementation; - throw Exception(what); + std::string what="RuntimeForEngineIntegrationTest does not handle this implementation: " + implementation; + throw YACS::Exception(what); } -InputPort* RuntimeForEngineIntegrationTest::createInputPort(const string& name, const string& impl, Node * node, TypeCode * type) +InputPort* RuntimeForEngineIntegrationTest::createInputPort(const std::string& name, const std::string& impl, Node * node, TypeCode * type) { if(impl == ToyNode::MY_IMPL_NAME) { @@ -52,12 +54,12 @@ InputPort* RuntimeForEngineIntegrationTest::createInputPort(const string& name, } else if(impl == LimitNode::MY_IMPL_NAME) throw Exception("InputPort creation not allowed for LimitNode"); - ostringstream msg; + std::ostringstream msg; msg << "Cannot create " << impl << " OutputPort" ; - throw Exception(msg.str()); + throw YACS::Exception(msg.str()); } -OutputPort* RuntimeForEngineIntegrationTest::createOutputPort(const string& name, const string& impl, Node * node, TypeCode * type) +OutputPort* RuntimeForEngineIntegrationTest::createOutputPort(const std::string& name, const std::string& impl, Node * node, TypeCode * type) { if(impl == ToyNode::MY_IMPL_NAME) { @@ -67,12 +69,12 @@ OutputPort* RuntimeForEngineIntegrationTest::createOutputPort(const string& name } else if(impl == LimitNode::MY_IMPL_NAME) throw Exception("OutputPort creation not allowed for LimitNode"); - stringstream msg; + std::stringstream msg; msg << "Cannot create " << impl << " OutputPort" ; throw Exception(msg.str()); } -InputPort* RuntimeForEngineIntegrationTest::adapt(InputPort* source, const string& impl,TypeCode * type,bool init) throw (ConversionException) +InputPort* RuntimeForEngineIntegrationTest::adapt(InputPort* source, const std::string& impl,TypeCode * type,bool init) throw (ConversionException) { return new ProxyPort(source); } @@ -90,7 +92,7 @@ ComponentInstance* RuntimeForEngineIntegrationTest::createComponentInstance(cons return new ComponentInstanceTest2(name); else { - string msg("RuntimeForEngineIntegrationTest::createComponentInstance : Unable to crate component with kind \""); + std::string msg("RuntimeForEngineIntegrationTest::createComponentInstance : Unable to crate component with kind \""); msg+=kind; msg+="\""; throw Exception(msg); } diff --git a/src/engine/Test/RuntimeForEngineTest.cxx b/src/engine/Test/RuntimeForEngineTest.cxx index efe10df03..ae471cce9 100644 --- a/src/engine/Test/RuntimeForEngineTest.cxx +++ b/src/engine/Test/RuntimeForEngineTest.cxx @@ -54,7 +54,7 @@ InputPort *TestElemInputPort::clone(Node *newHelder) const return new TestElemInputPort(*this,newHelder); } -void *TestElemInputPort::get() const throw(Exception) +void *TestElemInputPort::get() const throw(YACS::Exception) { stringstream msg; msg << "Not implemented (" << __FILE__ << ":" << __LINE__ << ")"; @@ -106,7 +106,7 @@ void RuntimeForEngineTest::setRuntime() Runtime::_singleton = new RuntimeForEngineTest; } -ElementaryNode* RuntimeForEngineTest::createNode(const string& implementation, const string& name) throw(Exception) +ElementaryNode* RuntimeForEngineTest::createNode(const string& implementation, const string& name) throw(YACS::Exception) { return new TestElemNode(name); } diff --git a/src/engine/Test/ToyNode.cxx b/src/engine/Test/ToyNode.cxx index e55b2ca56..630b5ed6d 100644 --- a/src/engine/Test/ToyNode.cxx +++ b/src/engine/Test/ToyNode.cxx @@ -77,7 +77,7 @@ bool InputToyPort::edIsManuallyInitialized() const return _initData!=0; } -void *InputToyPort::get() const throw(Exception) +void *InputToyPort::get() const throw(YACS::Exception) { return (void *)_data; } @@ -215,7 +215,7 @@ int ToyNode::getNumberOfOutputPorts() const return ElementaryNode::getNumberOfInputPorts()+1; } -OutputPort *ToyNode::getOutputPort(const std::string& name) const throw(Exception) +OutputPort *ToyNode::getOutputPort(const std::string& name) const throw(YACS::Exception) { if(name==NAME_FOR_NB) return (OutputPort *)&_nbOfInputsPort; @@ -331,7 +331,7 @@ std::list SeqToyNode::getSetOfInputPort() const return ret; } -InputPort *SeqToyNode::getInputPort(const std::string& name) const throw(Exception) +InputPort *SeqToyNode::getInputPort(const std::string& name) const throw(YACS::Exception) { if(name==NAME_NBOFELTS_INSEQ_INPRT) return (InputPort *)&_inIntValue; @@ -351,7 +351,7 @@ std::list SeqToyNode::getSetOfOutputPort() const return ret; } -OutputPort *SeqToyNode::getOutputPort(const std::string& name) const throw(Exception) +OutputPort *SeqToyNode::getOutputPort(const std::string& name) const throw(YACS::Exception) { if(name==NAME_SEQ_OUTPRT) return (OutputPort *)&_seqOut; @@ -414,7 +414,7 @@ std::list Seq2ToyNode::getSetOfInputPort() const return ret; } -InputPort *Seq2ToyNode::getInputPort(const std::string& name) const throw(Exception) +InputPort *Seq2ToyNode::getInputPort(const std::string& name) const throw(YACS::Exception) { if(name==NAME_SEQ_INPRT1) return (InputPort *)&_inValue1; @@ -436,7 +436,7 @@ std::list Seq2ToyNode::getSetOfOutputPort() const return ret; } -OutputPort *Seq2ToyNode::getOutputPort(const std::string& name) const throw(Exception) +OutputPort *Seq2ToyNode::getOutputPort(const std::string& name) const throw(YACS::Exception) { if(name==NAME_SEQ_OUTPRT) return (OutputPort *)&_seqOut; @@ -514,7 +514,7 @@ std::list Seq3ToyNode::getSetOfInputPort() const return ret; } -InputPort *Seq3ToyNode::getInputPort(const std::string& name) const throw(Exception) +InputPort *Seq3ToyNode::getInputPort(const std::string& name) const throw(YACS::Exception) { if(name==NAME_SEQ_INPRT1) return (InputPort *)&_inValue1; @@ -536,7 +536,7 @@ std::list Seq3ToyNode::getSetOfOutputPort() const return ret; } -OutputPort *Seq3ToyNode::getOutputPort(const std::string& name) const throw(Exception) +OutputPort *Seq3ToyNode::getOutputPort(const std::string& name) const throw(YACS::Exception) { if(name==NAME_SEQ_OUTPRT) return (OutputPort *)&_seqOut; @@ -581,7 +581,7 @@ bool InputLimitPort::edIsManuallyInitialized() const return _initData!=0; } -void *InputLimitPort::get() const throw(Exception) +void *InputLimitPort::get() const throw(YACS::Exception) { if(!_data) { @@ -705,7 +705,7 @@ std::list LimitNode::getSetOfOutputPort() const return ret; } -InputPort *LimitNode::getInputPort(const std::string& name) const throw(Exception) +InputPort *LimitNode::getInputPort(const std::string& name) const throw(YACS::Exception) { if(name==NAME_FOR_SWPORT) return (InputPort *)&_entry; @@ -713,7 +713,7 @@ InputPort *LimitNode::getInputPort(const std::string& name) const throw(Exceptio return ElementaryNode::getInputPort(name); } -OutputPort *LimitNode::getOutputPort(const std::string& name) const throw(Exception) +OutputPort *LimitNode::getOutputPort(const std::string& name) const throw(YACS::Exception) { if(name==NAME_FOR_SWPORT) return (OutputPort *)&_switchPort; diff --git a/src/engine/Test/engineIntegrationTest.cxx b/src/engine/Test/engineIntegrationTest.cxx index f2c3822c5..cb38a3d09 100644 --- a/src/engine/Test/engineIntegrationTest.cxx +++ b/src/engine/Test/engineIntegrationTest.cxx @@ -2593,11 +2593,11 @@ void EngineIntegrationTest::testForOptimizerLoop1() CPPUNIT_ASSERT(!info.areWarningsOrErrors()); exe.RunW(graph); CPPUNIT_ASSERT_DOUBLES_EQUAL(45.6,((OutputToyPort*)o2_1)->get()->getDoubleValue(),DBL_PRECISION_COMPARE ); - CPPUNIT_ASSERT(8==(int)opt->getNumberOfEltsConsumed() or 7==(int)opt->getNumberOfEltsConsumed()); + CPPUNIT_ASSERT(8==(int)opt->getNumberOfEltsConsumed() || 7==(int)opt->getNumberOfEltsConsumed()); CPPUNIT_ASSERT_EQUAL(2,(int)((DynParaLoop *)(opt))->getNumberOfBranchesCreatedDyn()); exe.RunW(graph); CPPUNIT_ASSERT_DOUBLES_EQUAL(45.6,((OutputToyPort*)o2_1)->get()->getDoubleValue(),DBL_PRECISION_COMPARE ); - CPPUNIT_ASSERT(8==(int)opt->getNumberOfEltsConsumed() or 7==(int)opt->getNumberOfEltsConsumed()); + CPPUNIT_ASSERT(8==(int)opt->getNumberOfEltsConsumed() || 7==(int)opt->getNumberOfEltsConsumed()); CPPUNIT_ASSERT_EQUAL(2,(int)((DynParaLoop *)(opt))->getNumberOfBranchesCreatedDyn()); Bloc *clone=(Bloc *)graph->clone(0); delete graph; @@ -2605,11 +2605,11 @@ void EngineIntegrationTest::testForOptimizerLoop1() CPPUNIT_ASSERT(!info.areWarningsOrErrors()); exe.RunW(clone); CPPUNIT_ASSERT_DOUBLES_EQUAL(45.6,((OutputToyPort*)(clone->getOutPort("T2.o1")))->get()->getDoubleValue(),DBL_PRECISION_COMPARE ); - CPPUNIT_ASSERT(8==(int)((OptimizerLoop *)(clone->getChildByName("myOptWthAlgSync")))->getNumberOfEltsConsumed() or 7==(int)((OptimizerLoop *)(clone->getChildByName("myOptWthAlgSync")))->getNumberOfEltsConsumed()); + CPPUNIT_ASSERT(8==(int)((OptimizerLoop *)(clone->getChildByName("myOptWthAlgSync")))->getNumberOfEltsConsumed() || 7==(int)((OptimizerLoop *)(clone->getChildByName("myOptWthAlgSync")))->getNumberOfEltsConsumed()); CPPUNIT_ASSERT_EQUAL(2,(int)((OptimizerLoop *)(clone->getChildByName("myOptWthAlgSync")))->getNumberOfBranchesCreatedDyn()); exe.RunW(clone); CPPUNIT_ASSERT_DOUBLES_EQUAL(45.6,((OutputToyPort*)(clone->getOutPort("T2.o1")))->get()->getDoubleValue(),DBL_PRECISION_COMPARE ); - CPPUNIT_ASSERT(8==(int)((OptimizerLoop *)(clone->getChildByName("myOptWthAlgSync")))->getNumberOfEltsConsumed() or 7==(int)((OptimizerLoop *)(clone->getChildByName("myOptWthAlgSync")))->getNumberOfEltsConsumed()); + CPPUNIT_ASSERT(8==(int)((OptimizerLoop *)(clone->getChildByName("myOptWthAlgSync")))->getNumberOfEltsConsumed() || 7==(int)((OptimizerLoop *)(clone->getChildByName("myOptWthAlgSync")))->getNumberOfEltsConsumed()); CPPUNIT_ASSERT_EQUAL(2,(int)((OptimizerLoop *)(clone->getChildByName("myOptWthAlgSync")))->getNumberOfBranchesCreatedDyn()); delete clone; } @@ -2645,11 +2645,11 @@ void EngineIntegrationTest::testForOptimizerLoop2() CPPUNIT_ASSERT(!info.areWarningsOrErrors()); exe.RunW(graph); CPPUNIT_ASSERT_DOUBLES_EQUAL(45.6,((OutputToyPort*)o2_1)->get()->getDoubleValue(),DBL_PRECISION_COMPARE ); - CPPUNIT_ASSERT(8==(int)opt->getNumberOfEltsConsumed() or 7==(int)opt->getNumberOfEltsConsumed()); + CPPUNIT_ASSERT(8==(int)opt->getNumberOfEltsConsumed() || 7==(int)opt->getNumberOfEltsConsumed()); CPPUNIT_ASSERT_EQUAL(2,(int)((DynParaLoop *)(opt))->getNumberOfBranchesCreatedDyn()); exe.RunW(graph); CPPUNIT_ASSERT_DOUBLES_EQUAL(45.6,((OutputToyPort*)o2_1)->get()->getDoubleValue(),DBL_PRECISION_COMPARE ); - CPPUNIT_ASSERT(8==(int)opt->getNumberOfEltsConsumed() or 7==(int)opt->getNumberOfEltsConsumed()); + CPPUNIT_ASSERT(8==(int)opt->getNumberOfEltsConsumed() || 7==(int)opt->getNumberOfEltsConsumed()); CPPUNIT_ASSERT_EQUAL(2,(int)((DynParaLoop *)(opt))->getNumberOfBranchesCreatedDyn()); Bloc *clone=(Bloc *)graph->clone(0); delete graph; @@ -2657,11 +2657,11 @@ void EngineIntegrationTest::testForOptimizerLoop2() CPPUNIT_ASSERT(!info.areWarningsOrErrors()); exe.RunW(clone); CPPUNIT_ASSERT_DOUBLES_EQUAL(45.6,((OutputToyPort*)(clone->getOutPort("T2.o1")))->get()->getDoubleValue(),DBL_PRECISION_COMPARE ); - CPPUNIT_ASSERT(8==(int)((OptimizerLoop *)(clone->getChildByName("myOptWthAlgSync")))->getNumberOfEltsConsumed() or 7==(int)((OptimizerLoop *)(clone->getChildByName("myOptWthAlgSync")))->getNumberOfEltsConsumed()); + CPPUNIT_ASSERT(8==(int)((OptimizerLoop *)(clone->getChildByName("myOptWthAlgSync")))->getNumberOfEltsConsumed() || 7==(int)((OptimizerLoop *)(clone->getChildByName("myOptWthAlgSync")))->getNumberOfEltsConsumed()); CPPUNIT_ASSERT_EQUAL(2,(int)((OptimizerLoop *)(clone->getChildByName("myOptWthAlgSync")))->getNumberOfBranchesCreatedDyn()); exe.RunW(clone); CPPUNIT_ASSERT_DOUBLES_EQUAL(45.6,((OutputToyPort*)(clone->getOutPort("T2.o1")))->get()->getDoubleValue(),DBL_PRECISION_COMPARE ); - CPPUNIT_ASSERT(8==(int)((OptimizerLoop *)(clone->getChildByName("myOptWthAlgSync")))->getNumberOfEltsConsumed() or 7==(int)((OptimizerLoop *)(clone->getChildByName("myOptWthAlgSync")))->getNumberOfEltsConsumed()); + CPPUNIT_ASSERT(8==(int)((OptimizerLoop *)(clone->getChildByName("myOptWthAlgSync")))->getNumberOfEltsConsumed() || 7==(int)((OptimizerLoop *)(clone->getChildByName("myOptWthAlgSync")))->getNumberOfEltsConsumed()); CPPUNIT_ASSERT_EQUAL(2,(int)((OptimizerLoop *)(clone->getChildByName("myOptWthAlgSync")))->getNumberOfBranchesCreatedDyn()); delete clone; } diff --git a/src/engine/Test/engineIntegrationTest.hxx b/src/engine/Test/engineIntegrationTest.hxx index 0c9736e2a..bb72ba46b 100644 --- a/src/engine/Test/engineIntegrationTest.hxx +++ b/src/engine/Test/engineIntegrationTest.hxx @@ -132,8 +132,8 @@ namespace YACS template void EngineIntegrationTest::checkSetsEqual(const std::set& setToTest1, const std::set& setToTest2) { - typename std::set::iterator iter1=setToTest1.begin(); - typename std::set::iterator iter2=setToTest2.begin(); + typename std::set::const_iterator iter1=setToTest1.begin(); + typename std::set::const_iterator iter2=setToTest2.begin(); CPPUNIT_ASSERT_EQUAL_MESSAGE("Sets can't be equal : size different", (int)setToTest1.size(), (int)setToTest2.size()); for(;iter1!=setToTest1.end();iter1++,iter2++) CPPUNIT_ASSERT_MESSAGE("Sets can't be equal : value different", *iter1==*iter2); @@ -142,7 +142,7 @@ namespace YACS template void EngineIntegrationTest::checkSetsNotEqual(const std::set& setToTest1, const std::set&setToTest2) { - typename std::set::iterator iter1=setToTest1.begin(); + typename std::set::const_iterator iter1=setToTest1.begin(); CPPUNIT_ASSERT_EQUAL_MESSAGE("Sets can't be equal : size different", (int)setToTest1.size(), (int)setToTest2.size()); for(;iter1!=setToTest1.end();iter1++) CPPUNIT_ASSERT_MESSAGE("Elements is in set : not expected.",setToTest2.find(*iter1)==setToTest2.end()); diff --git a/src/runtime/CppComponent.hxx b/src/runtime/CppComponent.hxx index 6a5100462..7f35516ae 100644 --- a/src/runtime/CppComponent.hxx +++ b/src/runtime/CppComponent.hxx @@ -22,6 +22,7 @@ #include #include "ComponentInstance.hxx" +#include "YACSRuntimeSALOMEExport.hxx" namespace YACS { @@ -40,7 +41,7 @@ namespace YACS typedef void (*TerminateFunction)(void **); typedef void (*PingFunction) (); - class CppComponent : public ComponentInstance { + class YACSRUNTIMESALOME_EXPORT CppComponent : public ComponentInstance { public: CppComponent(const std::string & name); diff --git a/src/runtime/CppNode.hxx b/src/runtime/CppNode.hxx index ba7eabde9..a96c629b0 100644 --- a/src/runtime/CppNode.hxx +++ b/src/runtime/CppNode.hxx @@ -21,6 +21,7 @@ #define _CPPNODE_HXX_ #include "ServiceNode.hxx" +#include "YACSRuntimeSALOMEExport.hxx" namespace YACS { @@ -42,7 +43,7 @@ namespace YACS * \ingroup Nodes * */ - class CppNode : public YACS::ENGINE::ServiceNode + class YACSRUNTIMESALOME_EXPORT CppNode : public YACS::ENGINE::ServiceNode { protected: Node *simpleClone(ComposedNode *father, bool editionOnly) const; diff --git a/src/runtime/Test/CMakeLists.txt b/src/runtime/Test/CMakeLists.txt index f39fc7732..408ebe184 100644 --- a/src/runtime/Test/CMakeLists.txt +++ b/src/runtime/Test/CMakeLists.txt @@ -39,9 +39,15 @@ INCLUDE_DIRECTORIES( # additional preprocessor / compiler flags ADD_DEFINITIONS( ${PTHREAD_DEFINITIONS} + ${OMNIORB_DEFINITIONS} -DUSE_CPPUNIT ) +IF(WIN32) + ADD_DEFINITIONS(-DNOGDI) +ENDIF(WIN32) + + # --- sources --- # idl files diff --git a/src/yacsloader/Test/CMakeLists.txt b/src/yacsloader/Test/CMakeLists.txt index 6515eb24b..5e83614ec 100644 --- a/src/yacsloader/Test/CMakeLists.txt +++ b/src/yacsloader/Test/CMakeLists.txt @@ -37,6 +37,16 @@ INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_BINARY_DIR} ) +# additional preprocessor / compiler flags +ADD_DEFINITIONS( + ${OMNIORB_DEFINITIONS} +) + +IF(WIN32) + ADD_DEFINITIONS(-DNOGDI) +ENDIF(WIN32) + + # --- sources --- # idl files