Compile problem Help

Discussion in 'C' started by lieweffect, Apr 20, 2006.

  1. lieweffect

    lieweffect New Member

    Joined:
    Apr 20, 2006
    Messages:
    58
    Likes Received:
    0
    Trophy Points:
    0
    I'm facing a trouble when I compile a program...
    The following error message appear...graphics.h. No such file or directory
    I having try to put the header into the same folder and the "Include" folder there.
    But still cannot work.
    Could anybody please help me to compile the program and make it an execute program and send to my e-mail: lieweffect@yahoo.com
    Million Thousand of Thank You
     

    Attached Files:

  2. coderzone

    coderzone Super Moderator

    Joined:
    Jul 25, 2004
    Messages:
    736
    Likes Received:
    39
    Trophy Points:
    28
    You have the code as
    #include <graphics.h>
    Which means it will look into the include folders defined in the IDE. What IDE you are using to compile the program.
     
  3. lieweffect

    lieweffect New Member

    Joined:
    Apr 20, 2006
    Messages:
    58
    Likes Received:
    0
    Trophy Points:
    0
    I have try to code as #include "graphics.h" when the header file is in the same folder.But still cannot work. I using the Dev-C++ to compile the program. Futhermore, there have a lot of error after compile. Could you please help me to fix these error and make as execute program to me.Thank You
     
    Last edited: Apr 21, 2006
  4. coderzone

    coderzone Super Moderator

    Joined:
    Jul 25, 2004
    Messages:
    736
    Likes Received:
    39
    Trophy Points:
    28
    I dont have Dev-C++ but if you change to #include "graphics.h" and then also if it could not find then probably you need to be inserting it into the project or something like that for the compilation.
     
  5. lieweffect

    lieweffect New Member

    Joined:
    Apr 20, 2006
    Messages:
    58
    Likes Received:
    0
    Trophy Points:
    0
    Could your compiler run program? If can can you make an execute program and send to me.
    Thank You
     
  6. coderzone

    coderzone Super Moderator

    Joined:
    Jul 25, 2004
    Messages:
    736
    Likes Received:
    39
    Trophy Points:
    28
    You have not provided all the files I guess. I can try compiling it on my system.
     
  7. lieweffect

    lieweffect New Member

    Joined:
    Apr 20, 2006
    Messages:
    58
    Likes Received:
    0
    Trophy Points:
    0
    Actually, the code is downloaded from web, there is only one cpp. file only. If possible can you make an exe. file to me
    Thank You
     
  8. coderzone

    coderzone Super Moderator

    Joined:
    Jul 25, 2004
    Messages:
    736
    Likes Received:
    39
    Trophy Points:
    28
    From where you downloaded the code.
     
  9. lieweffect

    lieweffect New Member

    Joined:
    Apr 20, 2006
    Messages:
    58
    Likes Received:
    0
    Trophy Points:
    0
  10. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    This is not meant for working in the windows based compilers. You try compiling it in Turbo C3 or Turbo C 2 Dos based compilers.
     
  11. lieweffect

    lieweffect New Member

    Joined:
    Apr 20, 2006
    Messages:
    58
    Likes Received:
    0
    Trophy Points:
    0
    I don't have Turbo C3 or C2
     
  12. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    Then you can try the bloodshed compiler and it works but you probably need to be removing the clrscr.
     
  13. lieweffect

    lieweffect New Member

    Joined:
    Apr 20, 2006
    Messages:
    58
    Likes Received:
    0
    Trophy Points:
    0
    Yes, I'm using the Bloodshed Dev-C++ to compile.May I know the program can run on your system?
     
  14. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    I have compiled the program and emailed you.
     
  15. lieweffect

    lieweffect New Member

    Joined:
    Apr 20, 2006
    Messages:
    58
    Likes Received:
    0
    Trophy Points:
    0
    The program totally cannot run.
    But anyway Thank You first
     
    Last edited: Apr 22, 2006
  16. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    Thats because probably you dont have the BGI graphics at the correct location. If you see the source code it has
    Code:
    initgraph(&driver,&mode,"c:\\tc\\bgi"); 	//initialize graphics mode
    and that I edited to point to my location of bgi graphics which was
    Code:
    initgraph(&driver,&mode,"c:\\turboc3\\bgi"); 	//initialize graphics mode
    and thats probably why it does not run on your system

    Thanks
    Shabbir
     
  17. lieweffect

    lieweffect New Member

    Joined:
    Apr 20, 2006
    Messages:
    58
    Likes Received:
    0
    Trophy Points:
    0
    There was some bug in the program
    After I add a customer profile and want to view the profile. It give nothing to me.
    It is any mistake in the database, because it was no record after I added
     
  18. lieweffect

    lieweffect New Member

    Joined:
    Apr 20, 2006
    Messages:
    58
    Likes Received:
    0
    Trophy Points:
    0
    Oh..I knew where is the mistake...
    The file that open and save is different location
     
  19. lieweffect

    lieweffect New Member

    Joined:
    Apr 20, 2006
    Messages:
    58
    Likes Received:
    0
    Trophy Points:
    0
    The program can run properly now.
    But there have something that is not in logic.
    How to make some error detection
    For instance the time column is only accept the number.
    Yes I have change the data type into int(original is char).
    But error after compile
     
  20. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    Whats the error its giving.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice