How to include the headers of the gotoxy () and textcolor ()

2

What library could be used to compile a C code that uses the gotoxy() and textcolor() functions, by Code :: Blocks 16.1, Windows 7 environment?

I'm using: stdio.h , conio.h , windows.h and stdlib.h but it's not working, I'm getting the errors:

undefined reference to gotoxy

and

undefined reference to textcolor.

Thank you.

    
asked by anonymous 03.03.2016 / 22:15

2 answers

1

The functions you mentioned are part of the conio. The undefined reference error is a linkage error, meaning you may not be linking to the library. Go to the Code :: Blocks linking options part and add a -lconio .

    
05.03.2016 / 04:45
1

Problem solved! I added <windows.h> and compiled it with no errors or warnings, and ran as expected! Everyone who answered not only helped but also added more knowledge, but without the hint of the user @monfico, would not have come to this result so quickly, anyway, thanks to everyone, and I hope that my old problem serves as a solution for others.

    
06.03.2016 / 01:34