Score:0

How to use graphics.h header file in C in ubuntu 20.04?

cn flag

When I want to run program using graphics.h error "grprintf is undeclared in main" showing.

Vineet Tiwari avatar
cn flag
/usr/bin/ld: /tmp/ccN7XL3y.o: in function `main': hello.c:(.text+0x15): undefined reference to `grprintf' This error is seen when I try to run C program using gcc compiler in terminal.
in flag
What command do you issue to compile your program?
Score:0
ie flag

As mentioned in a prior post on StackOverflow, <graphics.h> is an old library and deprecated in favor of other more-modern libraries such as STL, Qt, and GTK+.

These libraries also have the benefit of allowing your code to be easily ported to other platforms.

If you are looking for a fully-fledged game engine, I would recommend looking into the Godot Engine.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.