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 / Working with strings, #include <string>

Author
Message
Try
20
Years of Service
User Offline
Joined: 16th Aug 2004
Location:
Posted: 4th Nov 2007 08:33 Edited at: 4th Nov 2007 08:34
I know this has been asked alot, but I couldn't find the answer in older threads.

Picture this: I have a project written in DGDK that compiles with no problems, but when I #include <string> -(w/o .h)- I get this linker errors:



I have no idea about it, because I just tried to include it in the project w/o writing a line of code using that library!

Thanks in advance
-Try
Pixel Perfect
17
Years of Service
User Offline
Joined: 21st Feb 2007
Location: UK
Posted: 4th Nov 2007 19:05
I have not seen this one before but it is undoubtably caused by compiler / linker settings. I would defnitely check those settings first.

The initial warning about LIBCMT would indicate you are somehow trying to mix release libraries with debug libraries as LIBCMT.LIB is the C Runtime multithreaded static link release library and the library raising the error LIBCPMTD.LIB is a Standard C++ multithreaded static link debug library.

I'd check your settings for the compiler first if I were you.

e.g. make sure you dont have _DEBUG defined as a preprocessor directive with the runtime library set to /MT or something like that!

If all else fails try posting your compiler and linker command line settings from the project properties. Maybe someone smarter than me can spot something!

No matter how good your code is, someone will improve on it
Try
20
Years of Service
User Offline
Joined: 16th Aug 2004
Location:
Posted: 5th Nov 2007 08:50
Pixel Perfect,
Quote: "make sure you dont have _DEBUG defined as a preprocessor directive with the runtime library set to /MT or something like that!"

Yeah, that's it. Thanks man

I'm just wondering about the cause of this! I could compile my code in 'Release' mode but not in 'Debug' mode!!!
(Do you know why?!!!)

I deleted the _DEBUG and tadda! It simply worked

Thanks again.
-Try
Pixel Perfect
17
Years of Service
User Offline
Joined: 21st Feb 2007
Location: UK
Posted: 6th Nov 2007 20:51
Your welcome mate, glad I was able to help!

With regard to the modes, it's all down to what's configured behind them, you have to be careful not to change things which can result in non compatible libraries being combined at Link time. I don't pretend to fully understand it myself, but would recommend having a look at the following MSDN link as a starting point:

http://msdn2.microsoft.com/en-us/library/abx4dbyh(VS.80).aspx

No matter how good your code is, someone will improve on it
Try
20
Years of Service
User Offline
Joined: 16th Aug 2004
Location:
Posted: 6th Nov 2007 23:04
Quote: "but would recommend having a look at the following MSDN link as a starting point:"

I sure will!

Thanks indeed.
-Try

Login to post a reply

Server time is: 2024-11-16 20:24:51
Your offset time is: 2024-11-16 20:24:51