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 / create dynamic arrays like std::vector

Author
Message
Hierro
16
Years of Service
User Offline
Joined: 22nd Mar 2008
Location:
Posted: 22nd Mar 2008 14:53
heya!

i recently downloaded visual studio 2008 express edition, dark gdk and the directx sdk and currently write on my first project.

everything works and compiles perfectly, but now i want to use arrays where i can add and remove data dynamically. i tried to use std::vector, but unfortunately i receive a few linker errors where i can't build my project any longer.

my questions:
- how should i set up visual studio to make a simple std::vector working?
- are there already any definitions of something comparable to std::vector implemented in the dark gdk?

any suggestions and help would be awesome!
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 24th Mar 2008 18:44
Search this forum for linker errors. I'm sure I've seen a post about that.

Hats off to you for doing it the correct way.

(I wrote my own classes to avoid the dependancy issue all together...I used plain vanilla C++ and now am quite happy with my home brew. I just posted that class in another thread today so if you want it look for it or email me or something - its also here: http://code.google.com/p/darkgdkoop/

Good Luck - Please post any successes you have getting the stdlib linked!

Pixel Perfect
17
Years of Service
User Offline
Joined: 21st Feb 2007
Location: UK
Posted: 24th Mar 2008 19:47
Quote: "how should i set up visual studio to make a simple std::vector working?"


Apart from the basic include and namespace statements:



ensure the following are set in the project properties:

Configuration Properties - C++ - Code Generation is set to Multi-Threaded (/MT) both in Debug mode and Release mode. There are no debug libraries for DarkGDK and attempting to link other libraries in Debug mode will produce linker errors as a result if this setting is left as /MTd.

Configuration Properties - Linker - Input - Ignore Specific Library is set to: libcmtd, msvcrt, atls

If these are set then you should have no further problems using Standard Library functions and templates.

No matter how good your code is, someone will improve on it

Login to post a reply

Server time is: 2024-11-20 05:30:40
Your offset time is: 2024-11-20 05:30:40