Newsgroup: comp.lang.c++
Subject: Linker Error: LNK2001 With This Visual Studio Project
From: "clus.aol.com" <clusardi2k@...>
Date: Wed, 26 Jun 2013 12:24:24 -0700 (PDT)
//File Trains.h
#include <string>
class Trains
{
public:
static std:string haveToWash;
std::string getTrain ();
};
//File Trains.cpp
#include "StdAfx.h"
#include "Trains.h"
#include <string>
std::string Trains::getTrain()
{
return haveToWash;
}
//File with main routine
#include "StdAfs.h"
#include <string>
int main (int argc, _TCHAR* argv[])
{
return 0;
}
Build Error:
1>Trains.obj : error LNK2001: unresolved external symbol "public: static class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > Trains::havetoWash"(?haveToWash@...r_traits@...
Subject: Linker Error: LNK2001 With This Visual Studio Project
From: "clus.aol.com" <clusardi2k@...>
Date: Wed, 26 Jun 2013 12:24:24 -0700 (PDT)
//File Trains.h
#include <string>
class Trains
{
public:
static std:string haveToWash;
std::string getTrain ();
};
//File Trains.cpp
#include "StdAfx.h"
#include "Trains.h"
#include <string>
std::string Trains::getTrain()
{
return haveToWash;
}
//File with main routine
#include "StdAfs.h"
#include <string>
int main (int argc, _TCHAR* argv[])
{
return 0;
}
Build Error:
1>Trains.obj : error LNK2001: unresolved external symbol "public: static class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > Trains::havetoWash"(?haveToWash@...r_traits@...
via Usenet Forums - Usenet Search,Free Usenet - comp.lang.c++ http://www.pocketbinaries.com/usenet-forums/showthread.php?29120-Linker-Error-LNK2001-With-This-Visual-Studio-Project&goto=newpost
View all the progranning help forums at:
http://www.pocketbinaries.com/usenet-forums/forumdisplay.php?128-Coding-forums
No comments:
Post a Comment