Please tell me: I wrote a program on Pascal using the GRAPH module, compiled both in TP7.0 and FP2.2.0, everything compiles, everything is fine :) and everything works fine for me, but when I throw the .exe to a friend, it does not work for him graphics mode how to fix? Probably need some more file) And for all friends) t. not just one) graphics initialization code:

procedure InitG; var GraphDriver, GraphMode: Integer; begin GraphDriver := detect; GraphMode := detect; InitGraph(GraphDriver, GraphMode, ''); SetBkColor(white); SetViewPort(0, 0, GetMaxX, GetMaxY, ClipOn); cx := GetMaxX shr 1; cy := GetMaxY shr 1; ClearViewPort; end; 

    3 answers 3

    Create a folder in the directory with the program (for example, graph), and place the graph.tpu module (Turbo Pascal extension (it can be different)), and write this line:

     InitGraph(GraphDriver, GraphMode, 'graph\'); 

    More details can be found here .

      graph.bgi file needed

        Well, drop the graph.lib file to it or whatever it is called there, it usually lies in the UNIT folder, honestly I don’t remember what it’s exactly called, look in the folder.

        A friend let this file throw in the root where the program should be executed.

        And there will be happiness.

        And don't you have to write

         Uses Graph; 
        • procedure InitG; this is not the whole program) only a procedure that initializes the graphics :) Thanks for the advice :) - pisarik