|
|
Re: Undefined Reference To 'initgraph' [message #1806613 is a reply to message #1806604] |
Sat, 11 May 2019 22:47 |
David Vavra Messages: 1426 Registered: October 2012 |
Senior Member |
|
|
:) As Joost pointed out, you didn't ask anything.
But I'm guessing you meant to add "why am I getting these errors?"
Undefined reference to 'sym' is a link error saying you never defined the symbol 'sym'
Which means none of the object files you gave to the linker contain it.
In your case, they are likely in some library and you have to inform the linker which one it is.
You do this by adding -lxxx where the library name is libxxx.<some OS dependent lib extension>
And you add the path containing it to the library search list with -Lpath
To do this with a CDT Managed Build (where Eclipse/CDT creates the makefile),
Project --> Properties --> C/C++ Build --> Settings --> Tool Settings tab --> Linker --> Libraries
The top pane in the resulting dialog is for library names without the -l
And the bottom one is for adding a path to the library search list (without the -L)
Eclipse will add the -l and -L as appropriate.
|
|
|
Powered by
FUDForum. Page generated in 0.03608 seconds