what the heck is an unresolved external?
what the heck is an unresolved external?
usually a serious error resulting the code not to finish compiling....any code?
posty some code and a copy of the error...use code tags.
Usually appears when you've included a header but not linked the libraries.
MagosX.com
Give a man a fish and you feed him for a day.
Teach a man to fish and you feed him for a lifetime.
the code is from the marine biology case study heres my main (whats a code tag?)
#include <iostream.h>
#include <fstream.h>
#include <apstring.h>
#include "environ.h"
#include "display.h"
#include "simulate.h"
#include "nbrhood.h"
#include "position.h"
#include "utils.h"
int main()
{
// replace filename below with appropriate file (full path if necessary)
ifstream input("C:\\My Documents\\Programs\\fish.txt");
Environment env(input);
// Display display(100,100); // for graphics display
Display display; // for text display
apstring s;
Simulation sim;
int step;
int numSteps;
display.Show(env);
cout << "--- initialized --- " << endl;
cout << "How many steps? ";
cin >> numSteps;
getline(cin, s);
for (step = 0; step < numSteps; step++)
{
sim.Step(env);
display.Show(env);
cout << " step " << step << " (press return)";
getline(cin, s);
}
return 0;
}
fishsim.obj : error LNK2001: unresolved external symbol "public: void __thiscall Simulation::Step(class Environment &)" (?Step@Simulation@@QAEXAAVEnvironment@@@Z)
fishsim.obj : error LNK2001: unresolved external symbol "public: void __thiscall Display::Show(class Environment const &)" (?Show@Display@@QAEXABVEnvironment@@@Z)
fishsim.obj : error LNK2001: unresolved external symbol "public: __thiscall Simulation::Simulation(void)" (??0Simulation@@QAE@XZ)
fishsim.obj : error LNK2001: unresolved external symbol "public: __thiscall Display:isplay(void)" (??0Display@@QAE@XZ)
fishsim.obj : error LNK2001: unresolved external symbol "public: __thiscall Environment::Environment(class istream &)" (??
0Environment@@QAE@AAVistream@@@Z)
Debug/fishsim.exe : fatal error LNK1120: 5 unresolved externals
have you included the .cpp files into the project? the environ.cpp, simulate.cpp, display.cpp, etc. etc. ?
lol thx it works now!