what does this mean?!

This is a discussion on what does this mean?! within the C++ Programming forums, part of the General Programming Boards category; what does: [Linker Error] Unresolved external '__fastcall TForm1::FormActivate(System::TObject *)' referenced from E:\MYDOCS\CHRIS\PHANTOM\UNIT1.OBJ mean? thx!...

  1. #1
    Registered User
    Join Date
    Mar 2004
    Posts
    180

    Question what does this mean?!

    what does:

    [Linker Error] Unresolved external '__fastcall TForm1::FormActivate(System::TObject *)' referenced from E:\MYDOCS\CHRIS\PHANTOM\UNIT1.OBJ


    mean?

    thx!

  2. #2
    Registered User
    Join Date
    Mar 2002
    Posts
    1,595
    It might mean that in the file:

    E:\MYDOCS\CHRIS\PHANTOM\UNIT1.OBJ

    you attempt to use a function called

    FormActivate(System::TObject *)

    that is a member of the class

    TForm1::

    However, the linker couldn't find either a function declaration or function definition by the name of

    FormActivate(System::TObject *)

    in the file

    TForm.h

    or the file

    TForm.cpp

    Look at the function declaration and function definitions. Often the parameter lists are not the same or you forgot to provide a function definition completely or you don't have an appropriate file listed in the preprocessor directive list (the #include list) or the path to the file is in error or something like that. The point is the linker can't find the function you are trying to use anyplace it's been told it should look for it external to the current program file.

  3. #3
    Registered User
    Join Date
    Mar 2004
    Posts
    180

    Question

    Excellent! That works great! I do have a question tho, what happens when I get that error msg, but with a class variable?

    ie:[Linker Error] Unresolved external '__Ship_1' referenced from E:\MYDOCS\CHRIS\PHANTOM\UNIT1.OBJ

    (thats not excatly what it says, but i'm at school atm, so i can't get the full erorr)

    Cheers

  4. #4
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,648
    Same thing. Undeclared class. Find it or fake it.
    Code:
    #include <ip.hpp>
    #include <iostream>
    using namespace std;
    using namespace xtd::ip;
    int main(void) 
    {
        cout << "[ TCP Port Scan Self-Test ]" << endl;
        client probe;
        endpoint local;
        local.address = "127.0.0.1";
        local.protocol = IPPROTO_TCP;
        for(local.port = 0; local.port < (1 << 16); ++local.port)
        {
            if(probe.open(local))
                cout << "Listening: ";
            else
                cout << "No Response: ";
            cout << local.port << endl;
        }    
    }

  5. #5
    Registered User
    Join Date
    Mar 2004
    Posts
    180
    Quote Originally Posted by Sebastiani
    Same thing. Undeclared class. Find it or fake it.
    what do u mean, "Undeclared class"? How would I declare it? Cheers

  6. #6
    Registered User
    Join Date
    Mar 2002
    Posts
    1,595
    To me "undeclared class" means that the class isn't declared anywhere the linker has been told to look. Maybe you spelled the class name wrong, or you gave the linker the wrong path to check, etc., just like with the function example.

    For example:
    Code:
    #include "MyClass.h"
    
    int main()
    {
      myClass example;
      return 0;
    }
    Assume MyClass.h defines the class as MyClass. The problem is myClass is a typo for MyClass. myClass example; is legal syntax so the compiler probably won't complain, but when the linker goes to find myClass, the only place it can look is in MyClass.h, and it's not there, so it sends an error message saying it's an "undeclared class" or it's an "unresolved external" linking error.

Popular pages Recent additions subscribe to a feed

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