Results 1 to 6 of 6

Thread: Undefined reference, not sure what to do

  1. #1
    Join Date
    May 2013
    Beans
    2

    Question Undefined reference, not sure what to do

    I am trying to use gcc and graphics. I am getting an error

    undefined reference to `graphresult'

    Do not know where to ask for help

  2. #2
    Join Date
    Jun 2007
    Location
    Porirua, New Zealand
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: New to forum. Want to know where to post my querry

    Thread moved to Programming Talk.
    Forum DOs and DON'Ts
    Never assume that information you find using a search engine is up-to-date.

  3. #3
    Join Date
    Oct 2009
    Location
    Reykjavík, Ísland
    Beans
    9,706
    Distro
    Lubuntu 14.04 Trusty Tahr

    Re: New to forum. Want to know where to post my querry

    Welcome to the fora.

    Feel free to post here. Worst case scenario is that we'll simply move it.

    http://ubuntuforums.org/showthread.php?t=1422475
    About problems due to upgrading
    Bringing old hardware back to life.
    Please visit Quick Links -> Unanswered Posts

  4. #4
    Join Date
    Jun 2007
    Location
    Porirua, New Zealand
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Undefined reference, not sure what to do

    Hi, and welcome to the forum.

    I've renamed your thread and moved it to a section of the forum that deals with programming questions.
    Forum DOs and DON'Ts
    Never assume that information you find using a search engine is up-to-date.

  5. #5
    Join Date
    Aug 2010
    Location
    Lancs, United Kingdom
    Beans
    1,109
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: Undefined reference, not sure what to do

    What is it that you are trying to compile? Is it something you have written yourself or that you have copied from somewhere?


    What is graphresult? It isn't a standard C function, so you need to link to either the source for that function, or to a library containing the object code for it. e.g.
    Code:
    gcc -o myprogram myprogram.c -lNameOfLibraryContainingGraphresult

    Google tells me that graphresult is in a Turbo-C library (for Windows), but this might not be what you mean.

  6. #6
    Join Date
    May 2013
    Beans
    2

    Re: Undefined reference, not sure what to do

    Let me narrate what was I exactly compiling.

    I want to write a C program for interraction with the user. Normal scanf and printf use a standard font for the input and out put. I want to be able to control the font and the font size while interracting with the user.
    I located a program that demonstrates this aspect of programming. I found this program on the following link

    http://www.syvum.com/cgi/online/serv.../cpp_p18a.html

    the program is titled C++ Programming : Program 18-A on the forum Syvum.

    I noticed that I need to have the graphics.h and found detailed instructions for getting it at the link

    http://vksalian-techblog.blogspot.in...aries-and.html

    The post says that I should install the package libgraph-1.0.1 I installed libgraph-1.0.2 thinking that latter version is better.

    I followed the instructions on the blog to compile the program that was to show me how to manipulate the fonts while interracting with the user.
    I got the above error - undefined reference to `graphresult'
    This was one of the errors. There were other functions also like settextstyle etc.

    What must have been my error?

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •