none
migrer du code std vers du code managed: problème de constructeur RRS feed

  • Question

  • bonjour;

    Toujours dans ma migration de code std en managed je butte sur un nouveau problème: le constructeur est vu comme non managé dans un code managé? Je vous donne les éléments du source et du header, ainsi que le diagnostique du compilateur.

    le header:

    /*******************************************************************************
    * NOM: Chunker.h
    * ROLE:
    * HISTORIQUE:
    * 05/05/2003, yab, initial version
    *******************************************************************************/
    #ifndef CHUNKER_H
    #define CHUNKER_H
    #pragma managed
    /*_____INCLUDE-FILES__________________________________________________________*/
    /*_____GLOBAL-DEFINE__________________________________________________________*/
    #define OPTION_SECTION_CCHUNKER                               L"CCHUNKER"
    
    #define OPTION_KEYNAME_VERB_FRENCH                            L"VERB_FRENCH"
    #define OPTION_KEYNAME_NOUN_FRENCH                            L"NOUN_FRENCH"
    #define OPTION_KEYNAME_PRESTOPPER_FRENCH                      L"PRESTOPPER_FRENCH"
    #define OPTION_KEYNAME_POSTSTOPPER_FRENCH                     L"POSTSTOPPER_FRENCH"
    #define OPTION_KEYNAME_FUNCT_FRENCH                           L"FUNCT_FRENCH"
    #define OPTION_KEYNAME_LEMMA_NON_STOPPER_FRENCH               L"LEMMA_NON_STOPPER_FRENCH"
    
    
    #define OPTION_KEYNAME_VERB_ENGLISH                           L"VERB_ENGLISH"
    #define OPTION_KEYNAME_NOUN_ENGLISH                           L"NOUN_ENGLISH"
    #define OPTION_KEYNAME_PRESTOPPER_ENGLISH                     L"PRESTOPPER_ENGLISH"
    #define OPTION_KEYNAME_POSTSTOPPER_ENGLISH                    L"POSTSTOPPER_ENGLISH"
    #define OPTION_KEYNAME_FUNCT_ENGLISH                          L"FUNCT_ENGLISH"
    #define OPTION_KEYNAME_LEMMA_STOPPER_ENGLISH                  L"LEMMA_STOPPER_ENGLISH"
    
    
    #define OPTION_KEYNAME_VERB_SPANISH                           L"VERB_SPANISH"
    #define OPTION_KEYNAME_NOUN_SPANISH                           L"NOUN_SPANISH"
    #define OPTION_KEYNAME_PRESTOPPER_SPANISH                     L"PRESTOPPER_SPANISH"
    #define OPTION_KEYNAME_POSTSTOPPER_SPANISH                    L"POSTSTOPPER_SPANISH"
    #define OPTION_KEYNAME_FUNCT_SPANISH                          L"FUNCT_SPANISH"
    #define OPTION_KEYNAME_LEMMA_NON_STOPPER_SPANISH              L"LEMMA_NON_STOPPER_SPANISH"
    
    
    #define OPTION_KEYNAME_VERB_ITALIAN                           L"VERB_ITALIAN"
    #define OPTION_KEYNAME_NOUN_ITALIAN                           L"NOUN_ITALIAN"
    #define OPTION_KEYNAME_PRESTOPPER_ITALIAN                     L"PRESTOPPER_ITALIAN"
    #define OPTION_KEYNAME_POSTSTOPPER_ITALIAN                    L"POSTSTOPPER_ITALIAN"
    #define OPTION_KEYNAME_FUNCT_ITALIAN                          L"FUNCT_ITALIAN"
    #define OPTION_KEYNAME_LEMMA_NON_STOPPER_ITALIAN              L"LEMMA_NON_STOPPER_ITALIAN"
    
    
    #define OPTION_KEYNAME_VERB_GERMAN                            L"VERB_GERMAN"
    #define OPTION_KEYNAME_NOUN_GERMAN                            L"NOUN_GERMAN"
    #define OPTION_KEYNAME_PRESTOPPER_GERMAN                      L"PRESTOPPER_GERMAN"
    #define OPTION_KEYNAME_POSTSTOPPER_GERMAN                     L"POSTSTOPPER_GERMAN"
    #define OPTION_KEYNAME_FUNCT_GERMAN                           L"FUNCT_GERMAN"
    #define OPTION_KEYNAME_LEMMA_NON_STOPPER_GERMAN               L"LEMMA_NON_STOPPER_GERMAN"
    
    /*_____GLOBAL-TYPES___________________________________________________________*/
    
    /*_____GLOBAL-DATA____________________________________________________________*/
    
    /*_____GLOBAL-MACROS__________________________________________________________*/
    /*_____GLOBAL-FUNCTIONS-PROTOTYPES____________________________________________*/
    namespace SpecificationLoader
    {
        using namespace System;
    	using namespace System::ComponentModel;
    	using namespace System::Collections;
    	using namespace System::Windows::Forms;
    	using namespace System::Data;
    	using namespace System::Drawing;
    	using namespace System::IO;
    
    
    /*_____CLASS-DEFINITION_______________________________________________________*/
    
    	ref class CChunker
    	{
    	private:
    		List<enPOSM> m_ListPosVerb;                 //Pos List for verb chunk type
    		List<enPOSM> m_ListPosNoun;                 //Pos List for noun chunk type
    		List<enPOSM> m_ListPostStopper;             //Pos List for poststopper chunk type
    		List<enPOSM> m_ListPreStopper;              //Pos List for prestopper chunk type
    		List<enPOSM> m_ListPosFunct;                //Pos List for function chunk type
    		List<System::String^>^ mp_wsListLemmaNonStopper;//Lemma Stopper list
    		public enum class enCChunkerMethod
    		{
              SPLIT_INTO_CHUNK =1,
    		};
    	public:
    		CChunker::CChunker();
    		CChunker::~CChunker();
    		static CChunker^ objChunker;
    		enPOSM CChunker::TestPosType( CAnalysedWordM^ pWord);
    		erc CChunker::SplitIntoChunk( CAnalysedSegmentM^ pSegment, System::String^ id);
    		//                                                                         1                                                        2                       3                   4            5                6                  7                                                   8
    		CAnalysedChunkM^ CChunker::AnalyseCurrentVerbSyntagme( CLinguisticSegmentM^ pLinguisticSegment, List<CAnalysedWordM^>::Enumerator& itWord, CAnalysedChunkM^ pCurrentChunk, int& Step, enPOSM& DrivingPos, bool bMarkOngoing, bool bPivotPending, List<CAnalysedWordM^>::Enumerator& itEndWord);
    		CAnalysedChunkM^ CChunker::AnalyseCurrentNounSyntagme( CLinguisticSegmentM^ pLinguisticSegment, List<CAnalysedWordM^>::Enumerator& itWord, CAnalysedChunkM^ pCurrentChunk, int & Step, enPOSM& DrivingPos, bool bMarkOngoing, bool bPivotPending);
    		CAnalysedChunkM^ CChunker::InitiateCurrentNounSyntagme( CLinguisticSegmentM^ pLinguisticSegment, List<CAnalysedWordM^>::Enumerator& itWord, CAnalysedChunkM^ pCurrentChunk, int& Step, enPOSM& DrivingPos, bool bMarkOngoing, bool bPivotPending);
    		CAnalysedChunkM^ CChunker::InitiateCurrentVerbSyntagme( CLinguisticSegmentM^ pLinguisticSegment, List<CAnalysedWordM^>::Enumerator& itWord, CAnalysedChunkM^ pCurrentChunk, int& Step, enPOSM& DrivingPos, bool bMarkOngoing, bool bPivotPending);
    		bool CChunker::IsSameChunkType( enChunkTypeM TypeOfPreviousWord, CAnalysedWordM^ pWord);
    		enChunkTypeM CChunker::NewPosType( CAnalysedWordM^ pWord, CAnalysedWordM^ pNextWord);
    		CAnalysedWordM^ CChunker::SetMark( System::String^ wsMark, enPOSM POS, int len);
    	};
    };
    extern bool m_bOptionProblem;                   //To know if Option Mananger have done his work or not
    #endif /* CHUNKER_H */

    les éléments du code

    /*_____INCLUDE-FILES__________________________________________________________*/
    #pragma managed 
    #include "StdAfx.h"
    #include "ibase.h"
    #include "IBPP.h"
    #include "AlignStructure.h"
    #include "Macro.h"
    #include "Enumerations.hpp"
    #include "EnumerationM.hpp"
    #include "StructureM.h"
    #include "Structure.h"
    #include "TypeDefs.hpp"
    #include "TypeDefsM.hpp"
    #include "Bloc.hpp"
    #include "POS.h"
    #include "POSM.h"
    #include "LinkDescription.h"
    #include "ClassesAligner.hpp"
    #include "ClasseAlignerManaged.hpp"
    /*_____NAMESPACE-DATA_____________________________________________________________*/
    namespace SpecificationLoader
    {
        using namespace System;
    	using namespace System::ComponentModel;
    	using namespace System::Collections;
    	using namespace System::Windows::Forms;
    	using namespace System::Data;
    	using namespace System::Drawing;
    	using namespace System::IO;
    //
    /*---------------------------------------------------------------*/
    /*                CLASS CHUNKER                                  */
    /*---------------------------------------------------------------*/
    /*This module determines how a chunk  is made. Segments are      */
    /*splitted according to grammatical composition. A chunk is one, */
    /*two or more POS which have grammatically the same type.For each*/
    /*language it's necessary to define categories in order torespect*/
    /*linguistic specificities so,each specificities will be stored  */
    /*in the CHUNKS File. This special file comes from OPTION MANAGER*/
    /*---------------------------------------------------------------*/
    //
    /*---------------------------------------------------------------*/
    /*Name          : Constructor                                    */
    /*---------------------------------------------------------------*/
    	CChunker::CChunker( )
    121	{ // 1
    		enLanguageM^ Language = (enLanguageM)2;
    		m_bOptionProblem = false;
    		List<System::String^>::Enumerator itStringPos;
    		List<System::String^>^ pListPreStopper = gcnew List<System::String^>;
    		List<System::String^>^ pListPosVerb = gcnew List<System::String^>;
    		List<System::String^>^ pListPosNoun = gcnew List<System::String^>;
    		List<System::String^>^ pListPosFunct = gcnew List<System::String^>;
    		List<System::String^>^ pListPostStopper = gcnew List<System::String^>;
    		List<System::String^>^ pListLemmaNonStopper = gcnew List<System::String^>;
    		List<System::String^>^ wsListPreStopper = pListPreStopper;
    		List<System::String^>^ wsListPosVerb = pListPosVerb;
    		List<System::String^>^ wsListPosNoun = pListPosNoun;
    		List<System::String^>^ wsListPosFunct = pListPosFunct;
    		List<System::String^>^ wsListPostStopper = pListPostStopper;
    		List<System::String^>^ wsListLemmaNonStopper = pListLemmaNonStopper;
    		CPOSM^ pPos;
    
    		pPos = gcnew CPOSM();
    		switch(Language)
    		{ // 2
    			case LANGUAGE_FRENCH :
    				{ // 3
    					if(COption::GetStringList((std::wstring)OPTION_SECTION_CCHUNKER,(std::wstring)OPTION_KEYNAME_VERB_FRENCH, wsListPosVerb ,%wsListPosVerb)!= INIT_NO_ERROR){m_bOptionProblem = true;}
    					if(COption::GetStringList((std::wstring)OPTION_SECTION_CCHUNKER,(std::wstring)OPTION_KEYNAME_NOUN_FRENCH, wsListPosNoun, %wsListPosNoun)!= INIT_NO_ERROR){m_bOptionProblem = true;}
    					if(COption::GetStringList((std::wstring)OPTION_SECTION_CCHUNKER,(std::wstring)OPTION_KEYNAME_FUNCT_FRENCH, wsListPosFunct, %wsListPosFunct)!= INIT_NO_ERROR){m_bOptionProblem = true;}
    					if(COption::GetStringList((std::wstring)OPTION_SECTION_CCHUNKER,(std::wstring)OPTION_KEYNAME_PRESTOPPER_FRENCH, wsListPreStopper , %wsListPreStopper)!= INIT_NO_ERROR){m_bOptionProblem = true;}
    					if(COption::GetStringList((std::wstring)OPTION_SECTION_CCHUNKER,(std::wstring)OPTION_KEYNAME_POSTSTOPPER_FRENCH, wsListPostStopper, %wsListPostStopper)!= INIT_NO_ERROR){m_bOptionProblem = true;}
    					if(COption::GetStringList((std::wstring)OPTION_SECTION_CCHUNKER,(std::wstring)OPTION_KEYNAME_LEMMA_NON_STOPPER_FRENCH, wsListLemmaNonStopper, %wsListLemmaNonStopper)!= INIT_NO_ERROR){m_bOptionProblem = true;}
    				}
    				break;
    			case LANGUAGE_ENGLISH :
    				{
    					if(COption::GetStringList((std::wstring)OPTION_SECTION_CCHUNKER,(std::wstring)OPTION_KEYNAME_PRESTOPPER_ENGLISH, wsListPreStopper , %wsListPreStopper)!= INIT_NO_ERROR){m_bOptionProblem = true;}
    					if(COption::GetStringList((std::wstring)OPTION_SECTION_CCHUNKER,(std::wstring)OPTION_KEYNAME_VERB_ENGLISH, wsListPosVerb , %wsListPosVerb)!= INIT_NO_ERROR){m_bOptionProblem = true;}
    					if(COption::GetStringList((std::wstring)OPTION_SECTION_CCHUNKER,(std::wstring)OPTION_KEYNAME_NOUN_ENGLISH, wsListPosNoun, %wsListPosNoun)!= INIT_NO_ERROR){m_bOptionProblem = true;}
    					if(COption::GetStringList((std::wstring)OPTION_SECTION_CCHUNKER,(std::wstring)OPTION_KEYNAME_FUNCT_ENGLISH, wsListPosFunct, %wsListPosFunct)!= INIT_NO_ERROR){m_bOptionProblem = true;}
    					if(COption::GetStringList((std::wstring)OPTION_SECTION_CCHUNKER,(std::wstring)OPTION_KEYNAME_POSTSTOPPER_ENGLISH, wsListPostStopper, &wsListPostStopper)!= INIT_NO_ERROR){m_bOptionProblem = true;}
    					if(COption::GetStringList((std::wstring)OPTION_SECTION_CCHUNKER,(std::wstring)OPTION_KEYNAME_LEMMA_STOPPER_ENGLISH, wsListLemmaNonStopper, %wsListLemmaNonStopper)!= INIT_NO_ERROR){m_bOptionProblem = true;}
    				}
    				break;
    			case LANGUAGE_SPANISH :
    				{
    					if(COption::GetStringList((std::wstring)OPTION_SECTION_CCHUNKER,(std::wstring)OPTION_KEYNAME_PRESTOPPER_SPANISH, wsListPreStopper , %wsListPreStopper)!= INIT_NO_ERROR){m_bOptionProblem = true;}
    					if(COption::GetStringList((std::wstring)OPTION_SECTION_CCHUNKER,(std::wstring)OPTION_KEYNAME_VERB_SPANISH, wsListPosVerb , %wsListPosVerb)!= INIT_NO_ERROR){m_bOptionProblem = true;}
    					if(COption::GetStringList((std::wstring)OPTION_SECTION_CCHUNKER,(std::wstring)OPTION_KEYNAME_NOUN_SPANISH, wsListPosNoun, %wsListPosNoun)!= INIT_NO_ERROR){m_bOptionProblem = true;}
    					if(COption::GetStringList((std::wstring)OPTION_SECTION_CCHUNKER,(std::wstring)OPTION_KEYNAME_FUNCT_SPANISH, wsListPosFunct, %wsListPosFunct)!= INIT_NO_ERROR){m_bOptionProblem = true;}
    					if(COption::GetStringList((std::wstring)OPTION_SECTION_CCHUNKER,(std::wstring)OPTION_KEYNAME_POSTSTOPPER_SPANISH, wsListPostStopper, %wsListPostStopper)!= INIT_NO_ERROR){m_bOptionProblem = true;}
    					if(COption::GetStringList((std::wstring)OPTION_SECTION_CCHUNKER,(std::wstring)OPTION_KEYNAME_LEMMA_NON_STOPPER_SPANISH, wsListLemmaNonStopper, %wsListLemmaNonStopper)!= INIT_NO_ERROR){m_bOptionProblem = true;}
    				}
    				break;
    			case LANGUAGE_ITALIAN :
    				{
    					if(COption::GetStringList((std::wstring)OPTION_SECTION_CCHUNKER,(std::wstring)OPTION_KEYNAME_VERB_ITALIAN, wsListPosVerb , %wsListPosVerb)!= INIT_NO_ERROR){m_bOptionProblem = true;}
    					if(COption::GetStringList((std::wstring)OPTION_SECTION_CCHUNKER,(std::wstring)OPTION_KEYNAME_NOUN_ITALIAN, wsListPosNoun, %wsListPosNoun)!= INIT_NO_ERROR){m_bOptionProblem = true;}
    					if(COption::GetStringList((std::wstring)OPTION_SECTION_CCHUNKER,(std::wstring)OPTION_KEYNAME_FUNCT_ITALIAN, wsListPosFunct, %wsListPosFunct)!= INIT_NO_ERROR){m_bOptionProblem = true;}
    					if(COption::GetStringList((std::wstring)OPTION_SECTION_CCHUNKER,(std::wstring)OPTION_KEYNAME_PRESTOPPER_ITALIAN, wsListPreStopper , &wsListPreStopper)!= INIT_NO_ERROR){m_bOptionProblem = true;}
    					if(COption::GetStringList((std::wstring)OPTION_SECTION_CCHUNKER,(std::wstring)OPTION_KEYNAME_POSTSTOPPER_ITALIAN, wsListPostStopper, &wsListPostStopper)!= INIT_NO_ERROR){m_bOptionProblem = true;}
    					if(COption::GetStringList((std::wstring)OPTION_SECTION_CCHUNKER,(std::wstring)OPTION_KEYNAME_LEMMA_NON_STOPPER_ITALIAN, wsListLemmaNonStopper, %wsListLemmaNonStopper)!= INIT_NO_ERROR){m_bOptionProblem = true;}
    				}
    				break;
    			case LANGUAGE_GERMAN :
    				{
    					if(COption::GetStringList((std::wstring)OPTION_SECTION_CCHUNKER,(std::wstring)OPTION_KEYNAME_VERB_GERMAN, wsListPosVerb , %wsListPosVerb)!= INIT_NO_ERROR){m_bOptionProblem = true;}
    					if(COption::GetStringList((std::wstring)OPTION_SECTION_CCHUNKER,(std::wstring)OPTION_KEYNAME_NOUN_GERMAN, wsListPosNoun, %wsListPosNoun)!= INIT_NO_ERROR){m_bOptionProblem = true;}
    					if(COption::GetStringList((std::wstring)OPTION_SECTION_CCHUNKER,(std::wstring)OPTION_KEYNAME_FUNCT_GERMAN , wsListPosFunct, %wsListPosFunct)!= INIT_NO_ERROR){m_bOptionProblem = true;}
    					if(COption::GetStringList((std::wstring)OPTION_SECTION_CCHUNKER,(std::wstring)OPTION_KEYNAME_PRESTOPPER_GERMAN , wsListPreStopper , &wsListPreStopper)!= INIT_NO_ERROR){m_bOptionProblem = true;}
    					if(COption::GetStringList((std::wstring)OPTION_SECTION_CCHUNKER,(std::wstring)OPTION_KEYNAME_POSTSTOPPER_GERMAN , wsListPostStopper, &wsListPostStopper)!= INIT_NO_ERROR){m_bOptionProblem = true;}
    					if(COption::GetStringList((std::wstring)OPTION_SECTION_CCHUNKER,(std::wstring)OPTION_KEYNAME_LEMMA_NON_STOPPER_GERMAN, wsListLemmaNonStopper, &wsListLemmaNonStopper)!= INIT_NO_ERROR){m_bOptionProblem = true;}
    				} // 3
    				break;
    		} // 2
    		if(m_bOptionProblem == false)
    		{ // 2
    			itStringPos = wsListPosVerb.begin();
    			while( itStringPos != wsListPosVerb.end())
    			{ // 3
    				enPOS curpos = pPos->CPOS::GetPOSWithPOSLabel( *itStringPos);
    				m_ListPosVerb.push_back( curpos);
    				itStringPos++;
    			} // 3
    			itStringPos = wsListPosNoun.begin();
    			while( itStringPos != wsListPosNoun.end())
    			{ // 3
    				enPOS TempPOS = pPos->CPOS::GetPOSWithPOSLabel( *itStringPos);
    				m_ListPosNoun.push_back(TempPOS);
    				itStringPos++;
    			} // 3
    			itStringPos = wsListPostStopper.begin();
    			while (itStringPos != wsListPostStopper.end())
    			{ // 3
    				enPOS TempPOS = pPos->CPOS::GetPOSWithPOSLabel(*itStringPos);
    				m_ListPostStopper.push_back( TempPOS);
    				itStringPos++;
    			} // 3
    			itStringPos = wsListPreStopper.begin();
    			while (itStringPos != wsListPreStopper.end())
    			{ // 3
    				enPOS TempPOS = pPos->CPOS::GetPOSWithPOSLabel(*itStringPos);
    				m_ListPreStopper.push_back(TempPOS);
    				itStringPos++;
    			} // 3
    			itStringPos = wsListPosFunct.begin();
    			while (itStringPos != wsListPosFunct.end())
    			{ // 3
    				m_ListPosFunct.push_back(pPos->CPOS::GetPOSWithPOSLabel(*itStringPos));
    				itStringPos++;
    			} // 3
    			m_wsListLemmaNonStopper.assign(wsListLemmaNonStopper.begin(),wsListLemmaNonStopper.end());
    		} // 2
    		pPos->stPos.pPOS[0] = POS_NONE;
    		pPos->stPos.pPOS[POS_PREP]=  POS_PREP;
    		pPos->stPos.pPOS[POS_ART] = POS_ART;
    		pPos->stPos.pPOS[POS_ADJ] = POS_ADJ;
    		pPos->stPos.pPOS[5] = POS_NB;
    		pPos->stPos.pPOS[6] = POS_MARK;
    		pPos->stPos.pPOS[7] = POS_SENT;
    		pPos->stPos.pPOS[8] = POS_STOPMARK;
    		pPos->stPos.pPOS[9] = POS_COMMA;
    		pPos->stPos.pPOS[10] = POS_CONJ;
    		pPos->stPos.pPOS[11] = POS_PRONOUN;
    		pPos->stPos.pPOS[12] = POS_VERB;
    		pPos->stPos.pPOS[13] = POS_AUX;
    		pPos->stPos.pPOS[14] = POS_ADV;
    		pPos->stPos.pPOS[15] = POS_PAST_PARTICIPLE;
    		pPos->stPos.pPOS[16] = POS_PRESENT_PARTICIPLE;
    		pPos->stPos.pPOS[17] = POS_BLANK;
    		pPos->stPos.pPOS[18] = POS_ABREV;
    		pPos->stPos.pPOS[19] = POS_NAMED_ENTITY;
    		pPos->stPos.pPOS[20] = POS_DECLENCHEUR;
    		pPos->stPos.pPOS[21] = POS_DECLENCHEUR_MOT;
    		pPos->stPos.pPOS[POS_PIVOT] = POS_PIVOT;
    		pPos->stPos.pPOS[POS_OTHER] = POS_OTHER;
    		pPos->stPos.pPOS[NUMBER_OF_POS] = NUMBER_OF_POS;
    	}; // 1

    le diagnostique du compilateur

    1>..\..\..\..\Linguistic\Analyser\src\chunker.cpp(121): error C3280: 'SpecificationLoader::CChunker::CChunker' : une fonction membre d'un type managé ne peut pas être compilée comme fonction non managée
    1>..\..\..\..\Linguistic\Analyser\src\chunker.cpp(121): error C3642: 'System::Collections::Generic::List<T>::List(void)' : impossible d'appeler une fonction avec la convention d'appel __clrcall à partir du code natif
    1>          with
    1>          [
    1>              T=enPOSM
    1>          ]
    1>..\..\..\..\Linguistic\Analyser\src\chunker.cpp(121): error C3175: 'System::Collections::Generic::List<T>::List' : impossible d'appeler une méthode de type managé à partir d'une fonction non managée 'SpecificationLoader::CChunker::CChunker'
    1>          with
    1>          [
    1>              T=enPOSM
    1>          ]
    1>..\..\..\..\Linguistic\Analyser\src\chunker.cpp(121): error C3642: 'System::Collections::Generic::List<T>::List(void)' : impossible d'appeler une fonction avec la convention d'appel __clrcall à partir du code natif
    1>          with
    1>          [
    1>              T=enPOSM
    1>          ]
    1>..\..\..\..\Linguistic\Analyser\src\chunker.cpp(121): error C3175: 'System::Collections::Generic::List<T>::List' : impossible d'appeler une méthode de type managé à partir d'une fonction non managée 'SpecificationLoader::CChunker::CChunker'
    1>          with
    1>          [
    1>              T=enPOSM
    1>          ]
    1>..\..\..\..\Linguistic\Analyser\src\chunker.cpp(121): error C3642: 'System::Collections::Generic::List<T>::List(void)' : impossible d'appeler une fonction avec la convention d'appel __clrcall à partir du code natif
    1>          with
    1>          [
    1>              T=enPOSM
    1>          ]
    1>..\..\..\..\Linguistic\Analyser\src\chunker.cpp(121): error C3175: 'System::Collections::Generic::List<T>::List' : impossible d'appeler une méthode de type managé à partir d'une fonction non managée 'SpecificationLoader::CChunker::CChunker'
    1>          with
    1>          [
    1>              T=enPOSM
    1>          ]
    1>..\..\..\..\Linguistic\Analyser\src\chunker.cpp(121): error C3642: 'System::Collections::Generic::List<T>::List(void)' : impossible d'appeler une fonction avec la convention d'appel __clrcall à partir du code natif
    1>          with
    1>          [
    1>              T=enPOSM
    1>          ]
    1>..\..\..\..\Linguistic\Analyser\src\chunker.cpp(121): error C3175: 'System::Collections::Generic::List<T>::List' : impossible d'appeler une méthode de type managé à partir d'une fonction non managée 'SpecificationLoader::CChunker::CChunker'
    1>          with
    1>          [
    1>              T=enPOSM
    1>          ]
    1>..\..\..\..\Linguistic\Analyser\src\chunker.cpp(121): error C3642: 'System::Collections::Generic::List<T>::List(void)' : impossible d'appeler une fonction avec la convention d'appel __clrcall à partir du code natif
    1>          with
    1>          [
    1>              T=enPOSM
    1>          ]
    1>..\..\..\..\Linguistic\Analyser\src\chunker.cpp(121): error C3175: 'System::Collections::Generic::List<T>::List' : impossible d'appeler une méthode de type managé à partir d'une fonction non managée 'SpecificationLoader::CChunker::CChunker'
    1>          with
    1>          [
    1>              T=enPOSM
    1>          ]
    1>..\..\..\..\Linguistic\Analyser\src\chunker.cpp(121): error C3642: 'System::Object::Object(void)' : impossible d'appeler une fonction avec la convention d'appel __clrcall à partir du code natif
    1>..\..\..\..\Linguistic\Analyser\src\chunker.cpp(121): error C3175: 'System::Object::Object' : impossible d'appeler une méthode de type managé à partir d'une fonction non managée 'SpecificationLoader::CChunker::CChunker'

    1° compréhension du diagnostique: je ne comprend pas pourquoi il dit qu'il s'agit d'une fonction non managé?

    2° Compréhension du diagnostique: je ne comprend pas ce qu'il dit sur List<T> et la référence à T=enPOSM: qu'est ce qui motive ce diagnostique?;

    3° compréhension du diagnostique: je ne comprend pas ce qu'il dit sur les objets; qu'est ce qui motive ce diagnostique?

    Qui peut m'aider à comprendre?

    Visiblement tout ça provient du header


    Jean Noël Martin


    • Modifié JeanNoel53 vendredi 29 novembre 2013 07:28
    vendredi 29 novembre 2013 07:15

Réponses

  • J'ai abandonné le passage en mode managé qui était trop lourd. J'ai cependant fait un bout de test en créant une classe managée et le problème n’apparaissait plus.

    Jean Noël Martin

    • Marqué comme réponse JeanNoel53 dimanche 1 décembre 2013 21:22
    dimanche 1 décembre 2013 21:22