Thread: Using External functions

  1. #1
    Registered User
    Join Date
    Mar 2003

    Using External functions


    I've written a function, which is not related to any objects any methods.
    It's constuctor is like this:
    void SerialSend(AnsiString command)
    I've written it right under the other functions which are releted to the objects methods.
    I've copied this constructor to the user declared section of the .h file (to the public section).

    Now I try to run my program, and I get the error message:
    "[Linker Error] Unresolved external 'TfrmMain::SerialSend(System::AnsiString)' referenced from E:\PROJECTS\MOTIV10\UNIT1.OBJ'

    How ahould I do it right?


  2. #2
    Registered User
    Join Date
    May 2003
    hello, make sure u have included the Object file and the Header file ( which contains the function prototype ) into the project where u are calling the function.

  3. #3
    Registered User
    Join Date
    Mar 2003
    It has to be included, since I use Borland C++ Builder 5.0 and it does these things automatically. And besides this, the function is in the same file with the routines which call it.


Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Is it legal to have functions within functions?
    By Programmer_P in forum C++ Programming
    Replies: 13
    Last Post: 05-25-2009, 11:21 PM
  2. unresolved external symbols...linking errors in VC++
    By rammohan2b in forum C++ Programming
    Replies: 2
    Last Post: 01-22-2009, 01:19 AM
  3. Problem with OpenGL tutorial
    By 2Biaz in forum Windows Programming
    Replies: 18
    Last Post: 09-16-2004, 11:02 AM
  4. Help with error
    By Unregistered in forum C Programming
    Replies: 5
    Last Post: 04-17-2002, 09:36 AM
  5. Compiler errors
    By BellosX in forum C Programming
    Replies: 2
    Last Post: 09-21-2001, 03:24 AM