Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Linker errors

Author
Message
Proxin
13
Years of Service
User Offline
Joined: 11th Feb 2011
Location:
Posted: 12th Feb 2011 01:39
Hey there,
My C++ class is using DarkGDK. I want to use DarkGDK with Visual Studio 2010 instead of using the VMWare image my instructor provided (it's a pain in the neck just to open VS2008).

I got DarkGDK working with Visual Studio 2010 by using this YouTube tutorial:
http://www.youtube.com/watch?v=8LDYw96ShBI

I've made a couple of projects successfully from it. Yay for me!
However, I am having some issues with one project we worked on last class. Linker errors...


My code I am using is:


So my Libcmtd and Msvcrt library files are conflicting with something...
I tried the instructions posted here a couple times- add libcmtd,msvcrt,atls to /NODEFAULTLIB, as well as set code generation to MultiThreaded. Yet I still have this error...

Can someone please help me?
Dar13
16
Years of Service
User Offline
Joined: 12th May 2008
Location: Microsoft VisualStudio 2010 Professional
Posted: 12th Feb 2011 05:00
This code
should be
.



Bran flakes91093
16
Years of Service
User Offline
Joined: 13th Sep 2008
Location: Crazy Land
Posted: 12th Feb 2011 16:50 Edited at: 12th Feb 2011 16:52
And add make sure you ignore these libraries: atls, libcmtd, msvcrt, libcp

Project Properties->Linker->Input->Ignore Specific Library

Also, set the runtime to be /MT

Project Properties->C/C++->Code Generation->Runtime Library

EDIT: Oh, nevermind, I didn't read the last sentence of your post. Dar13 is right, but you should still do the above (especially if you want to use the STL).

“C++ : Where friends have access to your private members.”
-Gavin Russell Baker
Proxin
13
Years of Service
User Offline
Joined: 11th Feb 2011
Location:
Posted: 14th Feb 2011 09:31
Wow, Dar13 - I tried that and received a couple errors, but got a fully successful compile. I can't believe the fix was that simple! Thanks for your help, both of you

@Bran flakes91093: Just curious, if I have more trouble in the future- do I need to do those things you mentioned (Multithreaded, and ignoring those libraries) in All configurations? Or do I need to have specific settings for Release and specific settings for Debug?

Thank you all so much for helping me out with this.

-Proxin
Bran flakes91093
16
Years of Service
User Offline
Joined: 13th Sep 2008
Location: Crazy Land
Posted: 14th Feb 2011 20:52
You should ignore those specific libraries in all configurations.

It is only necessary to change the runtime library when you want to use the STL, and usually Release mode is set to /MT already, so you would only need to change the Debug runtime.

“C++ : Where friends have access to your private members.”
-Gavin Russell Baker
Dar13
16
Years of Service
User Offline
Joined: 12th May 2008
Location: Microsoft VisualStudio 2010 Professional
Posted: 16th Feb 2011 02:21
Your welcome, Proxin.


Proxin
13
Years of Service
User Offline
Joined: 11th Feb 2011
Location:
Posted: 25th Feb 2011 05:39
I'm having more linker errors...
We're now using vectors, and the instructions (for VS2008) say to set the libraries to MultiThreaded (MT) on the Debug configuration.

My code is below... we tried it out on a VS2008 computer and it worked:


However I get the following linker errors (on the troublesome LIBCMTD and MSVCRT... very frustrating! )


Can anyone please help me with this? These two libs have been causing issues for me for a while...

Login to post a reply

Server time is: 2024-11-19 12:33:57
Your offset time is: 2024-11-19 12:33:57