Hi,
I've got a function:
If I place the function in the main file it works as expected.
If I place the function in a static Lib (which contains other functions which works fine in the Lib):
my main project compiles with the following error:
Error 2 error LNK2001: unresolved external symbol "public: static class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl JCppLib::JLib::jReplace(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?jReplace@JLib@JCppLib@@SA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAV34@ABV34@1@Z) testJCppLib.obj testJCppLib
Any suggestion are very welcome.
thx in advance
Sunaj
'The gap between theory and practice is not as wide in theory as it is in practice'
I've got a function:
Code:
string jReplace(string& s, string const& find, string const& replace)
If I place the function in the main file it works as expected.
If I place the function in a static Lib (which contains other functions which works fine in the Lib):
Code:
static string jReplace(string&, string const&, string const&);
Error 2 error LNK2001: unresolved external symbol "public: static class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl JCppLib::JLib::jReplace(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?jReplace@JLib@JCppLib@@SA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAV34@ABV34@1@Z) testJCppLib.obj testJCppLib
Any suggestion are very welcome.
thx in advance
Sunaj
'The gap between theory and practice is not as wide in theory as it is in practice'