Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ Development ➜ Fixing one final compiler error

Fixing one final compiler error

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Worstje   Netherlands  (899 posts)  Bio
Date Wed 15 Sep 2010 07:39 AM (UTC)

Amended on Wed 15 Sep 2010 08:38 AM (UTC) by Worstje

Message
Heya,

I'm trying to get the stuff to compile under VS2010, and so far stuff seems awesome compared to the last failed attempt on my part, which was basically pre-Twisol. :)

The error I'm trying to figure out is...

nafxcwd.lib(afxglobals.obj) : error LNK2005: "public: virtual __thiscall CMemDC::~CMemDC(void)" (??1CMemDC@@UAE@XZ) already defined in TreePropertySheet.obj


I saw this error at one or two other spots on the internet, but saw no clear solution there either.

Anyone here have a clue?
Top

Posted by Twisol   USA  (2,257 posts)  Bio
Date Reply #1 on Wed 15 Sep 2010 07:51 AM (UTC)
Message
It looks like a CMemDC class is defined in VS2008's MFC Feature Pack. [1] I imagine that's causing conflicts. Try removing the CMemDC class from TreePropertySheet.h and see if that fixes it for you?

[1] http://msdn.microsoft.com/en-us/library/cc308997(v=VS.90).aspx

'Soludra' on Achaea

Blog: http://jonathan.com/
GitHub: http://github.com/Twisol
Top

Posted by Worstje   Netherlands  (899 posts)  Bio
Date Reply #2 on Wed 15 Sep 2010 08:21 AM (UTC)

Amended on Wed 15 Sep 2010 08:34 AM (UTC) by Worstje

Message
Ayup, that explains it.

I moved the CMemDC defined in the TreePropertySheet.h to be an innerclass of the only class it is ever used in, and the error went away.

Once I figure out how git works a bit better, I'll see about sending stuff up the stream.

Btw, what happened to the warnings cleanup project? I know Twisol cleaned tons of those in the past, but a simple compile is madness to look at, quite likely impeding productivity when working through the code.
Top

Posted by Prasooncc   (1 post)  Bio
Date Reply #3 on Mon 13 Jun 2011 04:34 PM (UTC)
Message
this may help
http://codeguru.earthweb.com/forum/showthread.php?p=1995583
Top

Posted by Nick Gammon   Australia  (23,158 posts)  Bio   Forum Administrator
Date Reply #4 on Mon 13 Jun 2011 10:37 PM (UTC)
Message
Thanks for the link. Although I have to say I don't get any errors or warnings.

Quote:

Btw, what happened to the warnings cleanup project?


Well it is hard for me to do because I don't get them. If you submit pragmas that you would like placed in the source to get rid of warnings you get but I don't, I don't see a big problem with that.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


24,804 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.