CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2007
    Posts
    6

    [RESOLVED] undefined symbol

    i've been doing some c/c++ exercises concerning graphics manipulation.

    when i compiled it error appeared. saying undefined symbol initgraph, setcolor,rectangle,etc..

    this is the first time i encountered such problem of course i have been using different cp then.

    i'm using turbo c++ ide 3.0..

    silentwings

  2. #2
    Join Date
    Jan 2006
    Location
    Singapore
    Posts
    6,765

    Re: undefined symbol

    You probably failed to link to some of your object files or a library.
    C + C++ Compiler: MinGW port of GCC
    Build + Version Control System: SCons + Bazaar

    Look up a C/C++ Reference and learn How To Ask Questions The Smart Way
    Kindly rate my posts if you found them useful

  3. #3
    Join Date
    Aug 2005
    Posts
    132

    Re: undefined symbol

    Hi there silentwings.

    Probably the best way to get some assistance is to post the code that you've having trouble compiling. Try to isolate it down to just a few lines if you can and then post it here wrapped in code tags.

    Undefined symbol is often due to forgetting to include a header file.

  4. #4
    Join Date
    Mar 2007
    Location
    Montreal, Quebec, Canada
    Posts
    185

    Re: undefined symbol

    Undefined symbol errors also come up a lot when you don't link the libraries to your program, or if you forget to add one of your .cpp files when you compile. What are the errors you are getting? You might have to change your compiler settings to include the graphics libraries you are trying to use.

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured