About the CallBackFunction conversion error!

20 views
Skip to first unread message

自己

unread,
May 8, 2017, 3:23:21 AM5/8/17
to devel...@opendtect.org
Hi, all:
      I was compiling OD6.0 from the source code myself using Visual Studio 2010, and when i was buliding the "Network" module,  i found that some compiling errors occured
the error info like the following:
      1>..\..\..\src\Network\odnetworkreply.cc(43): error C2440: “Type conversion”:  can not convert from “bool (__thiscall ODNetworkReply::* )(CallBacker *)” to “CallBackFunction”
      1>         Pointers to members have different representations; cannot be converted between them
     I found the reason for this error is about the return type of member function, because OD defines the return type of CallBackFuntion as void,
but in the above example, the return type of the member function of ODNetworkReply is bool, and when i revised the return type to void, the error
didn't happen again. So is there any solutions for  avoiding the compiling error in visual studio 2010?
    Any help will be appreciated.


 

Ranojay

unread,
May 8, 2017, 5:46:28 AM5/8/17
to devel...@opendtect.org

Hi,

No, since this is an error so you cannot skip this, but what you did is actually the solution for this error, surprisingly other version of Visual Studio did not pick it up

Regards
Ranojay

 

--
You received this message because you are subscribed to the Google Groups "OpendTect Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to developers+...@opendtect.org.
To post to this group, send email to devel...@opendtect.org.
Visit this group at https://groups.google.com/a/opendtect.org/group/developers/.
To view this discussion on the web visit https://groups.google.com/a/opendtect.org/d/msgid/developers/7f3304c4.8495.15be6eda0f2.Coremail.ygh1118%40126.com.
For more options, visit https://groups.google.com/a/opendtect.org/d/optout.

--
Ranojay Sen
Team Leader Windows Development
______________________________

dGB Earth Sciences, India
Phone: +91 22 25704984
E-mail: ranoj...@dgbes.com
Internet: dgbes.com & opendtect.org

SEG Distinguished Achievement Award 2016
______________________________

自己

unread,
May 9, 2017, 2:45:30 AM5/9/17
to devel...@opendtect.org
Thanks Ranojay for my question!
Best Regards~
                        yan gaohan


 

Reply all
Reply to author
Forward
0 new messages