Example related to Gui probl (Compilation error)

This is a discussion on Example related to Gui probl (Compilation error) within the C++ Programming forums, part of the General Programming Boards category; Code Compiled from Comand line..... # include <graphics.h> # include <conio.h> void main() { int driver=DETECT,mode; initgraph(&driver,&mode,"..\bgi"); setfillstyle(SOLID_FILL,RED); bar(50,50,100,100); rectangle(50,50,100,100); ...

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

    Example related to Gui probl (Compilation error)

    Code Compiled from Comand line.....
    # include <graphics.h>
    # include <conio.h>
    void main()
    {
    int driver=DETECT,mode;
    initgraph(&driver,&mode,"..\\bgi");
    setfillstyle(SOLID_FILL,RED);
    bar(50,50,100,100);
    rectangle(50,50,100,100);
    getch();
    }
    .................................................. .................................................. ...

    Error message which commmand line gives me on compiling above simple graphics programme ................ is below::

    C:\TC\BIN>tcc X:\test.cpp
    Turbo C++ Version 3.00 Copyright (c) 1992 Borland International
    x:\test.cpp:
    Turbo Link Version 5.0 Copyright (c) 1992 Borland International
    Error: Undefined symbol _rectangle in module x:\test.cpp
    Error: Undefined symbol _bar in module x:\test.cpp
    Error: Undefined symbol _setfillstyle in module x:\test.cpp
    Error: Undefined symbol _initgraph in module x:\test.cpp

    Available memory 4086512

    Now wat should i do??????????????

  2. #2
    Skunkmeister Stoned_Coder's Avatar
    Join Date
    Aug 2001
    Posts
    2,572
    >>Now wat should i do??????????????

    Dump that old piece of sh1t compiler and get something more up to date. You probably need to tell your linker to link with the bgigraphics library. I have no idea how to do that. Your compiler is prehistoric. You may find some info at borlands website on linking the bgi library. I seriously recommend you get a better compiler. You cannot learn c++ using a compiler made in 1992.
    Free the weed!! Class B to class C is not good enough!!
    And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi

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

    And...

    Because graphics are not part of the ANSI/ISO C++ standard, you have to make sure your examples are written for your particular compiler.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Compiling sample DarkGDK Program
    By Phyxashun in forum Game Programming
    Replies: 6
    Last Post: 01-27-2009, 03:07 AM
  2. Testing some code, lots of errors...
    By Sparrowhawk in forum C Programming
    Replies: 48
    Last Post: 12-15-2008, 04:09 AM
  3. more then 100errors in header
    By hallo007 in forum Windows Programming
    Replies: 20
    Last Post: 05-13-2007, 09:26 AM
  4. Dikumud
    By maxorator in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2005, 07:39 AM
  5. Stupid compiler errors
    By ChrisEacrett in forum C++ Programming
    Replies: 9
    Last Post: 11-30-2003, 05:44 PM

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