Author Topic: Graphics  (Read 135 times)

Offline MarcIT

  • Single posting newcomer
  • *
  • Posts: 1
Graphics
« on: December 01, 2017, 01:22:28 pm »
Hi! I want to debug a project with graphics.h header but I still getting the error "has stopped working". I've downloaded graphics,winbgim, libbgi.a and I pasted them into include/ subdirectory and lib/. I modified graphics.h at line 302 and I add at linker settings in codeblocks all which I need. But I don't know how to initialize that BGI drawing window. How can I do that?  :) and I use Code::Blocks 13.12 ! Sorry for my english if I had mistakes!  ;) My code is simple:

#include <graphics.h>

using namespace std;

int main()
{
    initwindow(400, 300, "Windows BGI");
    line(0, 0, 100, 100);
    getch();
    closegraph();
    return 0;
}

Sorry for copy-paste :)
« Last Edit: December 01, 2017, 04:43:56 pm by MarcIT »

Offline stahta01

  • Lives here!
  • ****
  • Posts: 5991
    • My Best Post
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Testing, compiling CB Trunk against wxWidgets 3.0.2.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org