Trying to code pure valid C++

Started by
82 comments, last by programering 16 years, 3 months ago
This linking error first appeared when I added the std string vector. But thanks for your info.

I've found this with the forum search.

I've found:
Quote:


Thanks, JMerliN. I didn't look at msdn2 as I was not aware it existed -- but obviously its now the place to be. As you suggested, my problem was resolved by selecting the correct debug runtime library, with a vcc commandline switch.

I then had another CRT problem due to the linker loading from MSVCRT.lib (despite its own warning that it was incompatible with other libs) but since msvcrt80.dll was (corredtly) not put in the manifest the app would not start. Ignoring MSVCRT.lib fixed that, all OK now.


How do I set that vcc commandline switch?

Here's some useful info.

[Edited by - programering on January 9, 2008 8:45:15 PM]
Advertisement
Is there something wrong here maybe?
void CFile::SetDir(const std::string &rDirname){	// Reset the directory name string vector.	m_vecDirs.clear();	// Add the first directory name string.	m_vecDirs.push_back(rDirname);}void CFile::AddDir(const std::string &rDirname){	// Add directory name string.	m_vecDirs.push_back(rDirname);}

Declaration:
class CFile{public:	CFile(const std::string &rFilename);	void SetDir(FILEDIR dir);	void SetDir(const std::string &rDirname);	void AddDir(const std::string &rDirname);	SDL_RWops *Open(char *mode);	SDL_RWops *Open(const std::string &rFilepath, char *mode);	SDL_RWops *GetRWops();	void Close();	~CFile();	static sFileDir *s_pFileDirs;private:	std::string m_filename;	std::vector<std::string> m_vecDirs;	void buildpath();	std::string m_dirpath;	std::string m_filepath;	SDL_RWops *m_pRWops;};

Any help that will solve this is very appreciated. [smile]
Go to Project -> Project Properties -> C/C++ -> Runtime Library and try selecting a different runtime library.

Also, go to Project -> Project Properties -> Linker -> Input -> Ignore Specific Library, and write "msvcrt.lib".
Quote:Original post by Gage64
Go to Project -> Project Properties -> C/C++ -> Runtime Library and try selecting a different runtime library.
I've tried that before but it didn't work.


I got it to build now. And I have solved my directory problem with vector myself.

This topic is closed to new replies.

Advertisement