Thread: incompatible STL?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Nov 2006
    Posts
    519
    That would mean that I can't ever link any of my programs which uses the STL against any library not built by myself using the same compiler because I can't ever be sure that it uses the STL, too and may be built with another version of VS.
    I wonder how the STL ever could get adapted by programmers under these preconditions.

  2. #2
    Registered User
    Join Date
    Aug 2003
    Posts
    1,218
    Depends on the library but in short; yes. There are of course exceptions to this rule (for instance microsoft directx does not have this problem). Look through the documentation for the library and it will often tell you what versions it supports (and if your version is not supported it will, if open-source, often tell you how to compile the library aswell).

    What do you mean "I wonder how the STL ever could get adapted by programmers under these preconditions."? STL is widely adopted by programmers but just like with any library, if you mix two versions; bad (and unforseen) things can (and probably eventually will) happend.

  3. #3
    Registered User
    Join Date
    Nov 2006
    Posts
    519
    Quote Originally Posted by Shakti View Post
    What do you mean "I wonder how the STL ever could get adapted by programmers under these preconditions."? STL is widely adopted by programmers but just like with any library, if you mix two versions; bad (and unforseen) things can (and probably eventually will) happend.
    Sure, but in terms of STL I don't have any direct control about the library version I or other code I want to link uses.

    If I don't know with which compiler any module was built and I it also may be that the module utilizes the STL I basicly can't link against it.

    Sure that problem exists with all libraries, but
    a) most of the time they are linked dynamically so I just have the right verion to link against
    and
    b) they are not the so called _standard_ library of the programming system. Imo there shouln't be such pitfalls with it.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Passing Argument from incompatible pointer type
    By AmritxD in forum C Programming
    Replies: 3
    Last Post: 08-15-2010, 03:23 PM
  2. The Interactive Animation - my first released C program
    By ulillillia in forum A Brief History of Cprogramming.com
    Replies: 48
    Last Post: 05-10-2007, 02:25 AM
  3. Compiler "Warnings"
    By Jeremy G in forum A Brief History of Cprogramming.com
    Replies: 24
    Last Post: 04-24-2005, 01:09 PM
  4. Prime Number Generator... Help !?!!
    By Halo in forum C++ Programming
    Replies: 9
    Last Post: 10-20-2003, 07:26 PM
  5. include question
    By Wanted420 in forum C++ Programming
    Replies: 8
    Last Post: 10-17-2003, 03:49 AM