Linker error using Dev-C++

This is a discussion on Linker error using Dev-C++ within the C++ Programming forums, part of the General Programming Boards category; Hi everyone, I am trying to compile a program i have written for college, but i keep getting a linker ...

  1. #1
    Registered User
    Join Date
    Oct 2002
    Posts
    59

    Linker error using Dev-C++

    Hi everyone,

    I am trying to compile a program i have written for college, but i keep getting a linker error as follows:-


    [Linker error] undefined reference to `gotoxy'

    [Linker error] undefined reference to `clrscr'

    I am using Dev-C++ compiler

    I use borland turbo at college and the program runs fine,

    does anybody know how i can resolve this


    Thanks

  2. #2
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826

    Re: Linker error using Dev-C++

    Originally posted by boontune

    [Linker error] undefined reference to `gotoxy'

    [Linker error] undefined reference to `clrscr'


    does anybody know how i can resolve this
    Sure, define 'gotoxy' and 'clrscr' like your compiler tells you. In other words, this is what happens when you use non-ANSI functions and you move to another compiler. Welcome to the wild world of "portability". You've just had your first lesson, given to you by your compiler.

    Quzah.
    Hope is the first step on the road to disappointment.

  3. #3
    Registered User
    Join Date
    Oct 2002
    Posts
    59
    Im only a newbie,

    can you be a little more specific?

    or show me a tutorial, i reckon this is something i need to learn.

    sorry to be a pain!


    Boontune

  4. #4
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    Try this
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    Oct 2002
    Posts
    59
    Now you really are starting to confuse me!

    Is this something thats a pain to fix?

    From what quzah was saying it sounded quite simple,
    but now its flying right over my head!

  6. #6
    moi
    moi is offline
    Registered User moi's Avatar
    Join Date
    Jul 2002
    Posts
    946
    it is simple. your program uses gotoxy and clrscr. these are not standard functions. dev-c++ does not have them. the end.
    hello, internet!

  7. #7
    Registered User
    Join Date
    Oct 2002
    Posts
    59
    So what you saying?

    Get a new compiler?

  8. #8
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    Originally posted by moi
    it is simple. your program uses gotoxy and clrscr. these are not standard functions. dev-c++ does not have them. the end.
    Originally posted by boontune
    So what you saying?

    Get a new compiler?
    Arrrrrrg. I give up. It's not that hard. People wonder why I sound ........ed off all the time here. This may have something to do with it. How much clearer do you need it?

    Either (a) don't use non-ANSI functions, and you'll never encountere this, or (b) don't ever plan on porting your code to another platform or compiler.

    Quzah.
    Hope is the first step on the road to disappointment.

  9. #9
    Registered User
    Join Date
    Oct 2002
    Posts
    59
    hehehe

    sorry to get you wound up mate!

    I got it now! i bet you have asked silly questions when you first started out in C++..........


    Cheers for clearing that up guys.


    Boontune

  10. #10
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    The problem is that I gave a clear, exact answer in the very first post. Don't sweat it. I just rant and rave, no one pays attention to me, and I wander off. It's the same vicious cycle.

    Quzah.
    Hope is the first step on the road to disappointment.

  11. #11
    Registered User
    Join Date
    Oct 2002
    Posts
    59
    No worries mate

    cheers

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. linker error dev c++
    By manish_fra in forum C++ Programming
    Replies: 2
    Last Post: 12-11-2008, 10:07 AM
  2. Linker Problem with Dev C++
    By Brownie in forum C++ Programming
    Replies: 2
    Last Post: 09-26-2008, 07:18 AM
  3. Linker errors in Dev C++
    By tezcatlipooca in forum C++ Programming
    Replies: 12
    Last Post: 01-02-2007, 07:32 PM
  4. Linker error in Dev Cpp (DX)
    By C+noob in forum Game Programming
    Replies: 2
    Last Post: 08-15-2005, 03:13 AM
  5. Dev C++ linker error: undefined reference
    By josh_d in forum Windows Programming
    Replies: 11
    Last Post: 03-11-2004, 10:58 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21