[Home] [Downloads] [Search] [Help/forum]

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Development
. . -> [Subject]  Fixing one final compiler error
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Fixing one final compiler error

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


Posted by Worstje   Netherlands  (899 posts)  [Biography] 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?
[Go to top] top

Posted by Twisol   USA  (2,257 posts)  [Biography] 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
[Go to top] top

Posted by Worstje   Netherlands  (899 posts)  [Biography] 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.
[Go to top] top

Posted by Prasooncc   (1 post)  [Biography] 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
[Go to top] top

Posted by Nick Gammon   Australia  (21,322 posts)  [Biography] 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
[Go to top] 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.


9,164 views.

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

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

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

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]