Like Tree1Likes
  • 1 Post By phantomotap

iostream - Digital Mars C/C++ Compiler

This is a discussion on iostream - Digital Mars C/C++ Compiler within the Windows Programming forums, part of the Platform Specific Boards category; I'm trying to set up the Digital Mars C/C++ compiler in Windows XP SP3, but I'm having some problems. One ...

  1. #1
    Registered User
    Join Date
    Oct 2010
    Posts
    114

    iostream - Digital Mars C/C++ Compiler

    I'm trying to set up the Digital Mars C/C++ compiler in Windows XP SP3, but I'm having some problems. One of the files I downloaded was from the page Digital Mars Download C and C++ Compilers, where it is written Digital Mars C/C++ Compiler Version 8.57 (3662658 bytes). The file, extracted, resulted in the folder dm, which I put in the C: root. Then, I added the bin subfolder of it to PATH. Now, I can call the compiler from any directory, but I'm having problems with iostream. I downloaded from the link above the file where it is written To use and other STL code, download STLport 4.5.3 as well. However, when extracted, the folder that results is also called dm, like the one I mentioned before. What should I do with it? I've read the readme file that came with the download, but I still can't make it work so that I can compile a C++ program that uses iostream. Thanks in advance!

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,822
    It would seem you unzip the stlport on top of the compiler.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
    Registered User
    Join Date
    Oct 2010
    Posts
    114
    It didn't work, but thanks. =)

  4. #4
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Posts
    23,002
    Is there a reason you are using this compiler? The compiler has pretty poor C++ support*, so it would be better to use a more modern compiler. Candidates include Visual Studio which is a really nice integrated IDE (but is pretty big) and GCC, which is really cutting edge with modern C++ support.

    * C++11 support is pretty much lacking all over the place.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  5. #5
    Registered User
    Join Date
    Oct 2010
    Posts
    114
    I was worried about using GCC because I thought maybe my applications would have to be open-source and/or GPL licensed, and I was worried about using the Visual Studio compiler because of the question that I asked when opening the other thread, about the executables needing the .NET framework or not. But since there is that /MT option, I guess the problem is solved.

  6. #6
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Posts
    23,002
    Why are you so worried about the runtime? You just have to install it once and it's pretty much the same with any compiler - either you distribute the runtime or you compile it statically.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  7. #7
    Registered User
    Join Date
    Oct 2010
    Posts
    114
    I see. I don't want know too much about this, XD.

  8. #8
    Registered User
    Join Date
    Oct 2006
    Posts
    2,584
    the gcc C and C++ runtimes are licensed under the LGPL, meaning only the runtime libraries themselves (if dynamically linked) must have the source made readily available. you are allowed to have closed source programs that use them. if you statically link the runtime, then your source code must be available as well, because it becomes what they refer to as a "derived work"
    Code:
    namespace life
    {
        const bool change = true;
    }

  9. #9
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    Posts
    4,405
    the gcc C and C++ runtimes are licensed under the LGPL, meaning only the runtime libraries themselves (if dynamically linked) must have the source made readily available. you are allowed to have closed source programs that use them. if you statically link the runtime, then your source code must be available as well, because it becomes what they refer to as a "derived work"
    (I am not a lawyer and all that fluff.)

    O_o

    The C and C++ runtimes included with "GCC" and friends, `libgcc' and `libstdc++', are licensed under the GPL, and such runtimes have the "GCC Runtime Library Exception" allowing anyone to link with them, statically and dynamically, without requiring that the code being linked be released under the GPL.

    The libraries which are part of the official runtime, again such as `libgcc' and `libstdc++', allow this exception specifically so that one may use GCC to compile code without worrying about the license requirement "infecting" the produced executable.

    One should note, however, that one will also need an implementation of the standard C functions if one used those standard functions (such as `strcpy'). The library provided by the Gnu project `glibc', which is not part of "GCC", `libgcc', or `libstdc++', is released under the LGPL. One need not use `glibc' though as many implementations of `libc' exist.

    If you aren't otherwise using `glibc', or such other libraries with similar "copyleft" licenses, linking statically, as against the C and C++ runtimes provided with "GCC", is specifically allowed with "closed source" programs by a specific exception written into the license for those components.

    In other words, if you have a `libc' which allows you to link statically, the "GCC" runtime for C and C++ do not place licensing requirements on your code or the resulting executable.

    The moral of this post: every programmer should learn the licenses the tools and libraries used depend upon.

    Soma
    Elkvis likes this.
    “Often out of periods of losing come the greatest strivings toward a new winning streak.” -- Fred Rogers
    “Salem Was Wrong!” -- Pedant Necromancer

  10. #10
    Registered User
    Join Date
    Oct 2006
    Posts
    2,584
    Quote Originally Posted by phantomotap View Post
    The C and C++ runtimes included with "GCC" and friends, `libgcc' and `libstdc++', are licensed under the GPL, and such runtimes have the "GCC Runtime Library Exception" allowing anyone to link with them, statically and dynamically, without requiring that the code being linked be released under the GPL.
    I was not aware of the distinction between the "GCC Runtime Library Exception" and the LGPL. the effect of the two is largely the same, in practice, but I can now see the difference, and as you say, it's important to understand these things.
    Code:
    namespace life
    {
        const bool change = true;
    }

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. execlp function / digital mars compiler
    By claydan7 in forum C++ Programming
    Replies: 4
    Last Post: 08-24-2009, 08:51 PM
  2. dmc (digital mars compiler)
    By NeonBlack in forum C++ Programming
    Replies: 7
    Last Post: 12-01-2007, 03:04 PM
  3. Digital Mars Compiler: compiling for DOS?
    By Waldo2k2 in forum C++ Programming
    Replies: 1
    Last Post: 09-15-2002, 03:06 PM
  4. Digital Mars Compiler
    By Powerfull Army in forum C++ Programming
    Replies: 9
    Last Post: 06-26-2002, 08:54 PM
  5. Anyone reccomend Digital Mars compiler?
    By joshuaman in forum C++ Programming
    Replies: 7
    Last Post: 06-20-2002, 12:22 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21