dll issue using Qt in Visual Studio 2012 - c++

I am a newbie building stuffs on Visual Studio and now I am facing this little problem that I am not able to solve. I correctly installed Qt and used the correct paths on the "VC++ Directories" property of my project (indeed in my code the include are correctly seen). The next step should be to put the correct stuffs in the "linker" of my project.. this is at least what I think the problem consists on. Anyway, I have 100 error of this kind:
error LNK2001: unresolved external symbol "__declspec(dllimport) protected: virtual void __thiscall QObject::disconnectNotify(class QMetaMethod const &)" (__imp_?disconnectNotify#QObject##MAEXABVQMetaMethod###Z) C:\Users\Henry\Desktop\PhotonMapping\PhotonMapping\main.obj PhotonMapping
error LNK2001: unresolved external symbol "__declspec(dllimport) protected: virtual void __thiscall QObject::connectNotify(class QMetaMethod const &)" (__imp_?connectNotify#QObject##MAEXABVQMetaMethod###Z) C:\Users\Henry\Desktop\PhotonMapping\PhotonMapping\main.obj PhotonMapping
error LNK2001: unresolved external symbol "__declspec(dllimport) protected: virtual void __thiscall QObject::customEvent(class QEvent *)" (__imp_?customEvent#QObject##MAEXPAVQEvent###Z) C:\Users\Henry\Desktop\PhotonMapping\PhotonMapping\main.obj PhotonMapping
error LNK2001: unresolved external symbol "__declspec(dllimport) protected: virtual void __thiscall QObject::childEvent(class QChildEvent *)" (__imp_?childEvent#QObject##MAEXPAVQChildEvent###Z) C:\Users\Henry\Desktop\PhotonMapping\PhotonMapping\main.obj PhotonMapping
error LNK2001: unresolved external symbol "__declspec(dllimport) protected: virtual void __thiscall QObject::timerEvent(class QTimerEvent *)" (__imp_?timerEvent#QObject##MAEXPAVQTimerEvent###Z) C:\Users\Henry\Desktop\PhotonMapping\PhotonMapping\main.obj PhotonMapping
error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual bool __thiscall QObject::eventFilter(class QObject *,class QEvent *)" (__imp_?eventFilter#QObject##UAE_NPAV1#PAVQEvent###Z) C:\Users\Henry\Desktop\PhotonMapping\PhotonMapping\main.obj PhotonMapping
error LNK2001: unresolved external symbol "__declspec(dllimport) double * __cdecl annAllocPt(int,double)" (__imp_?annAllocPt##YAPANHN#Z) C:\Users\Henry\Desktop\PhotonMapping\PhotonMapping\main.obj PhotonMapping
error LNK2001: unresolved external symbol "__declspec(dllimport) protected: virtual int __thiscall QImage::metric(enum QPaintDevice::PaintDeviceMetric)const " (__imp_?metric#QImage##MBEHW4PaintDeviceMetric#QPaintDevice###Z) C:\Users\Henry\Desktop\PhotonMapping\PhotonMapping\main.obj PhotonMapping
error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual class QPaintEngine * __thiscall QImage::paintEngine(void)const " (__imp_?paintEngine#QImage##UBEPAVQPaintEngine##XZ) C:\Users\Henry\Desktop\PhotonMapping\PhotonMapping\main.obj PhotonMapping
error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall QImage::setPixel(int,int,unsigned int)" (__imp_?setPixel#QImage##QAEXHHI#Z) C:\Users\Henry\Desktop\PhotonMapping\PhotonMapping\main.obj PhotonMapping
error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual int __thiscall QImage::devType(void)const " (__imp_?devType#QImage##UBEHXZ) C:\Users\Henry\Desktop\PhotonMapping\PhotonMapping\main.obj PhotonMapping
error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall QImage::~QImage(void)" (__imp_??1QImage##UAE#XZ) C:\Users\Henry\Desktop\PhotonMapping\PhotonMapping\main.obj PhotonMapping
error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QImage::QImage(int,int,enum QImage::Format)" (__imp_??0QImage##QAE#HHW4Format#0##Z) C:\Users\Henry\Desktop\PhotonMapping\PhotonMapping\main.obj PhotonMapping
error LNK2001: unresolved external symbol "__declspec(dllimport) double * * __cdecl annAllocPts(int,int)" (__imp_?annAllocPts##YAPAPANHH#Z) C:\Users\Henry\Desktop\PhotonMapping\PhotonMapping\main.obj PhotonMapping
error LNK2001: unresolved external symbol "__declspec(dllimport) public: static int __cdecl QApplication::exec(void)" (__imp_?exec#QApplication##SAHXZ) C:\Users\Henry\Desktop\PhotonMapping\PhotonMapping\main.obj PhotonMapping
error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall QApplication::~QApplication(void)" (__imp_??1QApplication##UAE#XZ) C:\Users\Henry\Desktop\PhotonMapping\PhotonMapping\main.obj PhotonMapping
error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QApplication::QApplication(int &,char * *,int)" (__imp_??0QApplication##QAE#AAHPAPADH#Z) C:\Users\Henry\Desktop\PhotonMapping\PhotonMapping\main.obj PhotonMapping
I know that the problem is stupid but I would like to understand it.. in such a way to learn how to solve it the next time I am going to face it. Thanks in advance!
Enrico

Related

CMake Qt build on windows linker problems

I am trying to build and compile a Qt project from a repo. The project contains a CMake file, which I am using to build and then compile using nmake. However, I am getting a bunch of linker errors towards the end of the compile and don't have much experience with CMake so not really sure where I am going wrong. I am using MSVC 14.11.25503.
The CMakeList.txt is here:
cmake_minimum_required(VERSION 3.6 FATAL_ERROR)
project(loggerGUI CXX)
set(TARGET ${CMAKE_PROJECT_NAME})
set(CMAKE_AUTOMOC ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
find_package(Qt5Widgets REQUIRED)
find_package(Qt5PrintSupport REQUIRED)
find_package(Qt5Bluetooth REQUIRED)
add_subdirectory(include/cpptoml)
add_subdirectory(include/qcustomplot)
add_subdirectory(include/easylogging++)
file(GLOB CPP_SOURCES
src/*.cpp)
file(GLOB HDR_SOURCES
src/*.h)
set(UI_SOURCES src/mainwindow.ui)
qt5_wrap_cpp(HDR_MOC ${HDR_SOURCES})
qt5_wrap_ui(UI_GENERATED_HEADERS ${UI_SOURCES})
add_executable(${TARGET} ${CPP_SOURCES} ${HDR_MOC} ${UI_GENERATED_HEADERS})
# generate proper GUI program on specified platform
if(WIN32) # Check if we are on Windows
if(MSVC) # Check if we are using the Visual Studio compiler
set_target_properties(${TARGET} PROPERTIES
WIN32_EXECUTABLE YES
LINK_FLAGS "/ENTRY:mainCRTStartup"
)
elseif(CMAKE_COMPILER_IS_GNUCXX)
# SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mwindows") # Not tested
else()
message(SEND_ERROR "You are using an unsupported Windows compiler! (Not MSVC or GCC)")
endif(MSVC)
elseif(APPLE)
set_target_properties(${TARGET} PROPERTIES
MACOSX_BUNDLE YES
)
elseif(UNIX)
# Nothing special required
else()
message(SEND_ERROR "You are on an unsupported platform! (Not Win32, Mac OS X or Unix)")
endif(WIN32)
qt5_use_modules(${TARGET} Widgets PrintSupport Bluetooth)
target_link_libraries(${TARGET} cpptoml)
target_link_libraries(${TARGET} easylogging++)
target_link_libraries(${TARGET} qcustomplot)
I am deleting my build folder before running CMake so from what I understand globbing shouldn't be a problem. Here is a part of the output from nmake (I can't fit it all in and at a point it becomes redundant):
[ 80%] Linking CXX executable loggerGUI.exe
mocs_compilation.cpp.obj : error LNK2005: "public: virtual struct QMetaObject const * __thiscall ConnectionHandler::metaObject(void)const " (?metaObject#ConnectionHandler##UBEPBUQMetaObject##XZ) already defined in moc_connectionHandler.cpp.obj
mocs_compilation.cpp.obj : error LNK2005: "public: virtual void * __thiscall ConnectionHandler::qt_metacast(char const *)" (?qt_metacast#ConnectionHandler##UAEPAXPBD#Z) already defined in moc_connectionHandler.cpp.obj
mocs_compilation.cpp.obj : error LNK2005: "public: virtual int __thiscall ConnectionHandler::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall#ConnectionHandler##UAEHW4Call#QMetaObject##HPAPAX#Z) already defined in moc_connectionHandler.cpp.obj
mocs_compilation.cpp.obj : error LNK2005: "private: static void __cdecl ConnectionHandler::qt_static_metacall(class QObject *,enum QMetaObject::Call,int,void * *)" (?qt_static_metacall#ConnectionHandler##CAXPAVQObject##W4Call#QMetaObject##HPAPAX#Z) already defined in moc_connectionHandler.cpp.obj
mocs_compilation.cpp.obj : error LNK2005: "public: virtual struct QMetaObject const * __thiscall Logger::metaObject(void)const " (?metaObject#Logger##UBEPBUQMetaObject##XZ) already defined in moc_logger.cpp.obj
mocs_compilation.cpp.obj : error LNK2005: "public: virtual void * __thiscall Logger::qt_metacast(char const *)" (?qt_metacast#Logger##UAEPAXPBD#Z) already defined in moc_logger.cpp.obj
mocs_compilation.cpp.obj : error LNK2005: "public: virtual int __thiscall Logger::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall#Logger##UAEHW4Call#QMetaObject##HPAPAX#Z) already defined in moc_logger.cpp.obj
mocs_compilation.cpp.obj : error LNK2005: "private: static void __cdecl Logger::qt_static_metacall(class QObject *,enum QMetaObject::Call,int,void * *)" (?qt_static_metacall#Logger##CAXPAVQObject##W4Call#QMetaObject##HPAPAX#Z) already defined in moc_logger.cpp.obj
mocs_compilation.cpp.obj : error LNK2005: "public: virtual struct QMetaObject const * __thiscall Plotter::metaObject(void)const " (?metaObject#Plotter##UBEPBUQMetaObject##XZ) already defined in moc_plotter.cpp.obj
mocs_compilation.cpp.obj : error LNK2005: "public: virtual void * __thiscall Plotter::qt_metacast(char const *)" (?qt_metacast#Plotter##UAEPAXPBD#Z) already defined in moc_plotter.cpp.obj
mocs_compilation.cpp.obj : error LNK2005: "public: virtual int __thiscall Plotter::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall#Plotter##UAEHW4Call#QMetaObject##HPAPAX#Z) already defined in moc_plotter.cpp.obj
mocs_compilation.cpp.obj : error LNK2005: "private: static void __cdecl Plotter::qt_static_metacall(class QObject *,enum QMetaObject::Call,int,void * *)" (?qt_static_metacall#Plotter##CAXPAVQObject##W4Call#QMetaObject##HPAPAX#Z) already defined in moc_plotter.cpp.obj
mocs_compilation.cpp.obj : error LNK2005: "public: virtual struct QMetaObject const * __thiscall SerialParser::metaObject(void)const " (?metaObject#SerialParser##UBEPBUQMetaObject##XZ) already defined in moc_serialParser.cpp.obj
mocs_compilation.cpp.obj : error LNK2005: "public: virtual void * __thiscall SerialParser::qt_metacast(char const *)" (?qt_metacast#SerialParser##UAEPAXPBD#Z) already defined in moc_serialParser.cpp.obj
mocs_compilation.cpp.obj : error LNK2005: "public: virtual int __thiscall SerialParser::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall#SerialParser##UAEHW4Call#QMetaObject##HPAPAX#Z) already defined in moc_serialParser.cpp.obj
mocs_compilation.cpp.obj : error LNK2005: "private: static void __cdecl SerialParser::qt_static_metacall(class QObject *,enum QMetaObject::Call,int,void * *)" (?qt_static_metacall#SerialParser##CAXPAVQObject##W4Call#QMetaObject##HPAPAX#Z) already defined in moc_serialParser.cpp.obj
mocs_compilation.cpp.obj : error LNK2005: "public: virtual struct QMetaObject const * __thiscall Table::metaObject(void)const " (?metaObject#Table##UBEPBUQMetaObject##XZ) already defined in moc_table.cpp.obj
mocs_compilation.cpp.obj : error LNK2005: "public: virtual void * __thiscall Table::qt_metacast(char const *)" (?qt_metacast#Table##UAEPAXPBD#Z) already defined in moc_table.cpp.obj
mocs_compilation.cpp.obj : error LNK2005: "public: virtual int __thiscall Table::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall#Table##UAEHW4Call#QMetaObject##HPAPAX#Z) already defined in moc_table.cpp.obj
mocs_compilation.cpp.obj : error LNK2005: "private: static void __cdecl Table::qt_static_metacall(class QObject *,enum QMetaObject::Call,int,void * *)" (?qt_static_metacall#Table##CAXPAVQObject##W4Call#QMetaObject##HPAPAX#Z) already defined in moc_table.cpp.obj
mocs_compilation.cpp.obj : error LNK2005: "public: void __thiscall Table::graphToggled(class dataStream)" (?graphToggled#Table##QAEXVdataStream###Z) already defined in moc_table.cpp.obj
mocs_compilation.cpp.obj : error LNK2005: "public: void __thiscall Table::axisToggled(class dataStream)" (?axisToggled#Table##QAEXVdataStream###Z) already defined in moc_table.cpp.obj
mocs_compilation.cpp.obj : error LNK2005: "public: virtual struct QMetaObject const * __thiscall loggerGUI::metaObject(void)const " (?metaObject#loggerGUI##UBEPBUQMetaObject##XZ) already defined in moc_loggerGUI.cpp.obj
mocs_compilation.cpp.obj : error LNK2005: "public: virtual void * __thiscall loggerGUI::qt_metacast(char const *)" (?qt_metacast#loggerGUI##UAEPAXPBD#Z) already defined in moc_loggerGUI.cpp.obj
mocs_compilation.cpp.obj : error LNK2005: "public: virtual int __thiscall loggerGUI::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall#loggerGUI##UAEHW4Call#QMetaObject##HPAPAX#Z) already defined in moc_loggerGUI.cpp.obj
mocs_compilation.cpp.obj : error LNK2005: "private: static void __cdecl loggerGUI::qt_static_metacall(class QObject *,enum QMetaObject::Call,int,void * *)" (?qt_static_metacall#loggerGUI##CAXPAVQObject##W4Call#QMetaObject##HPAPAX#Z) already defined in moc_loggerGUI.cpp.obj
mocs_compilation.cpp.obj : error LNK2005: "public: void __thiscall loggerGUI::newDataAvailable(void)" (?newDataAvailable#loggerGUI##QAEXXZ) already defined in moc_loggerGUI.cpp.obj
mocs_compilation.cpp.obj : error LNK2005: "public: static struct QMetaObject const ConnectionHandler::staticMetaObject" (?staticMetaObject#ConnectionHandler##2UQMetaObject##B) already defined in moc_connectionHandler.cpp.obj
mocs_compilation.cpp.obj : error LNK2005: "public: static struct QMetaObject const Logger::staticMetaObject" (?staticMetaObject#Logger##2UQMetaObject##B) already defined in moc_logger.cpp.obj
mocs_compilation.cpp.obj : error LNK2005: "public: static struct QMetaObject const Plotter::staticMetaObject" (?staticMetaObject#Plotter##2UQMetaObject##B) already defined in moc_plotter.cpp.obj
mocs_compilation.cpp.obj : error LNK2005: "public: static struct QMetaObject const SerialParser::staticMetaObject" (?staticMetaObject#SerialParser##2UQMetaObject##B) already defined in moc_serialParser.cpp.obj
mocs_compilation.cpp.obj : error LNK2005: "public: static struct QMetaObject const Table::staticMetaObject" (?staticMetaObject#Table##2UQMetaObject##B) already defined in moc_table.cpp.obj
mocs_compilation.cpp.obj : error LNK2005: "public: static struct QMetaObject const loggerGUI::staticMetaObject" (?staticMetaObject#loggerGUI##2UQMetaObject##B) already defined in moc_loggerGUI.cpp.obj
moc_table.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QString::QString(class QString const &)" (__imp_??0QString##QAE#ABV0##Z)
mocs_compilation.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QString::QString(class QString const &)" (__imp_??0QString##QAE#ABV0##Z)
qcustomplot.lib(qcustomplot.cpp.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QString::QString(class QString const &)" (__imp_??0QString##QAE#ABV0##Z)
qcustomplot.lib(mocs_compilation.cpp.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QString::QString(class QString const &)" (__imp_??0QString##QAE#ABV0##Z)
config.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QString::QString(class QString const &)" (__imp_??0QString##QAE#ABV0##Z)
loggerGUI.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QString::QString(class QString const &)" (__imp_??0QString##QAE#ABV0##Z)
table.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QString::QString(class QString const &)" (__imp_??0QString##QAE#ABV0##Z)
moc_plotter.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QString::QString(class QString const &)" (__imp_??0QString##QAE#ABV0##Z)
moc_table.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QString::~QString(void)" (__imp_??1QString##QAE#XZ)
mocs_compilation.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QString::~QString(void)" (__imp_??1QString##QAE#XZ)
qcustomplot.lib(qcustomplot.cpp.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QString::~QString(void)" (__imp_??1QString##QAE#XZ)
qcustomplot.lib(mocs_compilation.cpp.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QString::~QString(void)" (__imp_??1QString##QAE#XZ)
plotter.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QString::~QString(void)" (__imp_??1QString##QAE#XZ)
serialParser.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QString::~QString(void)" (__imp_??1QString##QAE#XZ)
table.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QString::~QString(void)" (__imp_??1QString##QAE#XZ)
moc_plotter.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QString::~QString(void)" (__imp_??1QString##QAE#XZ)
config.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QString::~QString(void)" (__imp_??1QString##QAE#XZ)
connectionHandler.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QString::~QString(void)" (__imp_??1QString##QAE#XZ)
logger.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QString::~QString(void)" (__imp_??1QString##QAE#XZ)
loggerGUI.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QString::~QString(void)" (__imp_??1QString##QAE#XZ)
config.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall QString::QString(class QString &&)" (__imp_??0QString##QAE#$$QAV0##Z) referenced in function "public: __thiscall dataStream::dataStream(class dataStream &&)" (??0dataStream##QAE#$$QAV0##Z)
qcustomplot.lib(qcustomplot.cpp.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QString::QString(class QString &&)" (__imp_??0QString##QAE#$$QAV0##Z)
config.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class QString & __thiscall QString::operator=(class QString &&)" (__imp_??4QString##QAEAAV0#$$QAV0##Z) referenced in function "class std::vector<class dataStream,class std::allocator<class dataStream> > __cdecl readConfig(struct ConfigData &)" (?readConfig##YA?AV?$vector#VdataStream##V?$allocator#VdataStream###std###std##AAUConfigData###Z)
qcustomplot.lib(qcustomplot.cpp.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class QString & __thiscall QString::operator=(class QString &&)" (__imp_??4QString##QAEAAV0#$$QAV0##Z)
qcustomplot.lib(mocs_compilation.cpp.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class QString & __thiscall QString::operator=(class QString &&)" (__imp_??4QString##QAEAAV0#$$QAV0##Z)
config.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static class QString __cdecl QString::fromStdString(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (__imp_?fromStdString#QString##SA?AV1#ABV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std###Z) referenced in function "class std::vector<class dataStream,class std::allocator<class dataStream> > __cdecl readConfig(struct ConfigData &)" (?readConfig##YA?AV?$vector#VdataStream##V?$allocator#VdataStream###std###std##AAUConfigData###Z)
qcustomplot.lib(qcustomplot.cpp.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QString::QString(void)" (__imp_??0QString##QAE#XZ)
connectionHandler.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QString::QString(void)" (__imp_??0QString##QAE#XZ)
logger.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QString::QString(void)" (__imp_??0QString##QAE#XZ)
loggerGUI.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QString::QString(void)" (__imp_??0QString##QAE#XZ)
plotter.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QString::QString(void)" (__imp_??0QString##QAE#XZ)
connectionHandler.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class QString & __thiscall QString::operator=(class QString const &)" (__imp_??4QString##QAEAAV0#ABV0##Z) referenced in function "public: struct ConfigData & __thiscall ConfigData::operator=(struct ConfigData const &)" (??4ConfigData##QAEAAU0#ABU0##Z)
logger.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class QString & __thiscall QString::operator=(class QString const &)" (__imp_??4QString##QAEAAV0#ABV0##Z)
plotter.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class QString & __thiscall QString::operator=(class QString const &)" (__imp_??4QString##QAEAAV0#ABV0##Z)
qcustomplot.lib(qcustomplot.cpp.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class QString & __thiscall QString::operator=(class QString const &)" (__imp_??4QString##QAEAAV0#ABV0##Z)
connectionHandler.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall QMetaObject::Connection::~Connection(void)" (__imp_??1Connection#QMetaObject##QAE#XZ) referenced in function "public: void __thiscall ConnectionHandler::setup(void)" (?setup#ConnectionHandler##QAEXXZ)
loggerGUI.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QMetaObject::Connection::~Connection(void)" (__imp_??1Connection#QMetaObject##QAE#XZ)
table.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QMetaObject::Connection::~Connection(void)" (__imp_??1Connection#QMetaObject##QAE#XZ)
qcustomplot.lib(qcustomplot.cpp.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QMetaObject::Connection::~Connection(void)" (__imp_??1Connection#QMetaObject##QAE#XZ)
table.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QObject::QObject(class QObject *)" (__imp_??0QObject##QAE#PAV0##Z)
qcustomplot.lib(qcustomplot.cpp.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QObject::QObject(class QObject *)" (__imp_??0QObject##QAE#PAV0##Z)
connectionHandler.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QObject::QObject(class QObject *)" (__imp_??0QObject##QAE#PAV0##Z)
logger.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QObject::QObject(class QObject *)" (__imp_??0QObject##QAE#PAV0##Z)
loggerGUI.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QObject::QObject(class QObject *)" (__imp_??0QObject##QAE#PAV0##Z)
plotter.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QObject::QObject(class QObject *)" (__imp_??0QObject##QAE#PAV0##Z)
table.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall QObject::~QObject(void)" (__imp_??1QObject##UAE#XZ)
qcustomplot.lib(qcustomplot.cpp.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall QObject::~QObject(void)" (__imp_??1QObject##UAE#XZ)
connectionHandler.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall QObject::~QObject(void)" (__imp_??1QObject##UAE#XZ)
logger.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall QObject::~QObject(void)" (__imp_??1QObject##UAE#XZ)
loggerGUI.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall QObject::~QObject(void)" (__imp_??1QObject##UAE#XZ)
plotter.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall QObject::~QObject(void)" (__imp_??1QObject##UAE#XZ)
connectionHandler.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) private: static class QMetaObject::Connection __cdecl QObject::connectImpl(class QObject const *,void * *,class QObject const *,void * *,class QtPrivate::QSlotObjectBase *,enum Qt::ConnectionType,int const *,struct QMetaObject const *)" (__imp_?connectImpl#QObject##CA?AVConnection#QMetaObject##PBV1#PAPAX01PAVQSlotObjectBase#QtPrivate##W4ConnectionType#Qt##PBHPBU3##Z) referenced in function "public: static class QMetaObject::Connection __cdecl QObject::connect<void (__thiscall QBluetoothSocket::*)(void),class <lambda_582bb6fe4d5712728322f8f22541ba8e> >(class QBluetoothSocket const *,void (__thiscall QBluetoothSocket::*)(void),class QObject const *,class <lambda_582bb6fe4d5712728322f8f22541ba8e>,enum Qt::ConnectionType)" (??$connect#P8QBluetoothSocket##AEXXZV<lambda_582bb6fe4d5712728322f8f22541ba8e>###QObject##SA?AVConnection#QMetaObject##PBVQBluetoothSocket##P83#AEXXZPBV0#V<lambda_582bb6fe4d5712728322f8f22541ba8e>##W4ConnectionType#Qt###Z)
loggerGUI.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) private: static class QMetaObject::Connection __cdecl QObject::connectImpl(class QObject const *,void * *,class QObject const *,void * *,class QtPrivate::QSlotObjectBase *,enum Qt::ConnectionType,int const *,struct QMetaObject const *)" (__imp_?connectImpl#QObject##CA?AVConnection#QMetaObject##PBV1#PAPAX01PAVQSlotObjectBase#QtPrivate##W4ConnectionType#Qt##PBHPBU3##Z)
table.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) private: static class QMetaObject::Connection __cdecl QObject::connectImpl(class QObject const *,void * *,class QObject const *,void * *,class QtPrivate::QSlotObjectBase *,enum Qt::ConnectionType,int const *,struct QMetaObject const *)" (__imp_?connectImpl#QObject##CA?AVConnection#QMetaObject##PBV1#PAPAX01PAVQSlotObjectBase#QtPrivate##W4ConnectionType#Qt##PBHPBU3##Z)
connectionHandler.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall QBluetoothAddress::QBluetoothAddress(class QString const &)" (__imp_??0QBluetoothAddress##QAE#ABVQString###Z) referenced in function "public: void __thiscall ConnectionHandler::setup(void)" (?setup#ConnectionHandler##QAEXXZ)
connectionHandler.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall QBluetoothAddress::~QBluetoothAddress(void)" (__imp_??1QBluetoothAddress##QAE#XZ) referenced in function "public: void __thiscall ConnectionHandler::setup(void)" (?setup#ConnectionHandler##QAEXXZ)
connectionHandler.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall QBluetoothSocket::connectToService(class QBluetoothAddress const &,unsigned short,class QFlags<enum QIODevice::OpenModeFlag>)" (__imp_?connectToService#QBluetoothSocket##QAEXABVQBluetoothAddress##GV?$QFlags#W4OpenModeFlag#QIODevice#####Z) referenced in function "public: void __thiscall ConnectionHandler::setup(void)" (?setup#ConnectionHandler##QAEXXZ)
connectionHandler.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: enum QBluetoothSocket::SocketState __thiscall QBluetoothSocket::state(void)const " (__imp_?state#QBluetoothSocket##QBE?AW4SocketState#1#XZ) referenced in function "public: void __thiscall <lambda_582bb6fe4d5712728322f8f22541ba8e>::operator()(void)const " (??R<lambda_582bb6fe4d5712728322f8f22541ba8e>##QBEXXZ)
connectionHandler.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall QBluetoothSocket::disconnected(void)" (__imp_?disconnected#QBluetoothSocket##QAEXXZ) referenced in function "public: void __thiscall ConnectionHandler::setup(void)" (?setup#ConnectionHandler##QAEXXZ)
table.cpp.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QObject::childEvent(class QChildEvent *)" (?childEvent#QObject##MAEXPAVQChildEvent###Z)
qcustomplot.lib(qcustomplot.cpp.obj) : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QObject::childEvent(class QChildEvent *)" (?childEvent#QObject##MAEXPAVQChildEvent###Z)
connectionHandler.cpp.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QObject::childEvent(class QChildEvent *)" (?childEvent#QObject##MAEXPAVQChildEvent###Z)
logger.cpp.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QObject::childEvent(class QChildEvent *)" (?childEvent#QObject##MAEXPAVQChildEvent###Z)
loggerGUI.cpp.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QObject::childEvent(class QChildEvent *)" (?childEvent#QObject##MAEXPAVQChildEvent###Z)
plotter.cpp.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QObject::childEvent(class QChildEvent *)" (?childEvent#QObject##MAEXPAVQChildEvent###Z)
table.cpp.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QObject::connectNotify(class QMetaMethod const &)" (?connectNotify#QObject##MAEXABVQMetaMethod###Z)
loggerGUI.exe : fatal error LNK1120: 976 unresolved externals
LINK Pass 1 failed. with 1120
I solve my linker issue hardcoding the paths of
set(Qt5_DIR "E:/QT/5.15.2/msvc2019_64/lib/cmake/Qt5")
set(Qt5Core_DIR "E:/QT/5.15.2/msvc2019_64/lib/cmake/Qt5Core")
set(QT_QMAKE_EXECUTABLE "E:/QT/5.15.2/msvc2019_64/bin/qmake.exe")
This link work for me
https://github.com/KDAB/GammaRay/issues/213

Linking libtins in Visual Studio 2015

I'm trying to use libtins to parse some DNS answers but I'm getting a lot of linker errors. I added the library and the additional library directories and in the documentation I saw this line
If you are using a static build of libtins on Windows, then you have link your application with tins.lib. You also need to add this macro definition to your project:
TINS_STATIC
This will make your project use libtins without trying to import symbols from a DLL but from the static library.
So I added /DTINS_STATIC to my compiler command line.
But I'm getting this error log
1>------ Rebuild All started: Project: DNSParser, Configuration: Debug Win32 ------
1> stdafx.cpp
1> DNSWinPcap.cpp
1>c:\users\hector\documents\visual studio
1> Generating Code...
1>tins.lib(pdu.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1800' doesn't match value '1900' in DNSParser.obj
this is repeated a lot of times...
1>tins.lib(rsn_information.obj) : warning LNK4049: locally defined symbol ??0_Container_base12#std##QAE#XZ (public: __thiscall std::_Container_base12::_Container_base12(void)) imported
1>tins.lib(dot11_control.obj) : warning LNK4049: locally defined symbol ??0_Container_base12#std##QAE#XZ (public: __thiscall std::_Container_base12::_Container_base12(void)) imported
1>tins.lib(stp.obj) : warning LNK4049: locally defined symbol ??0_Container_base12#std##QAE#XZ (public: __thiscall std::_Container_base12::_Container_base12(void)) imported
1>tins.lib(snap.obj) : warning LNK4049: locally defined symbol ??0_Container_base12#std##QAE#XZ (public: __thiscall std::_Container_base12::_Container_base12(void)) imported
1>tins.lib(dot11_mgmt.obj) : warning LNK4049: locally defined symbol ??0_Container_base12#std##QAE#XZ (public: __thiscall std::_Container_base12::_Container_base12(void)) imported
1>tins.lib(dot11_beacon.obj) : warning LNK4049: locally defined symbol ??0_Container_base12#std##QAE#XZ (public: __thiscall std::_Container_base12::_Container_base12(void)) imported
1>tins.lib(dot11_assoc.obj) : warning LNK4049: locally defined symbol ??0_Container_base12#std##QAE#XZ (public: __thiscall std::_Container_base12::_Container_base12(void)) imported
1>tins.lib(dot11_auth.obj) : warning LNK4049: locally defined symbol ??0_Container_base12#std##QAE#XZ (public: __thiscall std::_Container_base12::_Container_base12(void)) imported
1>tins.lib(dot11_probe.obj) : warning LNK4049: locally defined symbol ??0_Container_base12#std##QAE#XZ (public: __thiscall std::_Container_base12::_Container_base12(void)) imported
1>tins.lib(network_interface.obj) : warning LNK4049: locally defined symbol ??0_Container_base12#std##QAE#XZ (public: __thiscall std::_Container_base12::_Container_base12(void)) imported
There are around 200 warnings like these
1>tins.lib(dot11_mgmt.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base12::_Swap_all(struct std::_Container_base12 &)" (__imp_?_Swap_all#_Container_base12#std##QAEXAAU12##Z)
1>tins.lib(rsn_information.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base12::_Swap_all(struct std::_Container_base12 &)" (__imp_?_Swap_all#_Container_base12#std##QAEXAAU12##Z)
1>tins.lib(icmpv6.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base12::_Swap_all(struct std::_Container_base12 &)" (__imp_?_Swap_all#_Container_base12#std##QAEXAAU12##Z)
1>tins.lib(pppoe.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base12::_Swap_all(struct std::_Container_base12 &)" (__imp_?_Swap_all#_Container_base12#std##QAEXAAU12##Z)
1>tins.lib(utils.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base12::_Swap_all(struct std::_Container_base12 &)" (__imp_?_Swap_all#_Container_base12#std##QAEXAAU12##Z)
1>tins.lib(network_interface.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base12::_Swap_all(struct std::_Container_base12 &)" (__imp_?_Swap_all#_Container_base12#std##QAEXAAU12##Z)
1>tins.lib(pdu.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base12::_Swap_all(struct std::_Container_base12 &)" (__imp_?_Swap_all#_Container_base12#std##QAEXAAU12##Z)
1>tins.lib(dns.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base12::_Swap_all(struct std::_Container_base12 &)" (__imp_?_Swap_all#_Container_base12#std##QAEXAAU12##Z)
1>tins.lib(tcp.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base12::_Swap_all(struct std::_Container_base12 &)" (__imp_?_Swap_all#_Container_base12#std##QAEXAAU12##Z)
1>tins.lib(icmp_extension.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base12::_Swap_all(struct std::_Container_base12 &)" (__imp_?_Swap_all#_Container_base12#std##QAEXAAU12##Z)
1>tins.lib(rsn_information.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map#std##YAPBDH#Z)
1>tins.lib(dot11_control.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map#std##YAPBDH#Z)
1>tins.lib(stp.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map#std##YAPBDH#Z)
1>tins.lib(snap.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map#std##YAPBDH#Z)
1>tins.lib(dot11_mgmt.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map#std##YAPBDH#Z)
1>tins.lib(dot11_beacon.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map#std##YAPBDH#Z)
1>tins.lib(dot11_assoc.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map#std##YAPBDH#Z)
1>tins.lib(dot11_auth.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map#std##YAPBDH#Z)
1>tins.lib(dot11_probe.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map#std##YAPBDH#Z)
1>tins.lib(network_interface.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map#std##YAPBDH#Z)
1>tins.lib(packet_sender.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map#std##YAPBDH#Z)
1>tins.lib(llc.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map#std##YAPBDH#Z)
1>tins.lib(dot11_data.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map#std##YAPBDH#Z)
1>tins.lib(rawpdu.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map#std##YAPBDH#Z)
1>tins.lib(dot1q.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map#std##YAPBDH#Z)
1>tins.lib(pppoe.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map#std##YAPBDH#Z)
1>tins.lib(utils.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map#std##YAPBDH#Z)
1>tins.lib(icmpv6.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map#std##YAPBDH#Z)
1>tins.lib(mpls.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map#std##YAPBDH#Z)
1>tins.lib(arp.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map#std##YAPBDH#Z)
1>tins.lib(eapol.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map#std##YAPBDH#Z)
1>tins.lib(icmp.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map#std##YAPBDH#Z)
1>tins.lib(loopback.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map#std##YAPBDH#Z)
1>tins.lib(sll.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map#std##YAPBDH#Z)
1>tins.lib(ppi.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map#std##YAPBDH#Z)
1>tins.lib(tcp.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map#std##YAPBDH#Z)
1>tins.lib(udp.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map#std##YAPBDH#Z)
1>tins.lib(ipsec.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map#std##YAPBDH#Z)
1>tins.lib(icmp_extension.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map#std##YAPBDH#Z)
1>tins.lib(dot3.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map#std##YAPBDH#Z)
1>tins.lib(radiotap.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map#std##YAPBDH#Z)
1>tins.lib(dot11_base.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map#std##YAPBDH#Z)
1>tins.lib(ipv6.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map#std##YAPBDH#Z)
1>tins.lib(address_range.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map#std##YAPBDH#Z)
1>tins.lib(internals.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map#std##YAPBDH#Z)
1>tins.lib(ip.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map#std##YAPBDH#Z)
1>tins.lib(ethernetII.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map#std##YAPBDH#Z)
1>tins.lib(pdu.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map#std##YAPBDH#Z)
1>tins.lib(dns.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map#std##YAPBDH#Z)
1>tins.lib(ip_address.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map#std##YAPBDH#Z)
1>tins.lib(ipv6_address.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map#std##YAPBDH#Z)
1>tins.lib(dns.obj) : error LNK2019: unresolved external symbol __imp__sprintf referenced in function "private: static void __cdecl Tins::DNS::inline_convert_v4(unsigned int,char *)" (?inline_convert_v4#DNS#Tins##CAXIPAD#Z)
1>tins.lib(snap.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception#std##QAE#ABQBD#Z)
1>tins.lib(dot11_mgmt.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception#std##QAE#ABQBD#Z)
1>tins.lib(rsn_information.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception#std##QAE#ABQBD#Z)
1>tins.lib(dot11_auth.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception#std##QAE#ABQBD#Z)
1>tins.lib(dot11_probe.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception#std##QAE#ABQBD#Z)
1>tins.lib(dot11_control.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception#std##QAE#ABQBD#Z)
1>tins.lib(stp.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception#std##QAE#ABQBD#Z)
1>tins.lib(llc.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception#std##QAE#ABQBD#Z)
1>tins.lib(dot11_data.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception#std##QAE#ABQBD#Z)
1>tins.lib(dot11_beacon.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception#std##QAE#ABQBD#Z)
1>tins.lib(dot11_assoc.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception#std##QAE#ABQBD#Z)
1>tins.lib(pppoe.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception#std##QAE#ABQBD#Z)
1>tins.lib(utils.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception#std##QAE#ABQBD#Z)
1>tins.lib(network_interface.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception#std##QAE#ABQBD#Z)
1>tins.lib(packet_sender.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception#std##QAE#ABQBD#Z)
1>tins.lib(arp.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception#std##QAE#ABQBD#Z)
1>tins.lib(eapol.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception#std##QAE#ABQBD#Z)
1>tins.lib(rawpdu.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception#std##QAE#ABQBD#Z)
1>tins.lib(dot1q.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception#std##QAE#ABQBD#Z)
1>tins.lib(sll.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception#std##QAE#ABQBD#Z)
1>tins.lib(ppi.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception#std##QAE#ABQBD#Z)
1>tins.lib(icmpv6.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception#std##QAE#ABQBD#Z)
1>tins.lib(mpls.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception#std##QAE#ABQBD#Z)
1>tins.lib(ipsec.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception#std##QAE#ABQBD#Z)
1>tins.lib(icmp_extension.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception#std##QAE#ABQBD#Z)
1>tins.lib(icmp.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception#std##QAE#ABQBD#Z)
1>tins.lib(loopback.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception#std##QAE#ABQBD#Z)
1>tins.lib(dot11_base.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception#std##QAE#ABQBD#Z)
1>tins.lib(ipv6.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception#std##QAE#ABQBD#Z)
1>tins.lib(tcp.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception#std##QAE#ABQBD#Z)
1>tins.lib(udp.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception#std##QAE#ABQBD#Z)
1>tins.lib(ip.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception#std##QAE#ABQBD#Z)
1>tins.lib(ethernetII.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception#std##QAE#ABQBD#Z)
1>tins.lib(dot3.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception#std##QAE#ABQBD#Z)
1>tins.lib(radiotap.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception#std##QAE#ABQBD#Z)
1>tins.lib(dns.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception#std##QAE#ABQBD#Z)
1>tins.lib(ip_address.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception#std##QAE#ABQBD#Z)
1>tins.lib(ipv6_address.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception#std##QAE#ABQBD#Z)
1>tins.lib(address_range.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception#std##QAE#ABQBD#Z)
1>tins.lib(ip_address.obj) : error LNK2019: unresolved external symbol __imp__inet_pton#12 referenced in function "private: unsigned int __thiscall Tins::IPv4Address::ip_to_int(char const *)" (?ip_to_int#IPv4Address#Tins##AAEIPBD#Z)
1>tins.lib(ipv6_address.obj) : error LNK2001: unresolved external symbol __imp__inet_pton#12
1>tins.lib(ipv6_address.obj) : error LNK2019: unresolved external symbol _inet_ntop#16 referenced in function "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall Tins::IPv6Address::to_string(void)const " (?to_string#IPv6Address#Tins##QBE?AV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##XZ)
1>tins.lib(dot11_control.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(void)" (__imp_??0exception#std##QAE#XZ)
1>tins.lib(stp.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(void)" (__imp_??0exception#std##QAE#XZ)
1>tins.lib(dot11_mgmt.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(void)" (__imp_??0exception#std##QAE#XZ)
1>tins.lib(dot11_beacon.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(void)" (__imp_??0exception#std##QAE#XZ)
1>tins.lib(dot11_assoc.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(void)" (__imp_??0exception#std##QAE#XZ)
1>tins.lib(dot11_auth.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(void)" (__imp_??0exception#std##QAE#XZ)
1>tins.lib(dot11_probe.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(void)" (__imp_??0exception#std##QAE#XZ)
1>tins.lib(icmpv6.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(void)" (__imp_??0exception#std##QAE#XZ)
1>tins.lib(mpls.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(void)" (__imp_??0exception#std##QAE#XZ)
1>tins.lib(pppoe.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(void)" (__imp_??0exception#std##QAE#XZ)
1>tins.lib(dot11_data.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(void)" (__imp_??0exception#std##QAE#XZ)
1>tins.lib(ip.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(void)" (__imp_??0exception#std##QAE#XZ)
1>tins.lib(ipv6.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(void)" (__imp_??0exception#std##QAE#XZ)
1>tins.lib(tcp.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(void)" (__imp_??0exception#std##QAE#XZ)
1>tins.lib(icmp_extension.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(void)" (__imp_??0exception#std##QAE#XZ)
1>tins.lib(utils.obj) : error LNK2019: unresolved external symbol __imp__getaddrinfo#16 referenced in function __catch$?route6_entries#Utils#Tins##YA?AV?$vector#URoute6Entry#Utils#Tins##V?$allocator#URoute6Entry#Utils#Tins###std###std##XZ$0
1>tins.lib(utils.obj) : error LNK2019: unresolved external symbol __imp__freeaddrinfo#4 referenced in function "class Tins::IPv4Address __cdecl Tins::Utils::resolve_domain(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?resolve_domain#Utils#Tins##YA?AVIPv4Address#2#ABV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std###Z)
1>tins.lib(utils.obj) : error LNK2019: unresolved external symbol _GetIpForwardTable#12 referenced in function "class std::vector<struct Tins::Utils::RouteEntry,class std::allocator<struct Tins::Utils::RouteEntry> > __cdecl Tins::Utils::route_entries(void)" (?route_entries#Utils#Tins##YA?AV?$vector#URouteEntry#Utils#Tins##V?$allocator#URouteEntry#Utils#Tins###std###std##XZ)
1>tins.lib(utils.obj) : error LNK2019: unresolved external symbol _GetAdaptersAddresses#20 referenced in function "class std::set<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > __cdecl Tins::Utils::network_interfaces(void)" (?network_interfaces#Utils#Tins##YA?AV?$set#V?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##U?$less#V?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std###2#V?$allocator#V?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std###2##std##XZ)
1>tins.lib(network_interface.obj) : error LNK2001: unresolved external symbol _GetAdaptersAddresses#20
1>tins.lib(utils.obj) : error LNK2019: unresolved external symbol _SendARP#16 referenced in function "class Tins::HWAddress<6,unsigned char> __cdecl Tins::Utils::resolve_hwaddr(class Tins::NetworkInterface const &,class Tins::IPv4Address,class Tins::PacketSender &)" (?resolve_hwaddr#Utils#Tins##YA?AV?$HWAddress#$05E#2#ABVNetworkInterface#2#VIPv4Address#2#AAVPacketSender#2##Z)
1>tins.lib(utils.obj) : error LNK2019: unresolved external symbol _GetIpForwardTable2#8 referenced in function "class std::vector<struct Tins::Utils::Route6Entry,class std::allocator<struct Tins::Utils::Route6Entry> > __cdecl Tins::Utils::route6_entries(void)" (?route6_entries#Utils#Tins##YA?AV?$vector#URoute6Entry#Utils#Tins##V?$allocator#URoute6Entry#Utils#Tins###std###std##XZ)
1>tins.lib(utils.obj) : error LNK2019: unresolved external symbol _FreeMibTable#4 referenced in function __catch$?route6_entries#Utils#Tins##YA?AV?$vector#URoute6Entry#Utils#Tins##V?$allocator#URoute6Entry#Utils#Tins###std###std##XZ$0
1>tins.lib(packet_sender.obj) : error LNK2019: unresolved external symbol ___WSAFDIsSet#8 referenced in function __catch$?send_recv#PacketSender#Tins##QAEPAVPDU#2#AAV32#ABVNetworkInterface#2##Z$0
1>tins.lib(packet_sender.obj) : error LNK2019: unresolved external symbol __imp__closesocket#4 referenced in function "public: __thiscall Tins::PacketSender::~PacketSender(void)" (??1PacketSender#Tins##QAE#XZ)
1>tins.lib(packet_sender.obj) : error LNK2019: unresolved external symbol __imp__recvfrom#24 referenced in function __catch$?send_recv#PacketSender#Tins##QAEPAVPDU#2#AAV32#ABVNetworkInterface#2##Z$0
1>tins.lib(packet_sender.obj) : error LNK2019: unresolved external symbol __imp__select#20 referenced in function __catch$?send_recv#PacketSender#Tins##QAEPAVPDU#2#AAV32#ABVNetworkInterface#2##Z$0
1>tins.lib(packet_sender.obj) : error LNK2019: unresolved external symbol __imp__sendto#24 referenced in function __catch$?send_recv#PacketSender#Tins##QAEPAVPDU#2#AAV32#ABVNetworkInterface#2##Z$0
1>tins.lib(packet_sender.obj) : error LNK2019: unresolved external symbol __imp__setsockopt#20 referenced in function "public: void __thiscall Tins::PacketSender::open_l3_socket(enum Tins::PacketSender::SocketType)" (?open_l3_socket#PacketSender#Tins##QAEXW4SocketType#12##Z)
1>tins.lib(packet_sender.obj) : error LNK2019: unresolved external symbol __imp__socket#12 referenced in function "public: void __thiscall Tins::PacketSender::open_l3_socket(enum Tins::PacketSender::SocketType)" (?open_l3_socket#PacketSender#Tins##QAEXW4SocketType#12##Z)
1>C:\Users\Hector\Documents\Visual Studio 2015\Projects\DNSParser\Debug\DNSParser.exe : fatal error LNK1120: 21 unresolved externals
You are linking objects compiled by different versions of the compiler. Try editing Platform Toolset in project properties.

How to solve error : LNK2019: unresolved external symbol "public"?

I want to make a plugin for a software. In order to make the plugin, I should make a .dll file but I have faced many challenges about making it. My system is Windows 7 and I'm using Microsoft Visual Studio 2010 as an IDE. I made a dll project and made two source files, one header file and then I built the solution but I encountered the following errors.
Note : before building the solution, I added the path of include and lib directories of the software.
1> Creating library C:\Users\pars\Desktop\example\FEneohookean\Debug\FEneohookean.lib and object C:\Users\pars\Desktop\example\FEneohookean\Debug\FEneohookean.exp
1>dllmain.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall FECoreFactory::~FECoreFactory(void)" (??1FECoreFactory##UAE#XZ) referenced in function __
1>dllmain.obj : error LNK2019: unresolved external symbol "public: void __thiscall FECoreKernel::RegisterClass(class FECoreFactory *)" (?RegisterClass#FECoreKernel##QAEXPAVFECoreFactory###Z) referenced in function "public: __thiscall FERegisterClass_T<class FENeoHookeanPI>::FERegisterClass_T<class FENeoHookeanPI>(unsigned int,char const *)" (??0?$FERegisterClass_T#VFENeoHookeanPI####QAE#IPBD#Z)
1>dllmain.obj : error LNK2019: unresolved external symbol "public: static class FECoreKernel & __cdecl FECoreKernel::GetInstance(void)" (?GetInstance#FECoreKernel##SAAAV1#XZ) referenced in function "public: __thiscall FERegisterClass_T<class FENeoHookeanPI>::FERegisterClass_T<class FENeoHookeanPI>(unsigned int,char const *)" (??0?$FERegisterClass_T#VFENeoHookeanPI####QAE#IPBD#Z)
1>dllmain.obj : error LNK2019: unresolved external symbol "public: __thiscall FECoreFactory::FECoreFactory(unsigned int,char const *)" (??0FECoreFactory##QAE#IPBD#Z) referenced in function "public: __thiscall FERegisterClass_T<class FENeoHookeanPI>::FERegisterClass_T<class FENeoHookeanPI>(unsigned int,char const *)" (??0?$FERegisterClass_T#VFENeoHookeanPI####QAE#IPBD#Z)
1>dllmain.obj : error LNK2019: unresolved external symbol "public: __thiscall FEElasticMaterial::FEElasticMaterial(class FEModel *)" (??0FEElasticMaterial##QAE#PAVFEModel###Z) referenced in function "public: __thiscall FENeoHookeanPI::FENeoHookeanPI(class FEModel *)" (??0FENeoHookeanPI##QAE#PAVFEModel###Z)
1>dllmain.obj : error LNK2001: unresolved external symbol "public: virtual class FEParam * __thiscall FEMaterial::GetParameter(class ParamString const &)" (?GetParameter#FEMaterial##UAEPAVFEParam##ABVParamString###Z)
1>dllmain.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall FEMaterial::Serialize(class DumpFile &)" (?Serialize#FEMaterial##UAEXAAVDumpFile###Z)
1>dllmain.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall FEElasticMaterial::SetAttribute(char const *,char const *)" (?SetAttribute#FEElasticMaterial##UAE_NPBD0#Z)
1>dllmain.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall FEElasticMaterial::SetAttribute(char const *,char const *)" (?SetAttribute#FEElasticMaterial##UAE_NPBD0#Z)
1>dllmain.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall FEMaterial::Properties(void)" (?Properties#FEMaterial##UAEHXZ)
1>dllmain.obj : error LNK2001: unresolved external symbol "public: virtual class FECoreBase * __thiscall FEMaterial::GetProperty(int)" (?GetProperty#FEMaterial##UAEPAVFECoreBase##H#Z)
1>dllmain.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall FEMaterial::FindPropertyIndex(char const *)" (?FindPropertyIndex#FEMaterial##UAEHPBD#Z)
1>dllmain.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall FEMaterial::SetProperty(int,class FECoreBase *)" (?SetProperty#FEMaterial##UAE_NHPAVFECoreBase###Z)
1>dllmain.obj : error LNK2001: unresolved external symbol "public: virtual double __thiscall FESolidMaterial::Density(void)" (?Density#FESolidMaterial##UAENXZ)
1>dllmain.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall FEElasticMaterial::SetLocalCoordinateSystem(class FEElement &,int,class FEMaterialPoint &)" (?SetLocalCoordinateSystem#FEElasticMaterial##UAEXAAVFEElement##HAAVFEMaterialPoint###Z)
1>dllmain.obj : error LNK2001: unresolved external symbol "public: virtual double __thiscall FEElasticMaterial::StrainEnergyDensity(class FEMaterialPoint &)" (?StrainEnergyDensity#FEElasticMaterial##UAENAAVFEMaterialPoint###Z)
1>dllmain.obj : error LNK2019: unresolved external symbol "public: __thiscall FEElasticMaterialPoint::FEElasticMaterialPoint(void)" (??0FEElasticMaterialPoint##QAE#XZ) referenced in function "public: virtual class FEMaterialPoint * __thiscall FEElasticMaterial::CreateMaterialPointData(void)" (?CreateMaterialPointData#FEElasticMaterial##UAEPAVFEMaterialPoint##XZ)
1>dllmain.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall FEElasticMaterial::~FEElasticMaterial(void)" (??1FEElasticMaterial##UAE#XZ) referenced in function "public: virtual __thiscall FENeoHookeanPI::~FENeoHookeanPI(void)" (??1FENeoHookeanPI##UAE#XZ)
1>FENeoHookeanPI.obj : error LNK2019: unresolved external symbol "protected: void __thiscall FEParamContainer::AddParameter(void *,enum FEParamType,int,class RANGE,char const *)" (?AddParameter#FEParamContainer##IAEXPAXW4FEParamType##HVRANGE##PBD#Z) referenced in function "protected: virtual void __thiscall FENeoHookeanPI::BuildParamList(void)" (?BuildParamList#FENeoHookeanPI##MAEXXZ)
1>FENeoHookeanPI.obj : error LNK2019: unresolved external symbol "protected: virtual void __thiscall FESolidMaterial::BuildParamList(void)" (?BuildParamList#FESolidMaterial##MAEXXZ) referenced in function "protected: virtual void __thiscall FENeoHookeanPI::BuildParamList(void)" (?BuildParamList#FENeoHookeanPI##MAEXXZ)
1>FENeoHookeanPI.obj : error LNK2019: unresolved external symbol "public: virtual void __thiscall FEElasticMaterial::Init(void)" (?Init#FEElasticMaterial##UAEXXZ) referenced in function "public: virtual void __thiscall FENeoHookeanPI::Init(void)" (?Init#FENeoHookeanPI##UAEXXZ)
1>FENeoHookeanPI.obj : error LNK2019: unresolved external symbol "public: class mat3ds __thiscall FEElasticMaterialPoint::LeftCauchyGreen(void)" (?LeftCauchyGreen#FEElasticMaterialPoint##QAE?AVmat3ds##XZ) referenced in function "public: virtual class mat3ds __thiscall FENeoHookeanPI::Stress(class FEMaterialPoint &)" (?Stress#FENeoHookeanPI##UAE?AVmat3ds##AAVFEMaterialPoint###Z)
1>C:\Users\pars\Desktop\example\FEneohookean\Debug\FEneohookean.dll : fatal error LNK1120: 21 unresolved externals
1>
1>Build FAILED
How can I solve these errors ?
In addition to adding the library path to the project setting be sure you also add the required library files(.lib) as an additional dependency for the linker. you can find the additional dependency input field at project->properties->linker->Input and add the actual names(with extension) of the library files separated by a space.

C++/Qt - Open Dialog from MainWindow -Error LNK2019 - LNK2001: unresolved external symbol

basically the goal of the code is to open a dialog that contain a QWebView (with some content) after a botton is clicked
these is what i did:
mainwindow.h:
class MainWindow : public QMainWindow, public Ui::MainWindowUi
{
...
private slots:
void on_ViewDatabase_clicked();
...
}
mainwindow.cpp:
#include "mainwindow.h"
#include "onlinedb.h"
void MainWindow::on_ViewDatabase_clicked()
{
OnlineDB dlg(this);
dlg.exec();
}
onlinedb.h:
#ifndef OnlineDB_H
#define OnlineDB_H
#include "ui_onlinedb.h"
#include <QDialog>
class MainWindow;
class OnlineDB : public QDialog, public Ui::OnlineDB
{
Q_OBJECT
public:
OnlineDB(LkMainWindow *parent);
~OnlineDB();
private:
MainWindow *MainWindow;
};
#endif
onlinedb.cpp:
#include "onlinedb.h"
#include "mainwindow.h"
///////////////////////////////////////////////////////////////////////////////
//
// OnlineDB class constructor
//
// Create a OnlineDB
//
OnlineDB::OnlineDB(MainWindow *parent) : QDialog(parent), MainWindow(parent)
{
setupUi(this);
QUrl url("http://google.com"); //whatever
webView->load(url);
}
///////////////////////////////////////////////////////////////////////////////
//
// OnlineDB class destructor
//
// Clean up the OnlineDB
//
OnlineDB::~OnlineDB()
{
}
I got several linking errors
Plz can someone help on that?
3>Linking...
3>onlinedb.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall QWebView::load(class QUrl const &)" (__imp_?load#QWebView##QAEXABVQUrl###Z) referenced in function "public: __thiscall OnlineDB::OnlineDB(class LkMainWindow *)" (??0OnlineDB##QAE#PAVLkMainWindow###Z)
3>onlinedb.obj : error LNK2001: unresolved external symbol "public: virtual struct QMetaObject const * __thiscall OnlineDB::metaObject(void)const " (?metaObject#OnlineDB##UBEPBUQMetaObject##XZ)
3>onlinedb.obj : error LNK2001: unresolved external symbol "public: virtual void * __thiscall OnlineDB::qt_metacast(char const *)" (?qt_metacast#OnlineDB##UAEPAXPBD#Z)
3>onlinedb.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall OnlineDB::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall#OnlineDB##UAEHW4Call#QMetaObject##HPAPAX#Z)
3>onlinedb.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall QWebView::setUrl(class QUrl const &)" (__imp_?setUrl#QWebView##QAEXABVQUrl###Z) referenced in function "public: void __thiscall Ui_OnlineDB::setupUi(class QDialog *)" (?setupUi#Ui_OnlineDB##QAEXPAVQDialog###Z)
3>onlinedb.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall QWebView::QWebView(class QWidget *)" (__imp_??0QWebView##QAE#PAVQWidget###Z) referenced in function "public: void __thiscall Ui_OnlineDB::setupUi(class QDialog *)" (?setupUi#Ui_OnlineDB##QAEXPAVQDialog###Z)
3>onlinedb.obj : error LNK2001: unresolved external symbol "public: virtual struct QMetaObject const * __thiscall QWebView::metaObject(void)const " (?metaObject#QWebView##UBEPBUQMetaObject##XZ)
3>onlinedb.obj : error LNK2001: unresolved external symbol "public: virtual void * __thiscall QWebView::qt_metacast(char const *)" (?qt_metacast#QWebView##UAEPAXPBD#Z)
3>onlinedb.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall QWebView::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall#QWebView##UAEHW4Call#QMetaObject##HPAPAX#Z)
3>onlinedb.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall QWebView::event(class QEvent *)" (?event#QWebView##UAE_NPAVQEvent###Z)
3>onlinedb.obj : error LNK2001: unresolved external symbol "public: virtual class QSize __thiscall QWebView::sizeHint(void)const " (?sizeHint#QWebView##UBE?AVQSize##XZ)
3>onlinedb.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWebView::mousePressEvent(class QMouseEvent *)" (?mousePressEvent#QWebView##MAEXPAVQMouseEvent###Z)
3>onlinedb.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWebView::mouseReleaseEvent(class QMouseEvent *)" (?mouseReleaseEvent#QWebView##MAEXPAVQMouseEvent###Z)
3>onlinedb.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWebView::mouseDoubleClickEvent(class QMouseEvent *)" (?mouseDoubleClickEvent#QWebView##MAEXPAVQMouseEvent###Z)
3>onlinedb.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWebView::mouseMoveEvent(class QMouseEvent *)" (?mouseMoveEvent#QWebView##MAEXPAVQMouseEvent###Z)
3>onlinedb.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWebView::wheelEvent(class QWheelEvent *)" (?wheelEvent#QWebView##MAEXPAVQWheelEvent###Z)
3>onlinedb.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWebView::keyPressEvent(class QKeyEvent *)" (?keyPressEvent#QWebView##MAEXPAVQKeyEvent###Z)
3>onlinedb.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWebView::keyReleaseEvent(class QKeyEvent *)" (?keyReleaseEvent#QWebView##MAEXPAVQKeyEvent###Z)
3>onlinedb.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWebView::focusInEvent(class QFocusEvent *)" (?focusInEvent#QWebView##MAEXPAVQFocusEvent###Z)
3>onlinedb.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWebView::focusOutEvent(class QFocusEvent *)" (?focusOutEvent#QWebView##MAEXPAVQFocusEvent###Z)
3>onlinedb.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWebView::paintEvent(class QPaintEvent *)" (?paintEvent#QWebView##MAEXPAVQPaintEvent###Z)
3>onlinedb.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWebView::resizeEvent(class QResizeEvent *)" (?resizeEvent#QWebView##MAEXPAVQResizeEvent###Z)
3>onlinedb.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWebView::contextMenuEvent(class QContextMenuEvent *)" (?contextMenuEvent#QWebView##MAEXPAVQContextMenuEvent###Z)
3>onlinedb.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWebView::dragEnterEvent(class QDragEnterEvent *)" (?dragEnterEvent#QWebView##MAEXPAVQDragEnterEvent###Z)
3>onlinedb.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWebView::dragMoveEvent(class QDragMoveEvent *)" (?dragMoveEvent#QWebView##MAEXPAVQDragMoveEvent###Z)
3>onlinedb.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWebView::dragLeaveEvent(class QDragLeaveEvent *)" (?dragLeaveEvent#QWebView##MAEXPAVQDragLeaveEvent###Z)
3>onlinedb.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWebView::dropEvent(class QDropEvent *)" (?dropEvent#QWebView##MAEXPAVQDropEvent###Z)
3>onlinedb.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWebView::changeEvent(class QEvent *)" (?changeEvent#QWebView##MAEXPAVQEvent###Z)
3>onlinedb.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWebView::inputMethodEvent(class QInputMethodEvent *)" (?inputMethodEvent#QWebView##MAEXPAVQInputMethodEvent###Z)
3>onlinedb.obj : error LNK2001: unresolved external symbol "public: virtual class QVariant __thiscall QWebView::inputMethodQuery(enum Qt::InputMethodQuery)const " (?inputMethodQuery#QWebView##UBE?AVQVariant##W4InputMethodQuery#Qt###Z)
3>onlinedb.obj : error LNK2001: unresolved external symbol "protected: virtual bool __thiscall QWebView::focusNextPrevChild(bool)" (?focusNextPrevChild#QWebView##MAE_N_N#Z)
3>onlinedb.obj : error LNK2001: unresolved external symbol "protected: virtual class QWebView * __thiscall QWebView::createWindow(enum QWebPage::WebWindowType)" (?createWindow#QWebView##MAEPAV1#W4WebWindowType#QWebPage###Z)
3>onlinedb.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall QWebView::~QWebView(void)" (__imp_??1QWebView##UAE#XZ) referenced in function "public: virtual void * __thiscall QWebView::`scalar deleting destructor'(unsigned int)" (??_GQWebView##UAEPAXI#Z)
unresolved external symbol "public: virtual int __thiscall OnlineDB::qt_metacall(enum QMetaObject::Call,int,void * *)
You have not moc'd your OnlineDB or you have not linked the objectfile.
error LNK2019: unresolved external symbol "__declspec(dllimport) public: void _thiscall QWebView::load(class QUrl const &)"
You have not linked against all the necessary Qt libraries. QWebView is in the QtWebKit library.

VS2010 Linker Error in MFC Dialog Based Project

I recently installed VS2010 Ultimate. I'm trying to create a MFC dialog based program. I use the built in template, take all the default options, and then compile the project. I then get the following link errors.
1>------ Build started: Project: test1, Configuration: Debug Win32 ------
1>test1.obj : error LNK2001: unresolved external symbol "public: virtual unsigned int __thiscall CWinApp::GetProfileIntW(wchar_t const *,wchar_t const *,int)" (?GetProfileIntW#CWinApp##UAEIPB_W0H#Z)
1>test1.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall CWinApp::WriteProfileInt(wchar_t const *,wchar_t const *,int)" (?WriteProfileInt#CWinApp##UAEHPB_W0H#Z)
1>test1.obj : error LNK2001: unresolved external symbol "public: virtual class ATL::CStringT<wchar_t,class StrTraitMFC<wchar_t,class ATL::ChTraitsCRT<wchar_t> > > __thiscall CWinApp::GetProfileStringW(wchar_t const *,wchar_t const *,wchar_t const *)" (?GetProfileStringW#CWinApp##UAE?AV?$CStringT#_WV?$StrTraitMFC#_WV?$ChTraitsCRT#_W#ATL#####ATL##PB_W00#Z)
1>test1.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall CWinApp::WriteProfileStringW(wchar_t const *,wchar_t const *,wchar_t const *)" (?WriteProfileStringW#CWinApp##UAEHPB_W00#Z)
1>test1.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall CWinApp::GetProfileBinary(wchar_t const *,wchar_t const *,unsigned char * *,unsigned int *)" (?GetProfileBinary#CWinApp##UAEHPB_W0PAPAEPAI#Z)
1>test1.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall CWinApp::WriteProfileBinary(wchar_t const *,wchar_t const *,unsigned char *,unsigned int)" (?WriteProfileBinary#CWinApp##UAEHPB_W0PAEI#Z)
1>test1.obj : error LNK2001: unresolved external symbol "public: virtual class CDocument * __thiscall CWinApp::OpenDocumentFile(wchar_t const *,int)" (?OpenDocumentFile#CWinApp##UAEPAVCDocument##PB_WH#Z)
1>test1.obj : error LNK2001: unresolved external symbol "public: virtual long __thiscall CWinApp::RegisterWithRestartManager(wchar_t const *,unsigned long,unsigned long (__stdcall*)(void *),void *,unsigned long,unsigned long)" (?RegisterWithRestartManager#CWinApp##UAEJPB_WKP6GKPAX#Z1KK#Z)
1>test1.obj : error LNK2001: unresolved external symbol "public: virtual long __thiscall CWinApp::RegisterWithRestartManager(int,class ATL::CStringT<wchar_t,class StrTraitMFC<wchar_t,class ATL::ChTraitsCRT<wchar_t> > > const &)" (?RegisterWithRestartManager#CWinApp##UAEJHABV?$CStringT#_WV?$StrTraitMFC#_WV?$ChTraitsCRT#_W#ATL#####ATL###Z)
1>test1.obj : error LNK2001: unresolved external symbol "public: virtual unsigned long __thiscall CWinApp::ApplicationRecoveryCallback(void *)" (?ApplicationRecoveryCallback#CWinApp##UAEKPAX#Z)
1>test1.obj : error LNK2001: unresolved external symbol "public: virtual class CDataRecoveryHandler * __thiscall CWinApp::GetDataRecoveryHandler(void)" (?GetDataRecoveryHandler#CWinApp##UAEPAVCDataRecoveryHandler##XZ)
1>test1.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall CWinApp::IsTaskbarInteractionEnabled(void)" (?IsTaskbarInteractionEnabled#CWinApp##UAEHXZ)
1>test1.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall CWinApp::RestartInstance(void)" (?RestartInstance#CWinApp##UAEHXZ)
1>test1.obj : error LNK2019: unresolved external symbol "public: __thiscall CShellManager::CShellManager(void)" (??0CShellManager##QAE#XZ) referenced in function "public: virtual int __thiscall Ctest1App::InitInstance(void)" (?InitInstance#Ctest1App##UAEHXZ)
1>test1.obj : error LNK2019: unresolved external symbol "protected: virtual __thiscall CDialogImpl::~CDialogImpl(void)" (??1CDialogImpl##MAE#XZ) referenced in function "public: virtual __thiscall CDialogEx::~CDialogEx(void)" (??1CDialogEx##UAE#XZ)
1>test1Dlg.obj : error LNK2001: unresolved external symbol "protected: virtual __thiscall CDialogImpl::~CDialogImpl(void)" (??1CDialogImpl##MAE#XZ)
1>test1Dlg.obj : error LNK2001: unresolved external symbol "protected: static struct AFX_MSGMAP const * __stdcall CDialogEx::GetThisMessageMap(void)" (?GetThisMessageMap#CDialogEx##KGPBUAFX_MSGMAP##XZ)
1>test1Dlg.obj : error LNK2019: unresolved external symbol "public: __thiscall CDialogEx::CDialogEx(unsigned int,class CWnd *)" (??0CDialogEx##QAE#IPAVCWnd###Z) referenced in function "public: __thiscall CAboutDlg::CAboutDlg(void)" (??0CAboutDlg##QAE#XZ)
1>test1Dlg.obj : error LNK2001: unresolved external symbol "public: virtual struct CRuntimeClass * __thiscall CDialogEx::GetRuntimeClass(void)const " (?GetRuntimeClass#CDialogEx##UBEPAUCRuntimeClass##XZ)
1>test1Dlg.obj : error LNK2001: unresolved external symbol "public: virtual class CMenu * __thiscall CWnd::GetMenu(void)const " (?GetMenu#CWnd##UBEPAVCMenu##XZ)
1>test1Dlg.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall CWnd::SetMenu(class CMenu *)" (?SetMenu#CWnd##UAEHPAVCMenu###Z)
1>test1Dlg.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CWnd::OnDrawIconicThumbnailOrLivePreview(class CDC &,class CRect,class CSize,int,int &)" (?OnDrawIconicThumbnailOrLivePreview#CWnd##UAEXAAVCDC##VCRect##VCSize##HAAH#Z)
1>test1Dlg.obj : error LNK2001: unresolved external symbol "protected: virtual int __thiscall CDialogEx::OnCommand(unsigned int,long)" (?OnCommand#CDialogEx##MAEHIJ#Z)
1>test1Dlg.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall CDialogEx::PreTranslateMessage(struct tagMSG *)" (?PreTranslateMessage#CDialogEx##UAEHPAUtagMSG###Z)
1>test1Dlg.obj : error LNK2001: unresolved external symbol "protected: virtual int __thiscall CWnd::OnTouchInputs(unsigned int,struct tagTOUCHINPUT *)" (?OnTouchInputs#CWnd##MAEHIPAUtagTOUCHINPUT###Z)
1>test1Dlg.obj : error LNK2001: unresolved external symbol "protected: virtual int __thiscall CWnd::OnTouchInput(class CPoint,int,int,struct tagTOUCHINPUT *)" (?OnTouchInput#CWnd##MAEHVCPoint##HHPAUtagTOUCHINPUT###Z)
1>test1Dlg.obj : error LNK2001: unresolved external symbol "protected: virtual unsigned long __thiscall CWnd::GetGestureStatus(class CPoint)" (?GetGestureStatus#CWnd##MAEKVCPoint###Z)
1>test1Dlg.obj : error LNK2001: unresolved external symbol "protected: virtual int __thiscall CWnd::OnGestureZoom(class CPoint,long)" (?OnGestureZoom#CWnd##MAEHVCPoint##J#Z)
1>test1Dlg.obj : error LNK2001: unresolved external symbol "protected: virtual int __thiscall CWnd::OnGesturePan(class CPoint,class CPoint)" (?OnGesturePan#CWnd##MAEHVCPoint##0#Z)
1>test1Dlg.obj : error LNK2001: unresolved external symbol "protected: virtual int __thiscall CWnd::OnGestureRotate(class CPoint,double)" (?OnGestureRotate#CWnd##MAEHVCPoint##N#Z)
1>test1Dlg.obj : error LNK2001: unresolved external symbol "protected: virtual int __thiscall CWnd::OnGestureTwoFingerTap(class CPoint)" (?OnGestureTwoFingerTap#CWnd##MAEHVCPoint###Z)
1>test1Dlg.obj : error LNK2001: unresolved external symbol "protected: virtual int __thiscall CWnd::OnGesturePressAndTap(class CPoint,long)" (?OnGesturePressAndTap#CWnd##MAEHVCPoint##J#Z)
1>test1Dlg.obj : error LNK2019: unresolved external symbol "public: long __thiscall CWnd::SendMessageW(unsigned int,unsigned int,long)const " (?SendMessageW#CWnd##QBEJIIJ#Z) referenced in function "protected: void __thiscall Ctest1Dlg::OnPaint(void)" (?OnPaint#Ctest1Dlg##IAEXXZ)
1>c:\Projects\test1\Debug\test1.exe : fatal error LNK1120: 32 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
I've tried reinstalling VS2010 and made sure I had C++ installed, but I still get the errors. I've tried making the Multiple document and Single document types, these both work. So it's only the Dialog based one that has errors.
Thanks,
John.
You have to link with MFC. Go to Project - > Project Property -> Configuration Properties -> In "Use of MFC" put "Use MFC in a Static Library"