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 / C++ Standard Vectors do not work in DarkGDK project

Author
Message
binsky
15
Years of Service
User Offline
Joined: 6th Feb 2009
Location:
Posted: 13th May 2010 01:15
Hey guys, lately i have been trying to get vectors to work in darkgdk but i cannot seem to get them to work.

My code:
This should work, but i get errors.


Errors:
Matty H
16
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 13th May 2010 01:43
Project->Properties->C/C++->code generation

Change runtime library from multi-threaded debug(/MTd) to multi-threaded(MT).

binsky
15
Years of Service
User Offline
Joined: 6th Feb 2009
Location:
Posted: 13th May 2010 01:48 Edited at: 13th May 2010 01:50
Ok! Sweet, now i did that! I got it working. But now im having a problem with using it in a static library. I declare a vector in a static lib, then try and use it in my project and i get the following error because of the vector. My project using the lib is using multi-threaded code generation. The lib is using Multi-threaded debug, but if i change it, it doesnt make a difference.

Matty H
16
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 13th May 2010 02:11
I had them errors when I tried to make a debug lib, you may find you can make a release lib, try that.
Sadly, I don't know how to fix, hopefully someone will come in and tell us.

binsky
15
Years of Service
User Offline
Joined: 6th Feb 2009
Location:
Posted: 13th May 2010 02:16
WOOOHOOO!!!! Thanks sooo much matty! I have been stumbling over this problem for over a week. It finally works! Thanks man soo much! Also i found you need to set the lib to release and then change the lib code generation to multi-threaded.
JTK
14
Years of Service
User Offline
Joined: 10th Feb 2010
Location:
Posted: 13th May 2010 05:23
If I remember correctly, I got rid of it by #undef _DEBUG (or simply removing it from the preprocessor defines). With out _DEBUG tho, you lose some functionality (ASSERT/VERIFY etc) which was why I wrote my own (check em out in code-snippets).

JTK

Login to post a reply

Server time is: 2024-11-19 23:45:14
Your offset time is: 2024-11-19 23:45:14