UE4 LNK2001 Error when deriving from K2Node_AnimGetter - c++

I am trying to derive from K2Node_AnimGetter to add some functionality to it.
However I get some unresolved external symbol LNK2001 errors when I try to compile it.
I have no problem to compile when deriving from K2Node_CallFunction (from what AnimGetter derive itself).
I tried to include some dependencies like AnimGraph in the MyGameEditor.Build.cs but with no result...
Am I missing something ?
K2Node_MyAnimGetter.h
#pragma once
#include "CoreMinimal.h"
#include "K2Node_AnimGetter.h"
#include "K2Node_MyAnimGetter.generated.h"
UCLASS()
class MYGAMEEDITOR_API UK2Node_MyAnimGetter : public UK2Node_AnimGetter
{
GENERATED_BODY()
};
K2Node_MyAnimGetter.cpp
#include "K2Node_MyAnimGetter.h"
// nothing else since my class is empty
MyGameEditor.Build.cs
using UnrealBuildTool;
public class MyGameEditor : ModuleRules
{
public MyGameEditor(ReadOnlyTargetRules Target) : base(Target)
{
PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;
PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "BlueprintGraph", "AnimGraph", "AnimGraphRunTime" });
PrivateDependencyModuleNames.AddRange(new string[] { "Engine", "UnrealEd", "BlueprintGraph", "AnimGraph", "AnimGraphRunTime", "KismetCompiler" });
}
}
Error logs :
1>K2Node_MyAnimGetter.cpp.obj : error LNK2001: symbole externe non resolu "public: virtual void __cdecl UK2Node_AnimGetter::Serialize(class FArchive &)" (?Serialize#UK2Node_AnimGetter##UEAAXAEAVFArchive###Z)
1>K2Node_MyAnimGetter.gen.cpp.obj : error LNK2001: symbole externe non resolu "public: virtual void __cdecl UK2Node_AnimGetter::Serialize(class FArchive &)" (?Serialize#UK2Node_AnimGetter##UEAAXAEAVFArchive###Z)
1>K2Node_MyAnimGetter.cpp.obj : error LNK2001: symbole externe non resolu "public: virtual void __cdecl UK2Node_AnimGetter::PostPasteNode(void)" (?PostPasteNode#UK2Node_AnimGetter##UEAAXXZ)
1>K2Node_MyAnimGetter.gen.cpp.obj : error LNK2001: symbole externe non resolu "public: virtual void __cdecl UK2Node_AnimGetter::PostPasteNode(void)" (?PostPasteNode#UK2Node_AnimGetter##UEAAXXZ)
1>K2Node_MyAnimGetter.cpp.obj : error LNK2001: symbole externe non resolu "public: virtual void __cdecl UK2Node_AnimGetter::AllocateDefaultPins(void)" (?AllocateDefaultPins#UK2Node_AnimGetter##UEAAXXZ)
1>K2Node_MyAnimGetter.gen.cpp.obj : error LNK2001: symbole externe non resolu "public: virtual void __cdecl UK2Node_AnimGetter::AllocateDefaultPins(void)" (?AllocateDefaultPins#UK2Node_AnimGetter##UEAAXXZ)
1>K2Node_MyAnimGetter.cpp.obj : error LNK2001: symbole externe non resolu "public: virtual class FText __cdecl UK2Node_AnimGetter::GetNodeTitle(enum ENodeTitleType::Type)const " (?GetNodeTitle#UK2Node_AnimGetter##UEBA?AVFText##W4Type#ENodeTitleType###Z)
1>K2Node_MyAnimGetter.gen.cpp.obj : error LNK2001: symbole externe non resolu "public: virtual class FText __cdecl UK2Node_AnimGetter::GetNodeTitle(enum ENodeTitleType::Type)const " (?GetNodeTitle#UK2Node_AnimGetter##UEBA?AVFText##W4Type#ENodeTitleType###Z)
1>K2Node_MyAnimGetter.cpp.obj : error LNK2001: symbole externe non resolu "public: virtual bool __cdecl UK2Node_AnimGetter::CanCreateUnderSpecifiedSchema(class UEdGraphSchema const *)const " (?CanCreateUnderSpecifiedSchema#UK2Node_AnimGetter##UEBA_NPEBVUEdGraphSchema###Z)
1>K2Node_MyAnimGetter.gen.cpp.obj : error LNK2001: symbole externe non resolu "public: virtual bool __cdecl UK2Node_AnimGetter::CanCreateUnderSpecifiedSchema(class UEdGraphSchema const *)const " (?CanCreateUnderSpecifiedSchema#UK2Node_AnimGetter##UEBA_NPEBVUEdGraphSchema###Z)
1>K2Node_MyAnimGetter.cpp.obj : error LNK2001: symbole externe non resolu "public: virtual bool __cdecl UK2Node_AnimGetter::IsActionFilteredOut(class FBlueprintActionFilter const &)" (?IsActionFilteredOut#UK2Node_AnimGetter##UEAA_NAEBVFBlueprintActionFilter###Z)
1>K2Node_MyAnimGetter.gen.cpp.obj : error LNK2001: symbole externe non resolu "public: virtual bool __cdecl UK2Node_AnimGetter::IsActionFilteredOut(class FBlueprintActionFilter const &)" (?IsActionFilteredOut#UK2Node_AnimGetter##UEAA_NAEBVFBlueprintActionFilter###Z)
1>K2Node_MyAnimGetter.cpp.obj : error LNK2001: symbole externe non resolu "public: virtual void __cdecl UK2Node_AnimGetter::GetMenuActions(class FBlueprintActionDatabaseRegistrar &)const " (?GetMenuActions#UK2Node_AnimGetter##UEBAXAEAVFBlueprintActionDatabaseRegistrar###Z)
1>K2Node_MyAnimGetter.gen.cpp.obj : error LNK2001: symbole externe non resolu "public: virtual void __cdecl UK2Node_AnimGetter::GetMenuActions(class FBlueprintActionDatabaseRegistrar &)const " (?GetMenuActions#UK2Node_AnimGetter##UEBAXAEAVFBlueprintActionDatabaseRegistrar###Z)
1>R:\SVN\MyGame\Binaries\Win64\UE4Editor-MyGameEditor.dll : fatal error LNK1120: 7 externes non resolus

If you look into the UK2Node_AnimGetter class you will notice that it is UCLASS(MinimalAPI). This means that the class is accessible outside of its Module, but its internal functions are not exported.
You will also notice that all of the functions with linker errors are virtual override. By overriding these functions you maybe able to export them manually and thus fix the linking errors.

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

dll issue using Qt in Visual Studio 2012

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

VS2010E Qt 5.1 compilation error LNK2001 LNK2019

i'm trying to build a simple Qt window from a photoshop plugin
i put libraries where it belongs
in the Include directory :
E:\Program_Files\Qt32\5.1.0\msvc2010\include;
E:\Program_Files\Qt32\5.1.0\msvc2010\include\QtWidgets\;
in the library directory :
E:\Program_Files\Qt32\5.1.0\msvc2010\lib;
E:\Program_Files\Qt32\5.1.0\msvc2010\lib\cmake\Qt5Core;
in link>general>directory of additional libraries
E:\Program_Files\Qt32\5.1.0\msvc2010\lib\cmake;
E:\Program_Fi
les\Qt32\5.1.0\msvc2010\lib\cmake\Qt5Core;
i alos added in link editor>entry>additional dependency
Qt5Cored.lib;
Qt5Core.lib;
Qt5Gui.lib;
here is what i have : (i use VS2010 Express so i can't use VSadd-in)
i've tried a lot of things without luck
thanks
1> Création de la bibliothèque .\..\..\..\Output\Objs\tempproj\Release/tempproj.lib et de l'objet .\..\..\..\Output\Objs\tempproj\Release/tempproj.exp
1>GradientSelector.obj : error LNK2019: symbole externe non résolu "__declspec(dllimport) public: void __thiscall QAbstractButton::setText(class QString const &)" (__imp_?setText#QAbstractButton##QAEXABVQString###Z) référencé dans la fonction "public: void __thiscall Ui_GradientSelector::retranslateUi(class QMainWindow *)" (?retranslateUi#Ui_GradientSelector##QAEXPAVQMainWindow###Z)
1>GradientSelector.obj : error LNK2019: symbole externe non résolu "__declspec(dllimport) public: void __thiscall QWidget::setWindowTitle(class QString const &)" (__imp_?setWindowTitle#QWidget##QAEXABVQString###Z) référencé dans la fonction "public: void __thiscall Ui_GradientSelector::retranslateUi(class QMainWindow *)" (?retranslateUi#Ui_GradientSelector##QAEXPAVQMainWindow###Z)
1>GradientSelector.obj : error LNK2019: symbole externe non résolu "__declspec(dllimport) public: virtual __thiscall QMainWindow::~QMainWindow(void)" (__imp_??1QMainWindow##UAE#XZ) référencé dans la fonction "public: virtual __thiscall GradientSelector::~GradientSelector(void)" (??1GradientSelector##UAE#XZ)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "public: virtual struct QMetaObject const * __thiscall GradientSelector::metaObject(void)const " (?metaObject#GradientSelector##UBEPBUQMetaObject##XZ)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "public: virtual void * __thiscall GradientSelector::qt_metacast(char const *)" (?qt_metacast#GradientSelector##UAEPAXPBD#Z)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "public: virtual int __thiscall GradientSelector::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall#GradientSelector##UAEHW4Call#QMetaObject##HPAPAX#Z)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "protected: virtual bool __thiscall QMainWindow::event(class QEvent *)" (?event#QMainWindow##MAE_NPAVQEvent###Z)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "public: virtual void __thiscall QWidget::setVisible(bool)" (?setVisible#QWidget##UAEX_N#Z)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "public: virtual class QSize __thiscall QWidget::sizeHint(void)const " (?sizeHint#QWidget##UBE?AVQSize##XZ)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "public: virtual class QSize __thiscall QWidget::minimumSizeHint(void)const " (?minimumSizeHint#QWidget##UBE?AVQSize##XZ)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "public: virtual int __thiscall QWidget::heightForWidth(int)const " (?heightForWidth#QWidget##UBEHH#Z)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "public: virtual bool __thiscall QWidget::hasHeightForWidth(void)const " (?hasHeightForWidth#QWidget##UBE_NXZ)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "protected: virtual void __thiscall QWidget::mousePressEvent(class QMouseEvent *)" (?mousePressEvent#QWidget##MAEXPAVQMouseEvent###Z)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "protected: virtual void __thiscall QWidget::mouseReleaseEvent(class QMouseEvent *)" (?mouseReleaseEvent#QWidget##MAEXPAVQMouseEvent###Z)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "protected: virtual void __thiscall QWidget::mouseDoubleClickEvent(class QMouseEvent *)" (?mouseDoubleClickEvent#QWidget##MAEXPAVQMouseEvent###Z)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "protected: virtual void __thiscall QWidget::mouseMoveEvent(class QMouseEvent *)" (?mouseMoveEvent#QWidget##MAEXPAVQMouseEvent###Z)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "protected: virtual void __thiscall QWidget::wheelEvent(class QWheelEvent *)" (?wheelEvent#QWidget##MAEXPAVQWheelEvent###Z)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "protected: virtual void __thiscall QWidget::keyPressEvent(class QKeyEvent *)" (?keyPressEvent#QWidget##MAEXPAVQKeyEvent###Z)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "protected: virtual void __thiscall QWidget::keyReleaseEvent(class QKeyEvent *)" (?keyReleaseEvent#QWidget##MAEXPAVQKeyEvent###Z)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "protected: virtual void __thiscall QWidget::focusInEvent(class QFocusEvent *)" (?focusInEvent#QWidget##MAEXPAVQFocusEvent###Z)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "protected: virtual void __thiscall QWidget::focusOutEvent(class QFocusEvent *)" (?focusOutEvent#QWidget##MAEXPAVQFocusEvent###Z)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "protected: virtual void __thiscall QWidget::enterEvent(class QEvent *)" (?enterEvent#QWidget##MAEXPAVQEvent###Z)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "protected: virtual void __thiscall QWidget::leaveEvent(class QEvent *)" (?leaveEvent#QWidget##MAEXPAVQEvent###Z)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "protected: virtual void __thiscall QWidget::paintEvent(class QPaintEvent *)" (?paintEvent#QWidget##MAEXPAVQPaintEvent###Z)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "protected: virtual void __thiscall QWidget::moveEvent(class QMoveEvent *)" (?moveEvent#QWidget##MAEXPAVQMoveEvent###Z)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "protected: virtual void __thiscall QWidget::resizeEvent(class QResizeEvent *)" (?resizeEvent#QWidget##MAEXPAVQResizeEvent###Z)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "protected: virtual void __thiscall QWidget::closeEvent(class QCloseEvent *)" (?closeEvent#QWidget##MAEXPAVQCloseEvent###Z)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "protected: virtual void __thiscall QMainWindow::contextMenuEvent(class QContextMenuEvent *)" (?contextMenuEvent#QMainWindow##MAEXPAVQContextMenuEvent###Z)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "protected: virtual void __thiscall QWidget::tabletEvent(class QTabletEvent *)" (?tabletEvent#QWidget##MAEXPAVQTabletEvent###Z)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "protected: virtual void __thiscall QWidget::actionEvent(class QActionEvent *)" (?actionEvent#QWidget##MAEXPAVQActionEvent###Z)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "protected: virtual void __thiscall QWidget::dragEnterEvent(class QDragEnterEvent *)" (?dragEnterEvent#QWidget##MAEXPAVQDragEnterEvent###Z)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "protected: virtual void __thiscall QWidget::dragMoveEvent(class QDragMoveEvent *)" (?dragMoveEvent#QWidget##MAEXPAVQDragMoveEvent###Z)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "protected: virtual void __thiscall QWidget::dragLeaveEvent(class QDragLeaveEvent *)" (?dragLeaveEvent#QWidget##MAEXPAVQDragLeaveEvent###Z)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "protected: virtual void __thiscall QWidget::dropEvent(class QDropEvent *)" (?dropEvent#QWidget##MAEXPAVQDropEvent###Z)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "protected: virtual void __thiscall QWidget::showEvent(class QShowEvent *)" (?showEvent#QWidget##MAEXPAVQShowEvent###Z)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "protected: virtual void __thiscall QWidget::hideEvent(class QHideEvent *)" (?hideEvent#QWidget##MAEXPAVQHideEvent###Z)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "protected: virtual bool __thiscall QWidget::nativeEvent(class QByteArray const &,void *,long *)" (?nativeEvent#QWidget##MAE_NABVQByteArray##PAXPAJ#Z)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "protected: virtual void __thiscall QWidget::changeEvent(class QEvent *)" (?changeEvent#QWidget##MAEXPAVQEvent###Z)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "protected: virtual void __thiscall QWidget::inputMethodEvent(class QInputMethodEvent *)" (?inputMethodEvent#QWidget##MAEXPAVQInputMethodEvent###Z)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "public: virtual class QVariant __thiscall QWidget::inputMethodQuery(enum Qt::InputMethodQuery)const " (?inputMethodQuery#QWidget##UBE?AVQVariant##W4InputMethodQuery#Qt###Z)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "protected: virtual bool __thiscall QWidget::focusNextPrevChild(bool)" (?focusNextPrevChild#QWidget##MAE_N_N#Z)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "public: virtual class QMenu * __thiscall QMainWindow::createPopupMenu(void)" (?createPopupMenu#QMainWindow##UAEPAVQMenu##XZ)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "public: virtual int __thiscall QWidget::devType(void)const " (?devType#QWidget##UBEHXZ)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "public: virtual class QPaintEngine * __thiscall QWidget::paintEngine(void)const " (?paintEngine#QWidget##UBEPAVQPaintEngine##XZ)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "protected: virtual int __thiscall QWidget::metric(enum QPaintDevice::PaintDeviceMetric)const " (?metric#QWidget##MBEHW4PaintDeviceMetric#QPaintDevice###Z)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "protected: virtual void __thiscall QWidget::initPainter(class QPainter *)const " (?initPainter#QWidget##MBEXPAVQPainter###Z)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "protected: virtual class QPaintDevice * __thiscall QWidget::redirected(class QPoint *)const " (?redirected#QWidget##MBEPAVQPaintDevice##PAVQPoint###Z)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "protected: virtual class QPainter * __thiscall QWidget::sharedPainter(void)const " (?sharedPainter#QWidget##MBEPAVQPainter##XZ)
1>GradientSelector.obj : error LNK2019: symbole externe non résolu "__declspec(dllimport) public: void __thiscall QMainWindow::setStatusBar(class QStatusBar *)" (__imp_?setStatusBar#QMainWindow##QAEXPAVQStatusBar###Z) référencé dans la fonction "public: void __thiscall Ui_GradientSelector::setupUi(class QMainWindow *)" (?setupUi#Ui_GradientSelector##QAEXPAVQMainWindow###Z)setupUi#Ui_GradientSelector##QAEXPAVQMainWindow###Z)
1>GradientSelector.obj : error LNK2019: symbole externe non résolu "__declspec(dllimport) public: __thiscall QWidget::QWidget(class QWidget *,class QFlags<enum Qt::WindowType>)" (__imp_??0QWidget##QAE#PAV0#V?$QFlags#W4WindowType#Qt#####Z) référencé dans la fonction "public: void __thiscall Ui_GradientSelector::setupUi(class QMainWindow *)" (?setupUi#Ui_GradientSelector##QAEXPAVQMainWindow###Z)
1>GradientSelector.obj : error LNK2019: symbole externe non résolu "__declspec(dllimport) public: void __thiscall QWidget::resize(class QSize const &)" (__imp_?resize#QWidget##QAEXABVQSize###Z) référencé dans la fonction "public: void __thiscall Ui_GradientSelector::setupUi(class QMainWindow *)" (?setupUi#Ui_GradientSelector##QAEXPAVQMainWindow###Z)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "public: virtual struct QMetaObject const * __thiscall QWidget::metaObject(void)const " (?metaObject#QWidget##UBEPBUQMetaObject##XZ)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "public: virtual void * __thiscall QWidget::qt_metacast(char const *)" (?qt_metacast#QWidget##UAEPAXPBD#Z)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "public: virtual int __thiscall QWidget::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall#QWidget##UAEHW4Call#QMetaObject##HPAPAX#Z)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "protected: virtual bool __thiscall QWidget::event(class QEvent *)" (?event#QWidget##MAE_NPAVQEvent###Z)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "protected: virtual void __thiscall QWidget::contextMenuEvent(class QContextMenuEvent *)" (?contextMenuEvent#QWidget##MAEXPAVQContextMenuEvent###Z)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "public: virtual struct QMetaObject const * __thiscall QPushButton::metaObject(void)const " (?metaObject#QPushButton##UBEPBUQMetaObject##XZ)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "public: virtual void * __thiscall QPushButton::qt_metacast(char const *)" (?qt_metacast#QPushButton##UAEPAXPBD#Z)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "public: virtual int __thiscall QPushButton::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall#QPushButton##UAEHW4Call#QMetaObject##HPAPAX#Z)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "protected: virtual bool __thiscall QPushButton::event(class QEvent *)" (?event#QPushButton##MAE_NPAVQEvent###Z)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "protected: virtual void __thiscall QAbstractButton::timerEvent(class QTimerEvent *)" (?timerEvent#QAbstractButton##MAEXPAVQTimerEvent###Z)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "public: virtual class QSize __thiscall QPushButton::sizeHint(void)const " (?sizeHint#QPushButton##UBE?AVQSize##XZ)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "public: virtual class QSize __thiscall QPushButton::minimumSizeHint(void)const " (?minimumSizeHint#QPushButton##UBE?AVQSize##XZ)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "protected: virtual void __thiscall QAbstractButton::mousePressEvent(class QMouseEvent *)" (?mousePressEvent#QAbstractButton##MAEXPAVQMouseEvent###Z)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "protected: virtual void __thiscall QAbstractButton::mouseReleaseEvent(class QMouseEvent *)" (?mouseReleaseEvent#QAbstractButton##MAEXPAVQMouseEvent###Z)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "protected: virtual void __thiscall QAbstractButton::mouseMoveEvent(class QMouseEvent *)" (?mouseMoveEvent#QAbstractButton##MAEXPAVQMouseEvent###Z)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "protected: virtual void __thiscall QPushButton::keyPressEvent(class QKeyEvent *)" (?keyPressEvent#QPushButton##MAEXPAVQKeyEvent###Z)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "protected: virtual void __thiscall QAbstractButton::keyReleaseEvent(class QKeyEvent *)" (?keyReleaseEvent#QAbstractButton##MAEXPAVQKeyEvent###Z)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "protected: virtual void __thiscall QPushButton::focusInEvent(class QFocusEvent *)" (?focusInEvent#QPushButton##MAEXPAVQFocusEvent###Z)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "protected: virtual void __thiscall QPushButton::focusOutEvent(class QFocusEvent *)" (?focusOutEvent#QPushButton##MAEXPAVQFocusEvent###Z)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "protected: virtual void __thiscall QPushButton::paintEvent(class QPaintEvent *)" (?paintEvent#QPushButton##MAEXPAVQPaintEvent###Z)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "protected: virtual void __thiscall QAbstractButton::changeEvent(class QEvent *)" (?changeEvent#QAbstractButton##MAEXPAVQEvent###Z)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "protected: virtual bool __thiscall QAbstractButton::hitButton(class QPoint const &)const " (?hitButton#QAbstractButton##MBE_NABVQPoint###Z)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "protected: virtual void __thiscall QAbstractButton::checkStateSet(void)" (?checkStateSet#QAbstractButton##MAEXXZ)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "protected: virtual void __thiscall QAbstractButton::nextCheckState(void)" (?nextCheckState#QAbstractButton##MAEXXZ)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "public: virtual struct QMetaObject const * __thiscall QLineEdit::metaObject(void)const " metaObject#QMenuBar##UBEPBUQMetaObject##XZ)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "public: virtual void * __thiscall QMenuBar::qt_metacast(char const *)" (?qt_metacast#QMenuBar##UAEPAXPBD#Z)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "public: virtual int __thiscall QMenuBar::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall#QMenuBar##UAEHW4Call#QMetaObject##HPAPAX#Z)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "protected: virtual bool __thiscall QMenuBar::event(class QEvent *)" (?event#QMenuBar##MAE_NPAVQEvent###Z)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "protected: virtual bool __thiscall QMenuBar::eventFilter(class QObject *,class QEvent *)" (?eventFilter#QMenuBar##MAE_NPAVQObject##PAVQEvent###Z)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "protected: virtual void __thiscall QMenuBar::timerEvent(class QTimerEvent *)" (?timerEvent#QMenuBar##MAEXPAVQTimerEvent###Z)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "public: virtual void __thiscall QMenuBar::setVisible(bool)" (?setVisible#QMenuBar##UAEX_N#Z)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "public: virtual class QSize __thiscall QMenuBar::sizeHint(void)const " (?sizeHint#QMenuBar##UBE?AVQSize##XZ)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "public: virtual class QSize __thiscall QMenuBar::minimumSizeHint(void)const " (?minimumSizeHint#QMenuBar##UBE?AVQSize##XZ)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "public: virtual int __thiscall QMenuBar::heightForWidth(int)const " (?heightForWidth#QMenuBar##UBEHH#Z)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "protected: virtual void __thiscall QMenuBar::mousePressEvent(class QMouseEvent *)" (?mousePressEvent#QMenuBar##MAEXPAVQMouseEvent###Z)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "protected: virtual void __thiscall QMenuBar::mouseReleaseEvent(class QMouseEvent *)" (?mouseReleaseEvent#QMenuBar##MAEXPAVQMouseEvent###Z)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "protected: virtual void __thiscall QMenuBar::mouseMoveEvent(class QMouseEvent *)" (?mouseMoveEvent#QMenuBar##MAEXPAVQMouseEvent###Z)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "protected: virtual void __thiscall QMenuBar::keyPressEvent(class QKeyEvent *)" (?keyPressEvent#QMenuBar##MAEXPAVQKeyEvent###Z)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "protected: virtual void __thiscall QMenuBar::focusInEvent(class QFocusEvent *)" (?focusInEvent#QMenuBar##MAEXPAVQFocusEvent###Z)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "protected: virtual void __thiscall QMenuBar::focusOutEvent(class QFocusEvent *)" (?focusOutEvent#QMenuBar##MAEXPAVQFocusEvent###Z)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "protected: virtual void __thiscall QMenuBar::leaveEvent(class QEvent *)" (?leaveEvent#QMenuBar##MAEXPAVQEvent###Z)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "protected: virtual void __thiscall QMenuBar::paintEvent(class QPaintEvent *)" (?paintEvent#QMenuBar##MAEXPAVQPaintEvent###Z)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "protected: virtual void __thiscall QMenuBar::resizeEvent(class QResizeEvent *)" (?resizeEvent#QMenuBar##MAEXPAVQResizeEvent###Z)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "protected: virtual void __thiscall QMenuBar::actionEvent(class QActionEvent *)" (?actionEvent#QMenuBar##MAEXPAVQActionEvent###Z)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "protected: virtual void __thiscall QMenuBar::changeEvent(class QEvent *)" (?changeEvent#QMenuBar##MAEXPAVQEvent###Z)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "public: virtual struct QMetaObject const * __thiscall QToolBar::metaObject(void)const " (?metaObject#QToolBar##UBEPBUQMetaObject##XZ)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "public: virtual void * __thiscall QToolBar::qt_metacast(char const *)" (?qt_metacast#QToolBar##UAEPAXPBD#Z)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "public: virtual int __thiscall QToolBar::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall#QToolBar##UAEHW4Call#QMetaObject##HPAPAX#Z)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "protected: virtual bool __thiscall QToolBar::event(class QEvent *)" (?event#QToolBar##MAE_NPAVQEvent###Z)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "protected: virtual void __thiscall QToolBar::paintEvent(class QPaintEvent *)" (?paintEvent#QToolBar##MAEXPAVQPaintEvent###Z)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "protected: virtual void __thiscall QToolBar::actionEvent(class QActionEvent *)" (?actionEvent#QToolBar##MAEXPAVQActionEvent###Z)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "protected: virtual void __thiscall QToolBar::changeEvent(class QEvent *)" (?changeEvent#QToolBar##MAEXPAVQEvent###Z)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "public: virtual struct QMetaObject const * __thiscall QStatusBar::metaObject(void)const " (?metaObject#QStatusBar##UBEPBUQMetaObject##XZ)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "public: virtual void * __thiscall QStatusBar::qt_metacast(char const *)" (?qt_metacast#QStatusBar##UAEPAXPBD#Z)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "public: virtual int __thiscall QStatusBar::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall#QStatusBar##UAEHW4Call#QMetaObject##HPAPAX#Z)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "protected: virtual bool __thiscall QStatusBar::event(class QEvent *)" (?event#QStatusBar##MAE_NPAVQEvent###Z)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "protected: virtual void __thiscall QStatusBar::paintEvent(class QPaintEvent *)" (?paintEvent#QStatusBar##MAEXPAVQPaintEvent###Z)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "protected: virtual void __thiscall QStatusBar::resizeEvent(class QResizeEvent *)" (?resizeEvent#QStatusBar##MAEXPAVQResizeEvent###Z)
1>GradientSelector.obj : error LNK2001: symbole externe non résolu "protected: virtual void __thiscall QStatusBar::showEvent(class QShowEvent *)" (?showEvent#QStatusBar##MAEXPAVQShowEvent###Z)
1>GradientSelector.obj : error LNK2019: symbole externe non résolu "__declspec(dllimport) public: virtual __thiscall QWidget::~QWidget(void)" (__imp_??1QWidget##UAE#XZ) référencé dans la fonction "public: virtual void * __thiscall QWidget::`scalar deleting destructor'(unsigned int)" (??_GQWidget##UAEPAXI#Z)
1>GradientSelector.obj : error LNK2019: symbole externe non résolu "__declspec(dllimport) public: virtual __thiscall QPushButton::~QPushButton(void)" (__imp_??1QPushButton##UAE#XZ) référencé dans la fonction "public: virtual void * __thiscall QPushButton::`scalar deleting destructor'(unsigned int)" (??_GQPushButton##UAEPAXI#Z)
1>GradientSelector.obj : error LNK2019: symbole externe non résolu "__declspec(dllimport) public: virtual __thiscall QLineEdit::~QLineEdit(void)" (__imp_??1QLineEdit##UAE#XZ) référencé dans la fonction "public: virtual void * __thiscall QLineEdit::`scalar deleting destructor'(unsigned int)" (??_GQLineEdit##UAEPAXI#Z)
1>GradientSelector.obj : error LNK2019: symbole externe non résolu "__declspec(dllimport) public: virtual __thiscall QMenuBar::~QMenuBar(void)" (__imp_??1QMenuBar##UAE#XZ) référencé dans la fonction "public: virtual void * __thiscall QMenuBar::`scalar deleting destructor'(unsigned int)" (??_GQMenuBar##UAEPAXI#Z)
1>GradientSelector.obj : error LNK2019: symbole externe non résolu "__declspec(dllimport) public: virtual __thiscall QToolBar::~QToolBar(void)" (__imp_??1QToolBar##UAE#XZ) référencé dans la fonction "public: virtual void * __thiscall QToolBar::`scalar deleting destructor'(unsigned int)" (??_GQToolBar##UAEPAXI#Z)
1>GradientSelector.obj : error LNK2019: symbole externe non résolu "__declspec(dllimport) public: virtual __thiscall QStatusBar::~QStatusBar(void)" (__imp_??1QStatusBar##UAE#XZ) référencé dans la fonction "public: virtual void * __thiscall QStatusBar::`scalar deleting destructor'(unsigned int)" (??_GQStatusBar##UAEPAXI#Z)
1>GradientSelector.obj : error LNK2019: symbole externe non résolu "__declspec(dllimport) public: __thiscall QMainWindow::QMainWindow(class QWidget *,class QFlags<enum Qt::WindowType>)" (__imp_??0QMainWindow##QAE#PAVQWidget##V?$QFlags#W4WindowType#Qt#####Z) référencé dans la fonction "public: __thiscall GradientSelector::GradientSelector(class QWidget *)" (??0GradientSelector##QAE#PAVQWidget###Z)
1>C:\Program Files (x86)\Adobe\Photoshop Elements 3.0\Plug-Ins\Filters\tempproj.8bf : fatal error LNK1120: 148 externes non résolus
Where did you install MSVC2010. If you did not change the MSVC installation path when you installed it then, your MSVC is on C:\Program Files\Microsoft Visual Studio 10.0... You should then include your .header files and .lib files on C:\Program Files\Microsoft Visual Studio 10.0\VC\include... and C:\Program Files\Microsoft Visual Studio 10.0\VC\lib.. This is the path where MSVC compiler will look for the header files and .lib files.

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"