how to solve codeblocks unable to run a graphics c program properly

后端 未结 2 1557
渐次进展
渐次进展 2021-01-29 13:40

I had setup codeblocks for graphics programming. like I install winbgim file. and done other setup in the codeblocks linker setting. but when I ran a program like this

2条回答
  •  天涯浪人
    2021-01-29 14:41

    I faced the same issue. Did you download WinBGIm library from its website?

    If yes, then the header files graphics.h and winbgim.h have a bug. On line 302, of each of those files, replace right = 0 with top = 0.

    But, then the problem is the library itself was built using the "buggy" header files, so:

    • you either need to build the library from the source code yourself, or
    • you need to download corrected library which was already built by someone else who faced this issue. Fortunately, I found such a library here (Link in Step 2).

    So, now if you put the corrected files (header files as well as the library), in the target folders and re-build, the program should not crash.

提交回复
热议问题