Simple C++ GUI programme does'nt run from dos

This is a discussion on Simple C++ GUI programme does'nt run from dos within the C++ Programming forums, part of the General Programming Boards category; Actually I have made programme in C++ .The programme is using graphics functions. I want to Compile it from dos ...

  1. #1
    Registered User
    Join Date
    May 2003
    Posts
    5

    Simple C++ GUI programme does'nt run from dos

    Actually I have made programme in C++ .The programme is using graphics functions. I want to Compile it from dos (cmd) using Tcc compiler. but when i compile it, it gives me linker errors about gui files. Although same programme Compiles correctly from C editor(IDE).

    question is WHAT should I do ????????????.

    I want to run it from Dos (its very essential)

    tanx .

    please answer as quickly as possible

  2. #2
    Spanky devour89's Avatar
    Join Date
    Nov 2002
    Posts
    148
    Are you linking the correct libs?
    Dev C++
    Win XP/2k/98

    I DO NOT TAKE CLASSES I DONT GET HOMEWORK THIS IS NOT A HOMEWORK QUESTION!!!

    He's lean he's keen... He's the spank machine!

  3. #3
    Carnivore ('-'v) Hunter2's Avatar
    Join Date
    May 2002
    Posts
    2,879
    What graphics functions are you using? What are you using for graphics?
    Just Google It. √

    (\ /)
    ( . .)
    c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.

  4. #4
    Hardware Engineer
    Join Date
    Sep 2001
    Posts
    1,398

    General comments...

    I don't know if this will be of any help...

    If you have C-Editor configured to invoke your Tcc compiler, then assuming everything is set-up properly, the results should be identical from the command line and the IDE.

    There are Windows IDE compilers that can create DOS applications, and command line compilers (The free Borland compiler) that can make windows applications.

    Not all compilers can make true-DOS applications. For example, Microsoft Visual C++ can make a console application that runs in a DOS-like window, but these applications will not run on a true-DOS machine.

    Graphics are NOT part of the ISO/ANSI C++ standard. Every compiler has different graphics functions. You can't use the graphics library from one compiler in another compiler. See the FAQ There are 3rd party libraries that work with multiple compilers (OpenGL).

    Finally, anybody who thinks any GUI application is simple probably doesn't need any help from me.

  5. #5
    Registered Luser
    Join Date
    Apr 2003
    Posts
    17

    Re: Simple C++ GUI programme does'nt run from dos

    Originally posted by Shadowhunt
    Actually I have made programme in C++ .The programme is using graphics functions. I want to Compile it from dos (cmd) using Tcc compiler. but when i compile it, it gives me linker errors about gui files. Although same programme Compiles correctly from C editor(IDE).

    question is WHAT should I do ????????????.

    I want to run it from Dos (its very essential)
    From what I remember about Turbo C++ and its graphics, you need to copy those .BGI (Borland Graphics Interface) files to the same folder your .exe is present in. These files otherwise would be present in the BGI subfolder of your TC compiler.

    Furthermore, if you are using Fonts provided by Borland, you need to copy those .CHR files to the executable folder too.

    Basically, you have to specify the 'path' of the Graphic library files you'd be using. You can either specify this in the source itself (and put .BGI files in a different folder relative to the executable), or simply put the .BGI files in the same folder as executable.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Gui Programme does'nt Compiles from DOS
    By Shadowhunt in forum C++ Programming
    Replies: 1
    Last Post: 06-06-2003, 08:05 AM
  2. Programs run in dos. Why not windows?
    By marcusbankuti in forum C++ Programming
    Replies: 15
    Last Post: 08-11-2002, 07:33 PM
  3. Program to run in Dos only
    By ihsir in forum C++ Programming
    Replies: 2
    Last Post: 01-19-2002, 05:16 PM
  4. DOS program versus DOS console program
    By scromer in forum A Brief History of Cprogramming.com
    Replies: 4
    Last Post: 01-10-2002, 12:42 PM
  5. How to run DOS commands from c++
    By ihsir in forum C++ Programming
    Replies: 2
    Last Post: 12-05-2001, 04:59 AM

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