Compiling a working 32bit .dll for 64bit, errors - windows

I have with a lot of help put together a 32bit plugin (.dll) for the 32bit Teamspeak program which works great.
People are now asking me to compile this for the 64bit Teamspeak client.
But...........
When I do I get the following errors.
1>------ Build started: Project: GetFSComFreqs, Configuration: Release x64 ------
Creating library C:\Users\Roo\Desktop\pluginsdk\src\x64\Release\GetFSComFreqs.lib and object C:\Users\Roo\Desktop\pluginsdk\src\x64\Release\GetFSComFreqs.exp
GetFSComFreqs.obj : error LNK2019: unresolved external symbol SimConnect_Close referenced in function "void __cdecl DLLStop(void)" (?DLLStop##YAXXZ)
GetFSComFreqs.obj : error LNK2019: unresolved external symbol SimConnect_Open referenced in function "void __cdecl DLLStart(void)" (?DLLStart##YAXXZ)
SimConnectProcs.obj : error LNK2001: unresolved external symbol SimConnect_Open
GetFSComFreqs.obj : error LNK2019: unresolved external symbol SimConnect_CallDispatch referenced in function "void __cdecl DLLStart(void)" (?DLLStart##YAXXZ)
SimConnectProcs.obj : error LNK2019: unresolved external symbol SimConnect_AddToDataDefinition referenced in function "void __cdecl OnRecvOpen(struct SIMCONNECT_RECV_OPEN *,unsigned long,void *)" (?OnRecvOpen##YAXPEAUSIMCONNECT_RECV_OPEN##KPEAX#Z)
SimConnectProcs.obj : error LNK2019: unresolved external symbol SimConnect_RequestDataOnSimObject referenced in function "void __cdecl OnRecvOpen(struct SIMCONNECT_RECV_OPEN *,unsigned long,void *)" (?OnRecvOpen##YAXPEAUSIMCONNECT_RECV_OPEN##KPEAX#Z)
SimConnectProcs.obj : error LNK2019: unresolved external symbol SimConnect_GetNextDispatch referenced in function "unsigned int __cdecl MessageRoutine(void *)" (?MessageRoutine##YAIPEAX#Z)
C:\Users\Roo\Desktop\pluginsdk\src\x64\Release\GetFSComFreqs.dll : fatal error LNK1120: 6 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
A part of the Code...
#include "stdafx.h"
#define FSAPI __stdcall
HANDLE hSimConnect = 0;
HANDLE hMsgThread = 0;
HINSTANCE ThisModule = 0;
HRESULT hr = 0;
char ThisModuleName[MAX_PATH];
void FSAPI StartSimConnect()
{
if (NULL == hSimConnect)
{
GetModuleFileName(ThisModule, ThisModuleName, MAX_PATH);
hr = SimConnect_Open(&hSimConnect, ThisModuleName, NULL, NULL, NULL, 0);
hr = SimConnect_CallDispatch(hSimConnect, SimConnectDispatch, NULL);
if (FAILED(hr)) hSimConnect = 0;
else hMsgThread = (HANDLE)_beginthreadex(NULL, NULL, MessageRoutine, NULL, NULL, NULL);
}
}
void FSAPI StopSimConnect()
{
if (NULL != hSimConnect)
{
hr = SimConnect_Close(hSimConnect);
hSimConnect = 0;
}
}
int main() {}
void FSAPI DLLStart(void)
{
if (NULL == hSimConnect)
{
GetModuleFileName(ThisModule, ThisModuleName, MAX_PATH);
hr = SimConnect_Open(&hSimConnect, ThisModuleName, NULL, NULL, NULL, 0);
hr = SimConnect_CallDispatch(hSimConnect, SimConnectDispatch, NULL);
if (FAILED(hr)) hSimConnect = 0;
else hMsgThread = (HANDLE)_beginthreadex(NULL, NULL, MessageRoutine, NULL, NULL, NULL);
}
}
void FSAPI DLLStop(void)
{
if (NULL != hSimConnect)
{
hr = SimConnect_Close(hSimConnect);
hSimConnect = 0;
}
}

You are getting unresolved external symbols errors.
If all those SimConnect_* functions are coming from an external source, you need to link you program with the appropriate import library.
If you just changed the build configuration from win32 to x64, it might be the case that these import libraries were not changed into your x64 configuration.

Related

Failing SamConnect, SamOpenDomain, SamrQueryInformationDomain failing to link

I have windows c++ application for fetching password complexity
somehow it is failing with linker error
Not able find documented header by msdn, even I copy the function declaration it is failing with linker error, may be possibly function signature mismatch of libs function. I do not find function signature from lib in Windows kits.
1>obj : error LNK2001: unresolved external symbol "long __cdecl SamQueryInformationDomain(void *,enum _DOMAIN_INFORMATION_CLASS,void * *)" (?SamQueryInformationDomain##YAJPEAXW4_DOMAIN_INFORMATION_CLASS##PEAPEAX#Z)
error LNK2001: unresolved external symbol "long __cdecl SamOpenDomain(void *,unsigned long,void *,void * *)" (?SamOpenDomain##YAJPEAXK0PEAPEAX#Z)
error LNK2001: unresolved external symbol "long __cdecl SamConnect(struct _LSA_UNICODE_STRING *,void * *,unsigned long,unsigned char)" (?SamConnect##YAJPEAU_LSA_UNICODE_STRING##PEAPEAXKE#Z)
error LNK2001: unresolved external symbol "long __cdecl SamCloseHandle(void *)" (?SamCloseHandle##YAJPEAX#Z)
but these functions are present in lib file, checked with dumpbin
#pragma comment(lib, "C:\\Program Files (x86)\\Windows Kits\\10\\Lib\\10.0.19041.0\\um\\x64\\samlib.lib")
NTSTATUS SamQueryInformationDomain(SAMPR_HANDLE domain, DOMAIN_INFORMATION_CLASS val, PSAMPR_DOMAIN_INFO_BUFFER* Buffer);
extern NTSTATUS WINAPI SamConnect(IN PUNICODE_STRING ServerName, OUT SAMPR_HANDLE* ServerHandle, IN ACCESS_MASK DesiredAccess, IN BOOLEAN Trusted);
extern NTSTATUS WINAPI SamOpenDomain(IN SAMPR_HANDLE SamHandle, IN ACCESS_MASK DesiredAccess, IN PSID DomainId, OUT SAMPR_HANDLE* DomainHandle);
extern NTSTATUS WINAPI SamCloseHandle(IN SAMPR_HANDLE SamHandle);
void ReadPasswordComplexInfo()
{
NTSTATUS status, enumDomainStatus, enumUserStatus;
UNICODE_STRING serverName;
ACCESS_MASK mask = 0;
mask = SAM_SERVER_CONNECT | SAM_SERVER_ENUMERATE_DOMAINS | SAM_SERVER_LOOKUP_DOMAIN;
SAMPR_HANDLE hServerHandle, hBuiltinHandle = NULL, hDomainHandle, hUserHandle;
DWORD domainEnumerationContext = 0, domainCountRetourned, userEnumerationContext, userCountRetourned, groupsCountRetourned, i, j, k, aliasCountRetourned, *alias;
PSAMPR_RID_ENUMERATION pEnumDomainBuffer, pEnumUsersBuffer;
PSID domainSid, userSid;
PGROUP_MEMBERSHIP pGroupMemberShip;
//PSAMPR_DOMAIN_INFO_BUFFER *buff = NULL;
PSAMPR_DOMAIN_INFO_BUFFER buff;
SID builtin = {SID_REVISION, 1, SECURITY_NT_AUTHORITY, {SECURITY_BUILTIN_DOMAIN_RID}};
RtlInitUnicodeString(&serverName, L"");
//status = SamConnect(&serverName, &hServerHandle, SAM_SERVER_CONNECT | SAM_SERVER_ENUMERATE_DOMAINS | SAM_SERVER_LOOKUP_DOMAIN, FALSE);
status = SamConnect(&serverName, &hServerHandle, SAM_SERVER_CONNECT | SAM_SERVER_ENUMERATE_DOMAINS | SAM_SERVER_LOOKUP_DOMAIN, FALSE);
if (0 != status)
{
printf("SamConnect error (?) %08x\n", status);
return;
}
//status = SamOpenDomain(hServerHandle, DOMAIN_LIST_ACCOUNTS | DOMAIN_LOOKUP, &builtin, &hBuiltinHandle);
status = SamOpenDomain(hServerHandle, DOMAIN_LIST_ACCOUNTS | DOMAIN_LOOKUP, domainSid, &hDomainHandle);
if (0 != status)
{
printf("SamOpenDomain Builtin (?) %08x\n", status);
return;
}
//status = SamQueryInformationDomain(hBuiltinHandle, DomainPasswordInformation, (PVOID*)&buff);
status = SamrQueryInformationDomain(hBuiltinHandle, DomainPasswordInformation, (PVOID*)&buff);
if (0 != status)
{
printf("SamQueryInformation failed with %08x\n", status);
}ULONG properties = buff->Password.PasswordProperties; printf("SamQueryInformation success with password properties value : %ld\n", properties);
if(hBuiltinHandle)
{
SamCloseHandle(hBuiltinHandle);
SamCloseHandle(hServerHandle);
}
}
Also tried with SamrOpenDomain API same issues.

superbible lnk2019 glew

I'm working with Superbible 5th edition and I've already come across a problem with the first program. I've been able to fix a good amount of problems by adding in Windows.h and taking out the line #define FREEGLUT_STATIC, but I can't get past the linker errors I have right now.
#include <Windows.h>
#include <GLTools.h>
#include <GLShaderManager.h>
#include <gl\glew.h>
#include <gl\glut.h>
GLBatch triangleBatch;
GLShaderManager shaderManager;
void ChangeSize(int w, int h)
{
glViewport(0, 0, w, h);
}
void SetupRC()
{
glClearColor(0.0f, 0.0f, 1.0f, 1.0f);
shaderManager.InitializeStockShaders();
GLfloat vVerts[] =
{
-0.5f, 0.0f, 0.0f,
0.5f, 0.0f, 0.0f,
0.0f, 0.5f, 0.0f
};
triangleBatch.Begin(GL_TRIANGLES, 3);
triangleBatch.CopyVertexData3f(vVerts);
triangleBatch.End();
}
void RenderScene(void)
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
GLfloat vRed[] = { 1.0f, 0.0f, 0.0f, 1.0f };
shaderManager.UseStockShader(GLT_SHADER_IDENTITY, vRed);
triangleBatch.Draw();
glutSwapBuffers();
}
int main(int argc, char* argv[])
{
gltSetWorkingDirectory(argv[0]);
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGBA | GLUT_DEPTH | GLUT_STENCIL);
glutInitWindowSize(800, 600);
glutCreateWindow("Triangle");
glutReshapeFunc(ChangeSize);
glutDisplayFunc(RenderScene);
GLenum err = glewInit();
if(GLEW_OK != err)
{
fprintf(stderr, "GLEW Error: %s\n", glewGetErrorString(err));
return 1;
}
SetupRC();
glutMainLoop();
return 0;
}
and these are the errors I am getting:
1>triangle test.obj : error LNK2019: unresolved external symbol "public: void __thiscall GLBatch::End(void)" (?End#GLBatch##QAEXXZ) referenced in function "void __cdecl SetupRC(void)" (?SetupRC##YAXXZ)
1>triangle test.obj : error LNK2019: unresolved external symbol "public: void __thiscall GLBatch::Begin(unsigned int,unsigned int,unsigned int)" (?Begin#GLBatch##QAEXIII#Z) referenced in function "void __cdecl SetupRC(void)" (?SetupRC##YAXXZ)
1>triangle test.obj : error LNK2019: unresolved external symbol "public: bool __thiscall GLShaderManager::InitializeStockShaders(void)" (?InitializeStockShaders#GLShaderManager##QAE_NXZ) referenced in function "void __cdecl SetupRC(void)" (?SetupRC##YAXXZ)
1>triangle test.obj : error LNK2019: unresolved external symbol "public: void __thiscall GLBatch::CopyVertexData3f(float (*)[3])" (?CopyVertexData3f#GLBatch##QAEXPAY02M#Z) referenced in function "public: void __thiscall GLBatch::CopyVertexData3f(float *)" (?CopyVertexData3f#GLBatch##QAEXPAM#Z)
1>triangle test.obj : error LNK2019: unresolved external symbol "public: virtual void __thiscall GLBatch::Draw(void)" (?Draw#GLBatch##UAEXXZ) referenced in function "void __cdecl RenderScene(void)" (?RenderScene##YAXXZ)
1>triangle test.obj : error LNK2019: unresolved external symbol "public: int __cdecl GLShaderManager::UseStockShader(enum GLT_STOCK_SHADER,...)" (?UseStockShader#GLShaderManager##QAAHW4GLT_STOCK_SHADER##ZZ) referenced in function "void __cdecl RenderScene(void)" (?RenderScene##YAXXZ)
1>triangle test.obj : error LNK2019: unresolved external symbol _glewGetErrorString referenced in function _main
1>triangle test.obj : error LNK2019: unresolved external symbol _glewInit referenced in function _main
1>triangle test.obj : error LNK2019: unresolved external symbol "void __cdecl gltSetWorkingDirectory(char const *)" (?gltSetWorkingDirectory##YAXPBD#Z) referenced in function _main
1>triangle test.obj : error LNK2019: unresolved external symbol "public: __thiscall GLBatch::GLBatch(void)" (??0GLBatch##QAE#XZ) referenced in function "void __cdecl `dynamic initializer for 'triangleBatch''(void)" (??__EtriangleBatch##YAXXZ)
1>triangle test.obj : error LNK2019: unresolved external symbol "public: __thiscall GLShaderManager::GLShaderManager(void)" (??0GLShaderManager##QAE#XZ) referenced in function "void __cdecl `dynamic initializer for 'shaderManager''(void)" (??__EshaderManager##YAXXZ)
1>triangle test.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall GLBatch::~GLBatch(void)" (??1GLBatch##UAE#XZ) referenced in function "void __cdecl `dynamic atexit destructor for 'triangleBatch''(void)" (??__FtriangleBatch##YAXXZ)
1>triangle test.obj : error LNK2019: unresolved external symbol "public: __thiscall GLShaderManager::~GLShaderManager(void)" (??1GLShaderManager##QAE#XZ) referenced in function "void __cdecl `dynamic atexit destructor for 'shaderManager''(void)" (??__FshaderManager##YAXXZ)
It should be able to compile with just the included files from the website, but it's not.
You'll have to add some libraries to the project that provide the mentioned function bodies. You can do this using the project properties ("Linker", "Input", "Additional Dependencies") or a #pragma line anywhere in your source code:
#pragma comment(lib, "libraryname.lib")
I don't know about the library name; it's most likely explained somewhere in the book, but it might be GLTools.lib or GLShaderManager.lib (or something different; you should have these files somewhere alongside the include files (but in a lib directory).
Edit: You're missing the lib file for glew as well (glew32.lib).

Relinking to a modified DLL in another solution in Visual Studio 2010

I coded a BitPacker object that takes in various types of data and packs them to a buffer using the fewest number of bits required to store their values. I created a separate solution to make this into a DLL for reuse-ability. I was successfully able to link to it from another solution and use it. However I ran into the problem of these two function prototypes in the DLL being ambiguous when trying to pass in a long long for "data" instead of an int:
static __declspec(dllexport) unsigned long long UnpackBits(char *srcBuffer, long long data, unsigned int &offsetBits, const unsigned int numBits);
static __declspec(dllexport) unsigned int UnpackBits(char *srcBuffer, int data, unsigned int &offsetBits, const unsigned int numBits);
static __declspec(dllexport) float UnpackBits(char *srcBuffer, float data, unsigned int &offsetBits);
There is no problem when I'm simply passing an int. Since I can't think of a way to remove the ambiguity to support both data types I decided to modify the DLL source by commenting out the "long long" versions from the header and source files and recompiling them (both for Debug and Release). However after doing that I'm receiving linker errors for pretty much every call to that DLL now. I don't know why since I also changed the instances of where I was using a long long data member to int to make sure there was no reference to the old long long version that I commented out.
1>ChessGame.obj : error LNK2019: unresolved external symbol "public: static unsigned int __cdecl BitPacker::UnpackBits(char *,int,unsigned int &,unsigned int)" (?UnpackBits#BitPacker##SAIPADHAAII#Z) referenced in function "public: class ChessGame * __thiscall ChessGame::LoadGame(char const *)" (?LoadGame#ChessGame##QAEPAV1#PBD#Z)
1>Date.obj : error LNK2001: unresolved external symbol "public: static unsigned int __cdecl BitPacker::UnpackBits(char *,int,unsigned int &,unsigned int)" (?UnpackBits#BitPacker##SAIPADHAAII#Z)
1>Turn.obj : error LNK2001: unresolved external symbol "public: static unsigned int __cdecl BitPacker::UnpackBits(char *,int,unsigned int &,unsigned int)" (?UnpackBits#BitPacker##SAIPADHAAII#Z)
1>ChessGame.obj : error LNK2019: unresolved external symbol "public: static int __cdecl BitPacker::ReadFile(char const *,char *,int)" (?ReadFile#BitPacker##SAHPBDPADH#Z) referenced in function "public: class ChessGame * __thiscall ChessGame::LoadGame(char const *)" (?LoadGame#ChessGame##QAEPAV1#PBD#Z)
1>ChessGame.obj : error LNK2019: unresolved external symbol "public: static int __cdecl BitPacker::FileSize(char const *)" (?FileSize#BitPacker##SAHPBD#Z) referenced in function "public: class ChessGame * __thiscall ChessGame::LoadGame(char const *)" (?LoadGame#ChessGame##QAEPAV1#PBD#Z)
1>ChessGame.obj : error LNK2019: unresolved external symbol "public: static void __cdecl BitPacker::PackBits(char *,int,unsigned int &,unsigned int)" (?PackBits#BitPacker##SAXPADHAAII#Z) referenced in function "public: int __thiscall ChessGame::SaveGame(char const *)" (?SaveGame#ChessGame##QAEHPBD#Z)
1>Date.obj : error LNK2001: unresolved external symbol "public: static void __cdecl BitPacker::PackBits(char *,int,unsigned int &,unsigned int)" (?PackBits#BitPacker##SAXPADHAAII#Z)
1>Turn.obj : error LNK2001: unresolved external symbol "public: static void __cdecl BitPacker::PackBits(char *,int,unsigned int &,unsigned int)" (?PackBits#BitPacker##SAXPADHAAII#Z)
1>ChessGame.obj : error LNK2019: unresolved external symbol "public: static int __cdecl BitPacker::CopyBits(char *,char *,unsigned int &,unsigned int &,unsigned int)" (?CopyBits#BitPacker##SAHPAD0AAI1I#Z) referenced in function "public: int __thiscall ChessGame::SaveGame(char const *)" (?SaveGame#ChessGame##QAEHPBD#Z)
1>Turn.obj : error LNK2001: unresolved external symbol "public: static int __cdecl BitPacker::CopyBits(char *,char *,unsigned int &,unsigned int &,unsigned int)" (?CopyBits#BitPacker##SAHPAD0AAI1I#Z)
1>ChessGameManager.obj : error LNK2019: unresolved external symbol "public: static bool __cdecl BitPacker::FileExists(char const *)" (?FileExists#BitPacker##SA_NPBD#Z) referenced in function "public: void __thiscall ChessGameManager::RenderGameMenuIcons(void)" (?RenderGameMenuIcons#ChessGameManager##QAEXXZ)
1>C:\Users\rvandyke\Documents\Visual Studio 2010\Projects\SuperChessW32_v003\Debug\SuperChessW32_v003.exe : fatal error LNK1120: 6 unresolved externals
I tried cleaning the calling project, manually deleting all the object files and doing a Rebuild All but the errors remain. I'm thinking it is somehow still using an old version of the DLL header file and/or lib but don't know how or why. Is there something I need to do in my calling Solution for it to "re recognize" the new DLL?
PS - And while I'm asking anyone have any advice on the ambiguity problem? I'd like to be able to support both 32 and 64 bit data types but not sure how. I thought about simply getting rid of the int version and only having the long long version but then I worry about the possibility of data becoming truncated when catching the return type back into an int.

OpenCV Build on Visual Studio LINK error

I have followed this tutorial here as mentioned exactly
I now try to run simple OpenCV code on Visual Studio but it I keep getting linker errors.
I am trying this OpenCV tutorial in particular
Here is the error I keep getting :
1>Linking...
1>LINK : warning LNK4067: ambiguous entry point; selected 'mainCRTStartup'
1>OpenCV_Proj.obj : error LNK2019: unresolved external symbol "int __cdecl cv::waitKey(int)" (?waitKey#cv##YAHH#Z) referenced in function _main
1>OpenCV_Proj.obj : error LNK2019: unresolved external symbol "void __cdecl cv::imshow(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class cv::_InputArray const &)" (?imshow#cv##YAXABV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##ABV_InputArray#1##Z) referenced in function _main
1>OpenCV_Proj.obj : error LNK2019: unresolved external symbol "public: __thiscall cv::_InputArray::_InputArray(class cv::Mat const &)" (??0_InputArray#cv##QAE#ABVMat#1##Z) referenced in function _main
1>OpenCV_Proj.obj : error LNK2019: unresolved external symbol "void __cdecl cv::namedWindow(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,int)" (?namedWindow#cv##YAXABV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##H#Z) referenced in function _main
1>OpenCV_Proj.obj : error LNK2019: unresolved external symbol "class cv::Mat __cdecl cv::imread(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,int)" (?imread#cv##YA?AVMat#1#ABV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##H#Z) referenced in function _main
1>OpenCV_Proj.obj : error LNK2019: unresolved external symbol "void __cdecl cv::fastFree(void *)" (?fastFree#cv##YAXPAX#Z) referenced in function "public: __thiscall cv::Mat::~Mat(void)" (??1Mat#cv##QAE#XZ)
1>OpenCV_Proj.obj : error LNK2019: unresolved external symbol "public: void __thiscall cv::Mat::copySize(class cv::Mat const &)" (?copySize#Mat#cv##QAEXABV12##Z) referenced in function "public: class cv::Mat & __thiscall cv::Mat::operator=(class cv::Mat const &)" (??4Mat#cv##QAEAAV01#ABV01##Z)
1>OpenCV_Proj.obj : error LNK2019: unresolved external symbol "public: void __thiscall cv::Mat::deallocate(void)" (?deallocate#Mat#cv##QAEXXZ) referenced in function "public: void __thiscall cv::Mat::release(void)" (?release#Mat#cv##QAEXXZ)
1>C:\Users\Saher\Documents\Visual Studio 2008\Projects\OpenCV_Proj\Debug\OpenCV_Proj.exe : fatal error LNK1120: 8 unresolved externals``
For the following code :
// OpenCV_Proj.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <iostream>
using namespace cv;
using namespace std;
int main( int argc, char** argv )
{
if( argc != 2)
{
cout <<" Usage: display_image ImageToLoadAndDisplay" << endl;
return -1;
}
Mat image;
image = imread(argv[1], CV_LOAD_IMAGE_COLOR); // Read the file
if(! image.data ) // Check for invalid input
{
cout << "Could not open or find the image" << std::endl ;
return -1;
}
namedWindow( "Display window", CV_WINDOW_AUTOSIZE );// Create a window for display.
imshow( "Display window", image ); // Show our image inside it.
waitKey(0); // Wait for a keystroke in the window
return 0;
}
int _tmain(int argc, _TCHAR* argv[])
{
return 0;
}
I have been trying to get OpenCV to work for VS2008 for a while and any help regarding this issue will be apprectiated.
NOTE: In the readme file of the tutorial the following is what I followed:
1) Add build\bin and one of build\{x86|x64}\{vc9\vc10\mingw}\bin to your system path (to use DLLs)
Add build\{x86|x64}\{vc9\vc10\mingw}\lib or
build\{x86|x64}\{vc9\vc10\mingw}\staticlib as library directories to your linker settings,
Add build\include and build\include\opencv as include directories to your compiler settings.
Any help with getting this to work is really appreciated.
Those symbols are defined inside the OpenCV libraries, so you need to configure the project and let the linker know which OpenCV libraries you are using.
At the very least you should add: opencv_core230.lib and opencv_highgui230.lib (for OpenCV 2.3.0)
For more info on how to do this on VS2010, check this tutorial.
Go to properties->Linker->input and
add cv210.lib; cxcore210.lib; highgui210.lib;cvaux210.lib;
Your problem will be solved.
Have a happy coding....
I faced the same issue. After using dumpbin to see the exported symbols of highgui, I found that the linker is trying to link against a symbol that has debug_build_guard at the end.
If you built OPENCV in release mode, You cannot compile your application in DEBUG mode. Try flipping it to RELEASE and it magically works :)

wxWidgets defaultlib 'MSVCRT' conflicts problem

So, I have a small project with a very simple code. All it really does is create a wxFrame the following way:
wxFrame(NULL, -1, title, wxPoint(-1, -1), wxSize(380, 220))
There is no compiling problem to any of my code whatsoever. The problem occures when I do this line:
IMPLEMENT_APP(App);
App is:
class App: public wxApp
So, when I do that and I hit compile, I have the following errors:
1>LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library
1>CApp.obj : warning LNK4248: unresolved typeref token (01000019) for 'wxVideoMode'; image may not run
1>CLoadingFrame.obj : warning LNK4248: unresolved typeref token (01000019) for 'wxToolTip'; image may not run
1>CLoadingFrame.obj : warning LNK4248: unresolved typeref token (0100001A) for 'wxDropTarget'; image may not run
1>CLoadingFrame.obj : error LNK2020: unresolved token (0A000DB2) "int g_isPainting" (?g_isPainting##3HA)
1>CApp.obj : error LNK2020: unresolved token (0A000DBE) "int g_isPainting" (?g_isPainting##3HA)
1>CLoadingFrame.obj : error LNK2028: unresolved token (0A000DB4) "void __cdecl wxOnAssert(char const *,int,char const *,char const *,char const *)" (?wxOnAssert##$$FYAXPBDH000#Z) referenced in function "protected: void __thiscall wxShadowObjectFields_wxImplementation_HashTable::ResizeTable(unsigned int)" (?ResizeTable#wxShadowObjectFields_wxImplementation_HashTable##$$FIAEXI#Z)
1>CApp.obj : error LNK2028: unresolved token (0A000DC0) "void __cdecl wxOnAssert(char const *,int,char const *,char const *,char const *)" (?wxOnAssert##$$FYAXPBDH000#Z) referenced in function "protected: void const * __thiscall wxVectorBase::GetItem(unsigned int)const " (?GetItem#wxVectorBase##$$FIBEPBXI#Z)
1>CApp.obj : error LNK2019: unresolved external symbol "void __cdecl wxOnAssert(char const *,int,char const *,char const *,char const *)" (?wxOnAssert##$$FYAXPBDH000#Z) referenced in function "protected: void const * __thiscall wxVectorBase::GetItem(unsigned int)const " (?GetItem#wxVectorBase##$$FIBEPBXI#Z)
1>CLoadingFrame.obj : error LNK2001: unresolved external symbol "void __cdecl wxOnAssert(char const *,int,char const *,char const *,char const *)" (?wxOnAssert##$$FYAXPBDH000#Z)
1>CApp.obj : error LNK2001: unresolved external symbol "int g_isPainting" (?g_isPainting##3HA)
1>CLoadingFrame.obj : error LNK2001: unresolved external symbol "int g_isPainting" (?g_isPainting##3HA)
1>CApp.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall wxAppConsole::OnAssertFailure(char const *,int,char const *,char const *,char const *)" (?OnAssertFailure#wxAppConsole##UAEXPBDH000#Z)
1>CApp.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall wxAppConsole::OnAssert(char const *,int,char const *,char const *)" (?OnAssert#wxAppConsole##UAEXPBDH00#Z)
1>D:\WickedLauncher\WickedLauncherv2\Debug\WickedLauncherv2.exe : fatal error LNK1120: 8 unresolved externals
I would appreciate any help!
Regards.
where is defined g_isPainting ?
Did you add the right library to the linker for wxAppConsole ?

Resources