unresolved-external

Why does this virtual destructor trigger an unresolved external?

二次信任 提交于 2019-12-09 14:21:39
问题 Consider the following: In X.h: class X { X(); virtual ~X(); }; X.cpp: #include "X.h" X::X() {} Try to build this (I'm using a .dll target to avoid an error on the missing main, and I'm using Visual Studio 2010): Error 1 error LNK2001: unresolved external symbol "private: virtual __thiscall X::~X(void)" (??1X@@EAE@XZ) Small modifications result in a successful build, however: X.h: class X { inline X(); // Now inlined, and everything builds virtual ~X(); }; or X.h: class X { X(); ~X(); // No

I can't compile a solution due to “Error LNK2028: unresolved token…”

百般思念 提交于 2019-12-08 19:28:53
问题 I have a dll programmed in C++, and a exe programmed in Visual C++. I have the functions in dll declared as: string __declspec( dllexport ) ConfigureHAT(T_STRING pathFile); And in the exe project I include all the headers files and the dll file. I call the function in dll: string ret = ConfigureHAT("file.txt"); And when the executable project is compiled, it fails with the next errors: 1>HATdllTester.obj : error LNK2028: unresolved token (0A000317) "class std::basic_string,class std:

How to fix unresolved externals of SDL 2.0.3 on Visual Studio 2015 Preview?

北战南征 提交于 2019-12-08 15:24:33
问题 so i'm getting the following errors: 1>SDL2main.lib(SDL_windows_main.obj) : error LNK2019: unresolved external symbol __imp__fprintf referenced in function _ShowError 1>SDL2main.lib(SDL_windows_main.obj) : error LNK2019: unresolved external symbol __imp____iob_func referenced in function _ShowError my code is simply: #include <iostream> #include "SDL2\SDL.h" int main(int argc, char* argv[]) { std::cout << "Hello World!" << std::endl; return 0; } i've linked the libraries correctly, and this

LNK2019 error, unresolved external symbol

大憨熊 提交于 2019-12-08 02:47:54
问题 The error verbatim reads 1>yes.obj : error LNK2019: unresolved external symbol "int __cdecl availableMoves(int * const,int (* const)[4],int)" (?availableMoves@@YAHQAHQAY03HH@Z) referenced in function "void __cdecl solveGame(int * const,int (* const)[4])" (?solveGame@@YAXQAHQAY03H@Z) I've never seen this error before. Here are the two functions I believe it's referring to though. int availableMoves(int a[15], int b[36][3],int openSpace){ int count=0; for(int i=0; i<36;i++){ if(i < 36 && b[i][2

Unresolved external symbol in libgcrypt.lib

ぃ、小莉子 提交于 2019-12-07 12:22:27
问题 What I have to do if i found Unresolved external symbol in .lib(library) file. If I found unresolved external symbol in .c or .cpp I can fix it. But when i found Unresolved external symbol in .lib(library) file how can i solve this? In my case i found a linker error like this: Error 1 error LNK2019: unresolved external symbol ___mingw_vfprintf referenced in function _fprintf D:\VidPlaya_offline\TryingToIncludeUpdateFacility\Vidplaya_Plugin_EmbeddedUpdate\vlcwin\libvlccore\libgcrypt.lib

VC++, linking error with wxWidgets, x64

冷暖自知 提交于 2019-12-06 12:54:10
问题 I'm compiling a VC++ 10 application on Windows 7 x64 with wxWidgets 2.8. And this is the errors I have. The code is generated using wxFormBuilder. Update: I try to run it on 32-bit machine as well, still having the same problem. I have no idea which wxwidgets libraries I'm missing out, or what settings did I do it wrong. Tried both in Debug and Release mode. I'd really appreciate if someone could point to some hints! Been looking at this problem for a while. 1>WelcomeDlg.obj : error LNK2001:

LNK2019 error, unresolved external symbol

泪湿孤枕 提交于 2019-12-06 06:32:06
The error verbatim reads 1>yes.obj : error LNK2019: unresolved external symbol "int __cdecl availableMoves(int * const,int (* const)[4],int)" (?availableMoves@@YAHQAHQAY03HH@Z) referenced in function "void __cdecl solveGame(int * const,int (* const)[4])" (?solveGame@@YAXQAHQAY03H@Z) I've never seen this error before. Here are the two functions I believe it's referring to though. int availableMoves(int a[15], int b[36][3],int openSpace){ int count=0; for(int i=0; i<36;i++){ if(i < 36 && b[i][2] == openSpace && isPeg(b[i][0],a) && isPeg(b[i][1],a) ){ count++; } } return count; } and void

Python - Py_Initialize unresolved during compilation

前提是你 提交于 2019-12-06 02:32:53
问题 I have statically compiled Python2.7 without any error. To test my build, I use the following snippet: #include "Python.h" int main() { Py_Initialize(); } And I am compiling it like this: $ gcc -static -I/path/to/python/header -L/path/to/my/staticpythonlib \ -lpython2.7 -ldl -l_all_other_needed_lib /tmp/my_previous_snippet.c -o myouput However, an error occured. gcc claims the famous undefined reference . test.c:(.text+0x1): Undefined reference to 'Py_Initialize' Curiously I used gcc with the

Google Test: error LNK2019: unresolved external symbol with Visual Studio 2013

天大地大妈咪最大 提交于 2019-12-05 22:06:52
I'm trying to get my first ever unit test with Google Test framework + Visual Studio 2013.However I'm hitting the below error and can't understand why. 1>------ Build started: Project: FirstGoogleTest, Configuration: Debug Win32 ------ 2>------ Build started: Project: googleTest, Configuration: Debug Win32 ------ 1> MyMultiplier.cpp 2> gtest_main.cc 1> main.cpp 1> Generating Code... 2> gtest-all.cc 1> FirstGoogleTest.vcxproj -> D:_Vault\Workspaces\UnitTestLearning\FirstGoogleTest\Debug\FirstGoogleTest.exe 2> Generating Code... 2> googleTest.vcxproj -> D:_Vault\Workspaces\UnitTestLearning

Error LNK2019: unresolved external symbol “toString(int)”

爱⌒轻易说出口 提交于 2019-12-05 08:40:44
Environment: Windows XP. Visual Studios 2010. Language - C++. I have run into the following link error & have run out of ideas how to fix this problem. I have a project (CnD Device) which links to 2 projects (Messages & Carbon) controlled by my group. I have tried to search for project properties between the 3 projects enter tcp_driver.obj : error LNK2019: unresolved external symbol "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl toString(int)" (?toString@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@H@Z) referenced in