Posted by
Daniele De Francesco-2 on
Mar 23, 2004; 7:22am
URL: http://quantlib.414.s1.nabble.com/error-LNK2019-unresolved-external-symbol-tp2836p2837.html
You mention that it fails when you compile it in Debug mode.
Do you get the same problem when you compile in Release mode?
You should check if in the project setup for Debug, you are linking into the
right runtime?
In particular, it seems that it's looking for the Multi-threaded Debug DLL
when linking.
If you are compiling your project with, say, Multi-threaded DLL, but the
quantlib library you are using was compiled with Multi-threaded Debug DLL,
then you'll probably get those kind of errors
-Daniele
-----Original Message-----
From: Phat Loc [mailto:
[hidden email]]
Sent: Sunday, March 21, 2004 10:15 PM
To:
[hidden email]
Subject: [Quantlib-users] error LNK2019: unresolved external symbol ?
Hi All,
I am new to QuantLib. This is my program
#define NOMINMAX
#include <ql/quantlib.hpp>
#include <iostream>
using namespace std;
int main()
{
QuantLib::Date Today;
return 0;
}
When I compile this under Debug. I get the following error? Any clue as to
what is wrong? Thanks in advance.
Phat
------ Build started: Project: quantlib_project, Configuration: Debug Win32
------
Linking...
QuantLib_MTDLL_d.lib(dataformatters.obj) : error LNK2019: unresolved
external symbol "__declspec(dllimport) public: char * __thiscall
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >::end(void)"
(__imp_?end@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE
PADXZ) referenced in function "public: static class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> > __cdecl QuantLib::StringFormatter::toLowercase(class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> > const &)"
(?toLowercase@StringFormatter@QuantLib@@SA?AV?$basic_string@DU?$char_traits@
D@std@@V?$allocator@D@2@@std@@ABV34@@Z)
QuantLib_MTDLL_d.lib(dataformatters.obj) : error LNK2019: unresolved
external symbol "__declspec(dllimport) public: char * __thiscall
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >::begin(void)"
(__imp_?begin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@Q
AEPADXZ) referenced in function "public: static class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> > __cdecl QuantLib::StringFormatter::toLowercase(class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> > const &)"
(?toLowercase@StringFormatter@QuantLib@@SA?AV?$basic_string@DU?$char_traits@
D@std@@V?$allocator@D@2@@std@@ABV34@@Z)
Debug/quantlib_project.exe : fatal error LNK1120: 2 unresolved externals
Build log was saved at "file://c:\Documents and Settings\Phat\My
Documents\Visual Studio Projects\quantlib_project\Debug\BuildLog.htm"
quantlib_project - 3 error(s), 0 warning(s)
---------------------- Done ----------------------
Build: 0 succeeded, 1 failed, 0 skipped