S
stevenruiz
Hi Everyone,
The problem that I have involves compiling two files. I've
received this error before and I understood that I was missing the
correct library. The error is as follows:
ld: Unresolved:
String::getline(std::basic_istream <char,
std::char_traits<char>&>, const &String String)
The code segment follows this structure:
#include <fstream>
#include "String.h"
#include <string>
function()
{
String val = "";
ifstream File;
int num_of_exits=0;
try
{
File.open(<path>, val);
while( ! File.eof())
{
//Searching for specific word
if( val.find("Exit") != string::npos)
num_of_exits++
//Searching for a word
getline(File, val)
}
}
catch(Exception& E)
{}
}
In my makefile, I have included the necessary libraries to compile. I
was able to confirm that the getline does exist with the nm
command. Is there any other reason why this would happen besides
not including the proper libraries or includes? Any ideas. Thanks.
The problem that I have involves compiling two files. I've
received this error before and I understood that I was missing the
correct library. The error is as follows:
ld: Unresolved:
String::getline(std::basic_istream <char,
std::char_traits<char>&>, const &String String)
The code segment follows this structure:
#include <fstream>
#include "String.h"
#include <string>
function()
{
String val = "";
ifstream File;
int num_of_exits=0;
try
{
File.open(<path>, val);
while( ! File.eof())
{
//Searching for specific word
if( val.find("Exit") != string::npos)
num_of_exits++
//Searching for a word
getline(File, val)
}
}
catch(Exception& E)
{}
}
In my makefile, I have included the necessary libraries to compile. I
was able to confirm that the getline does exist with the nm
command. Is there any other reason why this would happen besides
not including the proper libraries or includes? Any ideas. Thanks.