public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* "No known conversion" compiler error with identical arguments
@ 2014-10-28  1:16 Eric Kessler
  0 siblings, 0 replies; only message in thread
From: Eric Kessler @ 2014-10-28  1:16 UTC (permalink / raw)
  To: cygwin

I am converting a computer game project from Microsoft Visual Studio to GCC and get the following compiler error:

../../Human/Human.cpp: In member function ‘virtual void CHuman::TakeAction(CTerrainView**, PUniverse, WORD)’: 
../../Human/Human.cpp:1469:71: error: no matching function for call to ‘CHuman::GenericAction(CDecisionNode*&, CTerrainView**&, bool, bool, bool, void (__attribute__((__cdecl__)) &)(IDirect3DRMFrame*, LPVOID, D3DVALUE), bool, NULL, void (ISoldier::*)(CTerrainView**, IPhysRendObj*, int), NULL, bool, int, bool)’ 
false, NULL, &ISoldier::WalkToSideOfOffering, NULL, true, 0, true ); 
^ 
../../Human/Human.cpp:1469:71: note: candidate is: 
../../Human/Human.cpp:1145:6: note: void CHuman::GenericAction(PDecisionNode, CTerrainView**, bool, bool, bool, PFNMOVECALLBACK, bool, PFNREACTION, PMFNCONTINUATION, PFNCLEANUP, bool, int, bool) 
void CHuman::GenericAction( PDecisionNode pNode, PTerrainView pView[], bool bHorse, 
^ 
../../Human/Human.cpp:1145:6: note:   no known conversion for argument 9 from ‘void (ISoldier::*)(CTerrainView**, IPhysRendObj*, int)’ to ‘PMFNCONTINUATION {aka void (ISoldier::*)(CTerrainView**, IPhysRendObj*, int)}’

Note that in the last line, where it says "no known conversion from <argument 1> to <argument 2>" that argument 1 and argument 2 are identical.

I did a search for "no known conversion" but there were no applicable results.

Here is the line that causes the error:

void CHuman::TakeAction( PTerrainView pView[], PUniverse pUniverse, WORD wCmdId ) 
{ 
. . . 
    GenericAction( m_Ego.m_pCurrentDecision, pView, false, false, false, GenericCallback, false, NULL, 
        &ISoldier::WalkToSideOfOffering, NULL, true, 0, true ); 
. . . 
}

Here is the prototype for GenericAction:

typedef class CHuman : public CPhysicalEntity, public IHuman { 
. . . 
public: 
. . . 
    struct ego	m_Ego; 
. . . 
    void GenericAction( PDecisionNode pNode, PTerrainView pView[], bool bHorse = false,
        bool bThisHouse = false, bool bOffice = false, PFNMOVECALLBACK pfnMoveCallback = GenericCallback,
        bool bCheckForCart = true, PFNREACTION pfnReaction = NULL, PMFNCONTINUATION pmfnContinuation = NULL,
        PFNCLEANUP pfnCleanUp = NULL, bool bDeleteDest = true, int nProxScaleExp = 0, bool bSimplePath = false ); 
. . . 
} * PHomini;

Here is the prototype for WalkToSideOfOffering:

typedef class ISoldier : public IPhysRendObj { 
public: 
. . . 
    void WalkToSideOfOffering( class CTerrainView *pView[], class IPhysRendObj *, int nOffering = 0 ); 
. . . 
};

And here is the prototype for PMFNCONTINUATION:

typedef void (__thiscall ISoldier::*PMFNCONTINUATION)(class CTerrainView ** const,class IPhysRendObj *,int);

Why is there an error converting an argument from one type to an identical type?

If this is the wrong place to ask this question, please direct me to the appropriate place. Thank you.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-10-28  1:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-28  1:16 "No known conversion" compiler error with identical arguments Eric Kessler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).