what does:
[Linker Error] Unresolved external '__fastcall TForm1::FormActivate(System::TObject *)' referenced from E:\MYDOCS\CHRIS\PHANTOM\UNIT1.OBJ
mean?
thx!
what does:
[Linker Error] Unresolved external '__fastcall TForm1::FormActivate(System::TObject *)' referenced from E:\MYDOCS\CHRIS\PHANTOM\UNIT1.OBJ
mean?
thx!
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.
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
Same thing. Undeclared class. Find it or fake it.
Code:#include <cmath> #include <complex> bool euler_flip(bool value) { return std::pow ( std::complex<float>(std::exp(1.0)), std::complex<float>(0, 1) * std::complex<float>(std::atan(1.0) *(1 << (value + 2))) ).real() < 0; }
what do u mean, "Undeclared class"? How would I declare it? CheersOriginally Posted by Sebastiani
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:
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.Code:#include "MyClass.h" int main() { myClass example; return 0; }