Dev-C++ distribution question

This is a discussion on Dev-C++ distribution question within the C++ Programming forums, part of the General Programming Boards category; I made a program in MS visual C++ 2008 and put the program on my site for others to download. ...

  1. #1
    Registered User Stonehambey's Avatar
    Join Date
    Jan 2008
    Location
    Kent, UK
    Posts
    118

    Question Dev-C++ distribution question

    I made a program in MS visual C++ 2008 and put the program on my site for others to download. For a long time I thought it was working fine since I downloaded the program from my site and it was running ok (I was using my own comp)

    However, some people were telling me that they couldn't run the program as there was a library error. I fixed this by setting one of the properties of "code generation" in the Visual c++ IDE to something which didn't use dll (I don't really understand what I did, but it worked)

    Now, due to various reasons, I'm thinking of using the Dev-C++ compiler as opposed to the MS visual c++ one. I'm just wondering if I will have any similar distribution problem? Before I post any programs on my site which I've made from it.

    Kind Regards

    Stonehambey

  2. #2
    Registered User
    Join Date
    Mar 2008
    Posts
    5
    I use Dev-C++, and to my knowledge, the .exe has always worked after it has been compiled, regardless of which computer did the compiling.

  3. #3
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,587
    Your problem was that you did not prompt your users to install the VC++ 2008 runtime. That, or statically link against the libraries (which I don't recommend).
    All C++ distributions are going to require you to bundle some sort of dlls or runtime that contains the Standard Library implementation or such. But they may also embed the code directly into the executable by default, which is bad, but doesn't require the bundling of runtime.

    That mentioned, I don't recommend switching from MS to Dev-C++. This is my own individual recommendation, however. I base it upon that MS IDE is easier to use and supports narrowing warnings, which GCC does not.
    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.

  4. #4
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,046
    Of course, I suggest trying Dev-C++, so there you have it. It's worth trying, anyway . . . .

    All C++ distributions are going to require you to bundle some sort of dlls or runtime that contains the Standard Library implementation or such. But they may also embed the code directly into the executable by default, which is bad, but doesn't require the bundling of runtime.
    Dev-C++ 4.0 generates tiny (like 72KB, for C++) executables, so I think it probably requires some DLL or another. However, I've run executables created with this version on a Windows 95 computer without requiring any extra DLLs, so I think the required DLLs are pretty standard.

    The latest version of Dev-C++ generates significantly larger executables (say, 200KB), so it's possible that the runtime is included in the executables generated with this version. I haven't really tested executables from this compiler, but I don't think you'd have too many troubles.
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  5. #5
    Registered User
    Join Date
    Jan 2007
    Posts
    89
    I always wondered about the size of the executables. Code::Blocks v8.02 is generating an executable of about 900kb and the game Im making has only about 10 files and Im not even halfway finished yet.

  6. #6
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,587
    Most likely it's embedding the runtime in the executable.
    Check the compiler and tell it not to do that.
    Better to install runtime once and never worry about it anymore than including it in every executable.
    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.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. another do while question
    By kbpsu in forum C++ Programming
    Replies: 3
    Last Post: 03-23-2009, 12:14 PM
  2. Glut and Dev C++, Programs not Quitting?
    By Zeusbwr in forum Game Programming
    Replies: 13
    Last Post: 11-29-2004, 07:43 PM
  3. Question...
    By TechWins in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 07-28-2003, 09:47 PM
  4. opengl DC question
    By SAMSAM in forum Game Programming
    Replies: 6
    Last Post: 02-26-2003, 08:22 PM
  5. Very simple question, problem in my Code.
    By Vber in forum C Programming
    Replies: 7
    Last Post: 11-16-2002, 02:57 PM

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