delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2014/10/27/21:17:07

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:reply-to:to:message-id:subject
:mime-version:content-type:content-transfer-encoding; q=dns; s=
default; b=uCuxBemSZ8OobIDtQDpP5S3JKS4U+ruEsw+JFJLJUma4DHb8lJLcx
UuY45138r924lPdzhKRT79u++lgenJXR4e4gRRv3t9v0yj0UDYBtpJD7K5SK9/LL
f16fAfAcLwKTVy/96EPQi+gwCIaEkphtpD7YCoIc73Izd1onag4eNU=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:reply-to:to:message-id:subject
:mime-version:content-type:content-transfer-encoding; s=default;
bh=IVmnmqHi9Ws7RzIyMhJgZUUHnMU=; b=oqD+quCtMRwy7IBZqUylMFGqEY67
mVSXIZ0dIobzpmz2I7CLHoIlY3WsY57xuM0AfVFmP6uEryNiB6YZ/NvlTAvs6NwX
4PGTTltOg9cbrBYK0jyYXrrGbN9PwUfbqeU9bq8MOEUau3PDNuRsSLekayJj/AZn
clOE9bwdMOO4fcY=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=1.0 required=5.0 tests=AWL,BAYES_40,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2
X-HELO: nm28.bullet.mail.bf1.yahoo.com
Date: Tue, 28 Oct 2014 01:12:46 +0000 (UTC)
From: Eric Kessler <ldgn86a AT yahoo DOT com>
Reply-To: Eric Kessler <ldgn86a AT yahoo DOT com>
To: "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT com>
Message-ID: <549733139.935348.1414458766042.JavaMail.yahoo@jws106129.mail.bf1.yahoo.com>
Subject: "No known conversion" compiler error with identical arguments
MIME-Version: 1.0
X-IsSubscribed: yes
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id s9S1H3j5002889

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


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019