DXUT Configuration - c++

This is actually 2 questions in one, but both relate to DXUT.
How do you configure a project to use DXUT in Visual Studio 2010? Do I need to add all of the header and source files to any project I want to use DXUT with? Can I just add ($DXSDK_DIR)\Samples\C++\DXUT\Core to my Include directories?
Is there a D3D10 equivalent to:
DXUTSetCallbackD3D9DeviceReset( OnResetDevice );
DXUTSetCallbackD3D9DeviceLost( OnLostDevice );
If not, why?
#include <Windows.h>
#include <DXUT.h>
#include <DXUTmisc.h>
//--------------------------------------------------------------------------------------
// Reject any D3D10 devices that aren't acceptable by returning false
//--------------------------------------------------------------------------------------
bool CALLBACK IsD3D10DeviceAcceptable( UINT Adapter, UINT Output, D3D10_DRIVER_TYPE DeviceType,
DXGI_FORMAT BufferFormat, bool bWindowed, void* pUserContext )
{
return true;
}
//--------------------------------------------------------------------------------------
// Create any D3D10 resources that aren't dependant on the back buffer
//--------------------------------------------------------------------------------------
HRESULT CALLBACK OnD3D10CreateDevice( ID3D10Device* pd3dDevice, const DXGI_SURFACE_DESC* pBufferSurfaceDesc,
void* pUserContext )
{
return S_OK;
}
//--------------------------------------------------------------------------------------
// Create any D3D10 resources that depend on the back buffer
// Create and set the depth stencil texture if needed
//--------------------------------------------------------------------------------------
HRESULT CALLBACK OnD3D10ResizedSwapChain( ID3D10Device* pd3dDevice, IDXGISwapChain* pSwapChain,
const DXGI_SURFACE_DESC* pBufferSurfaceDesc, void* pUserContext )
{
return S_OK;
}
//--------------------------------------------------------------------------------------
// Render the scene using the D3D10 device
//--------------------------------------------------------------------------------------
void CALLBACK OnD3D10FrameRender( ID3D10Device* pd3dDevice, double fTime, float fElapsedTime, void* pUserContext )
{
//
// Clear the back buffer
//
}
//--------------------------------------------------------------------------------------
// Called right before creating a D3D9 or D3D10 device, allowing the app to modify the device settings as needed
//--------------------------------------------------------------------------------------
bool CALLBACK ModifyDeviceSettings( DXUTDeviceSettings* pDeviceSettings, void* pUserContext )
{
return true;
}
//--------------------------------------------------------------------------------------
// Handle updates to the scene. This is called regardless of which D3D API is used
//--------------------------------------------------------------------------------------
void CALLBACK OnFrameMove( double fTime, float fElapsedTime, void* pUserContext )
{
}
//--------------------------------------------------------------------------------------
// Handle messages to the application
//--------------------------------------------------------------------------------------
LRESULT CALLBACK MsgProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, bool* pbNoFurtherProcessing,
void* pUserContext )
{
return 0;
}
//--------------------------------------------------------------------------------------
// Handle key presses
//--------------------------------------------------------------------------------------
void CALLBACK OnKeyboard( UINT nChar, bool bKeyDown, bool bAltDown, void* pUserContext )
{
if( bKeyDown )
{
switch( nChar )
{
case VK_F1: // Change as needed
break;
}
}
}
int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,
PSTR szCmdLine, int iCmdShow)
{
DXUTSetCallbackD3D10DeviceCreated(OnD3D10CreateDevice);
DXUTSetCallbackDeviceChanging(ModifyDeviceSettings );
DXUTSetCallbackD3D10SwapChainResized(OnD3D10ResizedSwapChain);
DXUTSetCallbackD3D10FrameRender(OnD3D10FrameRender);
DXUTSetCallbackFrameMove(OnFrameMove);
DXUTSetCallbackMsgProc(MsgProc);
DXUTSetCallbackKeyboard(OnKeyboard );
return 0;
}
And when I try to build:
1>ClCompile:
1> Main.cpp
1>Main.obj : error LNK2001: unresolved external symbol "void __stdcall DXUTSetCallbackFrameMove(void (__stdcall*)(double,float,void *),void *)" (?DXUTSetCallbackFrameMove##YGXP6GXNMPAX#Z0#Z)
1>Main.obj : error LNK2001: unresolved external symbol "void __stdcall DXUTSetCallbackMsgProc(long (__stdcall*)(struct HWND__ *,unsigned int,unsigned int,long,bool *,void *),void *)" (?DXUTSetCallbackMsgProc##YGXP6GJPAUHWND__##IIJPA_NPAX#Z2#Z)
1>Main.obj : error LNK2001: unresolved external symbol "void __stdcall DXUTSetCallbackD3D10DeviceCreated(long (__stdcall*)(struct ID3D10Device *,struct DXGI_SURFACE_DESC const *,void *),void *)" (?DXUTSetCallbackD3D10DeviceCreated##YGXP6GJPAUID3D10Device##PBUDXGI_SURFACE_DESC##PAX#Z2#Z)
1>Main.obj : error LNK2001: unresolved external symbol "void __stdcall DXUTSetCallbackD3D10SwapChainResized(long (__stdcall*)(struct ID3D10Device *,struct IDXGISwapChain *,struct DXGI_SURFACE_DESC const *,void *),void *)" (?DXUTSetCallbackD3D10SwapChainResized##YGXP6GJPAUID3D10Device##PAUIDXGISwapChain##PBUDXGI_SURFACE_DESC##PAX#Z3#Z)
1>Main.obj : error LNK2001: unresolved external symbol "void __stdcall DXUTSetCallbackDeviceChanging(bool (__stdcall*)(struct DXUTDeviceSettings *,void *),void *)" (?DXUTSetCallbackDeviceChanging##YGXP6G_NPAUDXUTDeviceSettings##PAX#Z1#Z)
1>Main.obj : error LNK2001: unresolved external symbol "void __stdcall DXUTSetCallbackKeyboard(void (__stdcall*)(unsigned int,bool,bool,void *),void *)" (?DXUTSetCallbackKeyboard##YGXP6GXI_N0PAX#Z1#Z)
1>Main.obj : error LNK2001: unresolved external symbol "void __stdcall DXUTSetCallbackD3D10FrameRender(void (__stdcall*)(struct ID3D10Device *,double,float,void *),void *)" (?DXUTSetCallbackD3D10FrameRender##YGXP6GXPAUID3D10Device##NMPAX#Z1#Z)
And here are my VS settings:
Executable Directories:
$(DXSDK_DIR)Utilities\bin\x86
Include Directories:
C:\GCC\Source\DXUT\Optional
C:\GCC\Source\DXUT\Core
$(DXSDK_DIR)Include
Library Directories:
$(DXSDK_DIR)Lib\x86
Linker->Input->Additional Dependencies:
d3dx10.lib
d3dx9.lib
dxerr.lib
dxguid.lib
winmm.lib
comctl32.lib
When I include the DXUT .cpp files in my project and try to build, I still get linker errors.
1>DXUTmisc.obj : error LNK2001: unresolved external symbol _DXTraceW#20
1>DXUTcamera.obj : error LNK2001: unresolved external symbol _D3DXMatrixLookAtLH#16
1>DXUTcamera.obj : error LNK2001: unresolved external symbol _D3DXVec3TransformCoord#12
1>DXUTcamera.obj : error LNK2001: unresolved external symbol _D3DX10CreateEffectFromMemory#56
1>DXUTcamera.obj : error LNK2001: unresolved external symbol _D3DXMatrixRotationYawPitchRoll#16
1>DXUTcamera.obj : error LNK2001: unresolved external symbol _D3DXMatrixTranslation#16
1>DXUTcamera.obj : error LNK2001: unresolved external symbol _D3DXMatrixRotationQuaternion#8
1>DXUTcamera.obj : error LNK2001: unresolved external symbol _D3DXVec3Normalize#8
1>DXUTcamera.obj : error LNK2001: unresolved external symbol _D3DXMatrixInverse#12
1>DXUTcamera.obj : error LNK2001: unresolved external symbol _D3DXCreateEffect#36
1>DXUTcamera.obj : error LNK2001: unresolved external symbol _D3DXMatrixRotationX#8
1>DXUTcamera.obj : error LNK2001: unresolved external symbol _D3DXQuaternionMultiply#12
1>DXUTcamera.obj : error LNK2001: unresolved external symbol _D3DXMatrixScaling#16
1>DXUTcamera.obj : error LNK2001: unresolved external symbol _D3DXMatrixMultiply#12
1>DXUTcamera.obj : error LNK2001: unresolved external symbol _D3DXMatrixPerspectiveFovLH#20
1>DXUTcamera.obj : error LNK2001: unresolved external symbol _D3DXQuaternionRotationMatrix#8
1>DXUTcamera.obj : error LNK2001: unresolved external symbol _D3DXVec3TransformNormal#12
1>DXUTgui.obj : error LNK2001: unresolved external symbol _D3DX10GetImageInfoFromFileW#16
1>DXUTgui.obj : error LNK2001: unresolved external symbol _D3DXCreateFontW#48
1>DXUTgui.obj : error LNK2001: unresolved external symbol _D3DX10CreateSprite#12
1>DXUTgui.obj : error LNK2001: unresolved external symbol _D3DX10GetImageInfoFromResourceW#20
1>DXUTgui.obj : error LNK2001: unresolved external symbol _D3DXMatrixOrthoOffCenterLH#28
1>DXUTgui.obj : error LNK2001: unresolved external symbol _D3DXCreateTextureFromFileExW#56
1>DXUTgui.obj : error LNK2001: unresolved external symbol _D3DXCreateSprite#8
1>DXUTgui.obj : error LNK2001: unresolved external symbol _D3DX10CreateTextureFromResourceW#28
1>DXUTgui.obj : error LNK2001: unresolved external symbol _D3DX10CreateFontW#48
1>DXUTgui.obj : error LNK2001: unresolved external symbol _D3DXCreateTextureFromResourceExW#60
1>DXUTgui.obj : error LNK2001: unresolved external symbol _D3DX10CreateTextureFromFileW#24
1>DXUTres.obj : error LNK2001: unresolved external symbol _D3DXCreateTextureFromFileInMemoryEx#60
1>DXUTres.obj : error LNK2001: unresolved external symbol _D3DX10CreateTextureFromMemory#28
1>DXUTres.obj : error LNK2001: unresolved external symbol _D3DXLoadMeshFromXInMemory#36
1>DXUTres.obj : error LNK2001: unresolved external symbol _D3DX10GetImageInfoFromMemory#20
1>DXUTShapes.obj : error LNK2001: unresolved external symbol _D3DX10CreateMesh#32
1>ImeUi.obj : error LNK2001: unresolved external symbol _ImmGetCandidateListA#16
1>ImeUi.obj : error LNK2001: unresolved external symbol _ImmGetIMEFileNameA#12
1>ImeUi.obj : error LNK2001: unresolved external symbol _ImmGetContext#4
1>ImeUi.obj : error LNK2001: unresolved external symbol _ImmIsIME#4
1>ImeUi.obj : error LNK2001: unresolved external symbol _VerQueryValueA#16
1>ImeUi.obj : error LNK2001: unresolved external symbol _ImmReleaseContext#8
1>ImeUi.obj : error LNK2001: unresolved external symbol _ImmGetCompositionStringA#16
1>ImeUi.obj : error LNK2001: unresolved external symbol _GetFileVersionInfoSizeA#8
1>ImeUi.obj : error LNK2001: unresolved external symbol _ImmGetCompositionStringW#16
1>ImeUi.obj : error LNK2001: unresolved external symbol _ImmSetConversionStatus#12
1>ImeUi.obj : error LNK2001: unresolved external symbol _ImmSetCompositionStringW#24
1>ImeUi.obj : error LNK2001: unresolved external symbol _ImmSetOpenStatus#8
1>ImeUi.obj : error LNK2001: unresolved external symbol _ImmGetVirtualKey#4
1>ImeUi.obj : error LNK2001: unresolved external symbol _ImmSimulateHotKey#8
1>ImeUi.obj : error LNK2001: unresolved external symbol _GetFileVersionInfoA#16
1>ImeUi.obj : error LNK2001: unresolved external symbol _ImmGetCandidateListW#16
1>ImeUi.obj : error LNK2001: unresolved external symbol _ImmAssociateContext#8
1>ImeUi.obj : error LNK2001: unresolved external symbol _ImmGetDefaultIMEWnd#4
1>ImeUi.obj : error LNK2001: unresolved external symbol _ImmGetConversionStatus#12
1>ImeUi.obj : error LNK2001: unresolved external symbol _ImmNotifyIME#16
1>ImeUi.obj : error LNK2001: unresolved external symbol _ImmGetOpenStatus#4
1>SDKmesh.obj : error LNK2001: unresolved external symbol _D3DXGetDeclLength#4
1>SDKmesh.obj : error LNK2001: unresolved external symbol _D3DXComputeTangentFrameEx#64
1>SDKmesh.obj : error LNK2001: unresolved external symbol _D3DXLoadMeshFromXof#32
1>SDKmesh.obj : error LNK2001: unresolved external symbol _D3DXCreateVolumeTextureFromFileW#12
1>SDKmesh.obj : error LNK2001: unresolved external symbol _D3DXCreateCubeTextureFromFileW#12
1>SDKmesh.obj : error LNK2001: unresolved external symbol _D3DXGetImageInfoFromFileW#8
1>SDKmesh.obj : error LNK2001: unresolved external symbol _D3DXQuaternionNormalize#8
1>SDKmesh.obj : error LNK2001: unresolved external symbol _D3DXCreateTextureFromFileW#12
1>SDKmesh.obj : error LNK2001: unresolved external symbol _D3DXLoadMeshFromXW#32
1>SDKmesh.obj : error LNK2001: unresolved external symbol _D3DXQuaternionInverse#8
1>SDKmesh.obj : error LNK2001: unresolved external symbol _D3DXComputeNormals#8
1>SDKmisc.obj : error LNK2001: unresolved external symbol _D3DXCreateLine#8
1>SDKmisc.obj : error LNK2001: unresolved external symbol _D3DXCreateCubeTextureFromFileExW#52
1>SDKmisc.obj : error LNK2001: unresolved external symbol _D3DXSaveSurfaceToFileW#20
1>SDKmisc.obj : error LNK2001: unresolved external symbol _D3DXCreateFontIndirectW#12
1>SDKmisc.obj : error LNK2001: unresolved external symbol _D3DXCreateEffectFromResourceW#36
1>SDKmisc.obj : error LNK2001: unresolved external symbol _D3DXCreateEffectFromFileW#32
1>SDKmisc.obj : error LNK2001: unresolved external symbol _D3DXCreateVolumeTextureFromResourceExW#64
1>SDKmisc.obj : error LNK2001: unresolved external symbol _D3DXCreateVolumeTextureFromFileExW#60
1>SDKmisc.obj : error LNK2001: unresolved external symbol _D3DXCreateCubeTextureFromResourceExW#56
1>SDKsound.obj : error LNK2001: unresolved external symbol _DirectSoundCreate8#12
1>C:\GCC\Bin\GCC.exe : fatal error LNK1120: 75 unresolved externals

Add ($DXSDK_DIR)\Include to your MSVS environment settings. Don't forget to add lib folder also.
There is no LostDevice in DX10 any more. DX manages it itself.

Related

Still linker errors in VisualStudio for grpc despite AutoLink (vcpkg) enabled

I ran as suggested in https://stackoverflow.com/a/67875527/433718
vcpkg install grpc:x64-windows
vcpkg install protobuf protobuf:x64-windows
vcpkg install protobuf[zlib] protobuf[zlib]:x64-windows
vcpkg integrate install
Hence, those packages are installed now on my computer:
vcpkg list
abseil:x64-windows 2021-03-24#1 an open-source collection designed to augment th...
c-ares:x64-windows 1.17.1#2 A C library for asynchronous DNS requests
grpc:x64-windows 1.37.0#3 An RPC library and framework
grpc[codegen]:x64-windows Build code generator machinery
openssl:x64-windows 1.1.1k#8 OpenSSL is an open source project that provides ...
protobuf:x64-windows 3.15.8#4 Protocol Buffers - Google's data interchange format
protobuf:x86-windows 3.15.8#4 Protocol Buffers - Google's data interchange format
protobuf[zlib]:x64-windows ZLib based features like Gzip streams
protobuf[zlib]:x86-windows ZLib based features like Gzip streams
re2:x64-windows 2020-10-01 RE2 is a fast, safe, thread-friendly alternative...
upb:x64-windows 2020-12-19#1 μpb (often written 'upb') is a small protobuf i...
zlib:x64-windows 1.2.11#11 A compression library
zlib:x86-windows 1.2.11#11 A compression library
Here's my code:
#include <grpcpp/grpcpp.h>
using grpc::ServerBuilder;
int main(int argc, char** argv) {
ServerBuilder builder;
return 0;
}
I haven't configured any paths (e.g. Additional Dependencies) in the properties as I am using vcpkg (I suppose that's the point of using vcpkg). Here's the config page of vcpkg:
My project doesn't build in Visul Studio 2019 due to 27 unresolved externals...
1>grpc.lib(iomgr_windows.cc.obj) : error LNK2019: unresolved external symbol __imp_WSAStartup referenced in function "void __cdecl winsock_init(void)" (?winsock_init##YAXXZ)
1>grpc.lib(iomgr_windows.cc.obj) : error LNK2019: unresolved external symbol __imp_WSACleanup referenced in function "void __cdecl winsock_shutdown(void)" (?winsock_shutdown##YAXXZ)
1>grpc.lib(socket_windows.cc.obj) : error LNK2019: unresolved external symbol __imp_bind referenced in function "void __cdecl probe_ipv6_once(void)" (?probe_ipv6_once##YAXXZ)
1>grpc.lib(tcp_server_windows.cc.obj) : error LNK2001: unresolved external symbol __imp_bind
1>grpc.lib(tcp_client_windows.cc.obj) : error LNK2001: unresolved external symbol __imp_bind
1>grpc.lib(grpc_ares_ev_driver_windows.cc.obj) : error LNK2001: unresolved external symbol __imp_bind
1>grpc.lib(socket_windows.cc.obj) : error LNK2019: unresolved external symbol __imp_closesocket referenced in function "void __cdecl grpc_winsocket_shutdown(struct grpc_winsocket *)" (?grpc_winsocket_shutdown##YAXPEAUgrpc_winsocket###Z)
1>grpc.lib(tcp_server_windows.cc.obj) : error LNK2001: unresolved external symbol __imp_closesocket
1>grpc.lib(tcp_client_windows.cc.obj) : error LNK2001: unresolved external symbol __imp_closesocket
1>address_sorting.lib(address_sorting_windows.c.obj) : error LNK2001: unresolved external symbol __imp_closesocket
1>grpc.lib(socket_windows.cc.obj) : error LNK2019: unresolved external symbol __imp_socket referenced in function "void __cdecl probe_ipv6_once(void)" (?probe_ipv6_once##YAXXZ)
1>address_sorting.lib(address_sorting_windows.c.obj) : error LNK2001: unresolved external symbol __imp_socket
1>grpc.lib(resolve_address_windows.cc.obj) : error LNK2001: unresolved external symbol __imp_WSAGetLastError
1>grpc.lib(tcp_windows.cc.obj) : error LNK2001: unresolved external symbol __imp_WSAGetLastError
1>grpc.lib(grpc_ares_ev_driver_windows.cc.obj) : error LNK2001: unresolved external symbol __imp_WSAGetLastError
1>grpc.lib(socket_windows.cc.obj) : error LNK2001: unresolved external symbol __imp_WSAGetLastError
1>grpc.lib(iocp_windows.cc.obj) : error LNK2001: unresolved external symbol __imp_WSAGetLastError
1>grpc.lib(tcp_server_windows.cc.obj) : error LNK2001: unresolved external symbol __imp_WSAGetLastError
1>grpc.lib(tcp_client_windows.cc.obj) : error LNK2001: unresolved external symbol __imp_WSAGetLastError
1>grpc.lib(grpc_ares_ev_driver_windows.cc.obj) : error LNK2001: unresolved external symbol __imp_WSAIoctl
1>grpc.lib(socket_windows.cc.obj) : error LNK2001: unresolved external symbol __imp_WSAIoctl
1>grpc.lib(tcp_server_windows.cc.obj) : error LNK2001: unresolved external symbol __imp_WSAIoctl
1>grpc.lib(tcp_client_windows.cc.obj) : error LNK2001: unresolved external symbol __imp_WSAIoctl
1>grpc.lib(tcp_windows.cc.obj) : error LNK2001: unresolved external symbol __imp_WSAIoctl
1>grpc.lib(socket_windows.cc.obj) : error LNK2019: unresolved external symbol __imp_WSASocketA referenced in function "void __cdecl grpc_wsa_socket_flags_init(void)" (?grpc_wsa_socket_flags_init##YAXXZ)
1>grpc.lib(tcp_server_windows.cc.obj) : error LNK2001: unresolved external symbol __imp_WSASocketA
1>grpc.lib(tcp_client_windows.cc.obj) : error LNK2001: unresolved external symbol __imp_WSASocketA
1>grpc.lib(grpc_ares_ev_driver_windows.cc.obj) : error LNK2001: unresolved external symbol __imp_WSASocketA
1>grpc.lib(iocp_windows.cc.obj) : error LNK2019: unresolved external symbol __imp_WSAGetOverlappedResult referenced in function "enum grpc_iocp_work_status __cdecl grpc_iocp_work(__int64)" (?grpc_iocp_work##YA?AW4grpc_iocp_work_status##_J#Z)
1>grpc.lib(tcp_server_windows.cc.obj) : error LNK2001: unresolved external symbol __imp_WSAGetOverlappedResult
1>grpc.lib(tcp_client_windows.cc.obj) : error LNK2001: unresolved external symbol __imp_WSAGetOverlappedResult
1>grpc.lib(grpc_ares_ev_driver_windows.cc.obj) : error LNK2001: unresolved external symbol __imp_WSAGetOverlappedResult
1>grpc.lib(tcp_server_windows.cc.obj) : error LNK2019: unresolved external symbol __imp_getpeername referenced in function "void __cdecl on_accept(void *,struct grpc_error *)" (?on_accept##YAXPEAXPEAUgrpc_error###Z)
1>grpc.lib(tcp_server_windows.cc.obj) : error LNK2019: unresolved external symbol __imp_getsockname referenced in function "struct grpc_error * __cdecl prepare_socket(unsigned __int64,struct grpc_resolved_address const *,int *)" (?prepare_socket##YAPEAUgrpc_error##_KPEBUgrpc_resolved_address##PEAH#Z)
1>grpc.lib(tcp_windows.cc.obj) : error LNK2001: unresolved external symbol __imp_getsockname
1>address_sorting.lib(address_sorting_windows.c.obj) : error LNK2001: unresolved external symbol __imp_getsockname
1>grpc.lib(tcp_server_windows.cc.obj) : error LNK2019: unresolved external symbol __imp_listen referenced in function "struct grpc_error * __cdecl prepare_socket(unsigned __int64,struct grpc_resolved_address const *,int *)" (?prepare_socket##YAPEAUgrpc_error##_KPEBUgrpc_resolved_address##PEAH#Z)
1>grpc.lib(tcp_server_windows.cc.obj) : error LNK2019: unresolved external symbol __imp_setsockopt referenced in function "void __cdecl on_accept(void *,struct grpc_error *)" (?on_accept##YAXPEAXPEAUgrpc_error###Z)
1>grpc.lib(tcp_windows.cc.obj) : error LNK2001: unresolved external symbol __imp_setsockopt
1>grpc.lib(resolve_address_windows.cc.obj) : error LNK2019: unresolved external symbol __imp_getaddrinfo referenced in function "struct grpc_error * __cdecl windows_blocking_resolve_address(char const *,char const *,struct grpc_resolved_addresses * *)" (?windows_blocking_resolve_address##YAPEAUgrpc_error##PEBD0PEAPEAUgrpc_resolved_addresses###Z)
1>grpc.lib(resolve_address_windows.cc.obj) : error LNK2019: unresolved external symbol __imp_freeaddrinfo referenced in function "struct grpc_error * __cdecl windows_blocking_resolve_address(char const *,char const *,struct grpc_resolved_addresses * *)" (?windows_blocking_resolve_address##YAPEAUgrpc_error##PEBD0PEAPEAUgrpc_resolved_addresses###Z)
1>grpc.lib(tcp_windows.cc.obj) : error LNK2019: unresolved external symbol __imp_WSARecv referenced in function "void __cdecl on_read(void *,struct grpc_error *)" (?on_read##YAXPEAXPEAUgrpc_error###Z)
1>grpc.lib(tcp_windows.cc.obj) : error LNK2019: unresolved external symbol __imp_WSASend referenced in function "void __cdecl on_write(void *,struct grpc_error *)" (?on_write##YAXPEAXPEAUgrpc_error###Z)
1>grpc.lib(grpc_ares_ev_driver_windows.cc.obj) : error LNK2001: unresolved external symbol __imp_WSASend
1>grpc.lib(socket_utils_windows.cc.obj) : error LNK2019: unresolved external symbol __imp_htonl referenced in function "unsigned int __cdecl grpc_htonl(unsigned int)" (?grpc_htonl##YAII#Z)
1>address_sorting.lib(address_sorting.c.obj) : error LNK2001: unresolved external symbol __imp_htonl
1>grpc.lib(socket_utils_windows.cc.obj) : error LNK2019: unresolved external symbol __imp_htons referenced in function "unsigned short __cdecl grpc_htons(unsigned short)" (?grpc_htons##YAGG#Z)
1>grpc.lib(grpc_ares_wrapper.cc.obj) : error LNK2001: unresolved external symbol __imp_htons
1>grpc.lib(parse_address.cc.obj) : error LNK2001: unresolved external symbol __imp_htons
1>grpc.lib(socket_utils_windows.cc.obj) : error LNK2019: unresolved external symbol __imp_ntohl referenced in function "unsigned int __cdecl grpc_ntohl(unsigned int)" (?grpc_ntohl##YAII#Z)
1>grpc.lib(socket_utils_windows.cc.obj) : error LNK2019: unresolved external symbol __imp_ntohs referenced in function "unsigned short __cdecl grpc_ntohs(unsigned short)" (?grpc_ntohs##YAGG#Z)
1>grpc.lib(grpc_ares_wrapper.cc.obj) : error LNK2001: unresolved external symbol __imp_ntohs
1>grpc.lib(socket_utils_windows.cc.obj) : error LNK2019: unresolved external symbol __imp_inet_pton referenced in function "int __cdecl grpc_inet_pton(int,char const *,void *)" (?grpc_inet_pton##YAHHPEBDPEAX#Z)
1>grpc.lib(socket_utils_windows.cc.obj) : error LNK2019: unresolved external symbol inet_ntop referenced in function "char const * __cdecl grpc_inet_ntop(int,void const *,char *,unsigned __int64)" (?grpc_inet_ntop##YAPEBDHPEBXPEAD_K#Z)
1>grpc.lib(ssl_transport_security.cc.obj) : error LNK2001: unresolved external symbol inet_ntop
1>grpc.lib(grpc_ares_ev_driver_windows.cc.obj) : error LNK2019: unresolved external symbol __imp_WSASetLastError referenced in function "public: __cdecl grpc_core::WSAErrorContext::~WSAErrorContext(void)" (??1WSAErrorContext#grpc_core##QEAA#XZ)
1>grpc.lib(grpc_ares_ev_driver_windows.cc.obj) : error LNK2019: unresolved external symbol __imp_WSAConnect referenced in function "public: int __cdecl grpc_core::GrpcPolledFdWindows::ConnectUDP(class grpc_core::WSAErrorContext *,struct sockaddr const *,int)" (?ConnectUDP#GrpcPolledFdWindows#grpc_core##QEAAHPEAVWSAErrorContext#2#PEBUsockaddr##H#Z)
1>grpc.lib(grpc_ares_ev_driver_windows.cc.obj) : error LNK2019: unresolved external symbol __imp_WSARecvFrom referenced in function "public: void __cdecl grpc_core::GrpcPolledFdWindows::ContinueRegisterForOnReadableLocked(void)" (?ContinueRegisterForOnReadableLocked#GrpcPolledFdWindows#grpc_core##QEAAXXZ)
1>address_sorting.lib(address_sorting_windows.c.obj) : error LNK2019: unresolved external symbol __imp_connect referenced in function address_sorting_create_source_addr_factory_for_current_platform
I build in the Debug and x64 configuration.
What am I missing? I thought vcpkg shall make life easier?
It seems to be a problem of the grpc package.
2nd part of the accepted answer of Linking gRPC on Windows for VisualC++ exactly fixed my problem.
I added #pragma comment(lib, "Ws2_32.lib") to my cpp-file and the problem was gone.
It also can be fixed like so (I've taken the screenshot from Unresolved external symbol LNK2019):

Why am I getting these linker errors with cinder and CodeBlocks?

I'm having a bit of trouble compiling a project of mine using Code::Blocks and llvm-clang on Windows 10. Here's some of the error msg as its waay too long to fit in fully, but all of what should be needed is in there.
clang++.exe -LC:\Qub3d\cinder_master\lib -o bin\Debug\Qub3d.exe obj\Debug\src\mainMenus\mainMenu.o obj\Debug\src\Qub3d_EngineApp.o ..\Qub3d-libs\lib\msw\x64\libEGL.lib ..\Qub3d-libs\lib\msw\x64\libGLESv2.lib ..\Qub3d-libs\lib\msw\x64\libpng.lib ..\Qub3d-libs\lib\msw\x64\Debug\v141\cinder.lib
cinder.lib(wrapper.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '0' in mainMenu.o
cinder.lib(GlslProg.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '0' in mainMenu.o
cinder.lib(GlslProg.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MT_StaticRelease' in mainMenu.
libcpmtd.lib(stdthrow.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '0' in mainMenu.o
libcpmtd.lib(stdthrow.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MT_StaticRelease' in mainMenu.o
LINK : warning LNK4098: defaultlib 'LIBCMTD' conflicts with use of other libs; use /NODEFAULTLIB:library
mainMenu.o : warning LNK4217: locally defined symbol __std_terminate imported in function "int `public: __cdecl std::shared_ptr<class cinder::app::Window>::~shared_ptr<class cinder::app::Window>(void)'::`1'::dtor$2" (?dtor$2#?0???1?$shared_ptr#VWindow#app#cinder###std##QEAA#XZ#4HA)
Qub3d_EngineApp.o : warning LNK4049: locally defined symbol __std_terminate imported
Qub3d_EngineApp.o : warning LNK4217: locally defined symbol _CxxThrowException imported in function "int `private: void __cdecl std::shared_ptr<class cinder::app::Renderer>::_Setp<class cinder::app::RendererGl>(class cinder::app::RendererGl *,struct shared_ptr<class cinder::app::Renderer>::integral_constant<bool,0>)'::`1'::catch$4" (?catch$4#?0???$_Setp#VRendererGl#app#cinder###?$shared_ptr#VRenderer#app#cinder###std##AEAAXPEAVRendererGl#app#cinder##U?$integral_constant#_N$0A##1##Z#4HA)
cinder.lib(TextureFormatParsers.obj) : error LNK2001: unresolved external symbol _CrtDbgReportW
cinder.lib(Unicode.obj) : error LNK2001: unresolved external symbol _CrtDbgReportW
cinder.lib(RendererImplGlMsw.obj) : error LNK2001: unresolved external symbol _CrtDbgReportW
cinder.lib(Platform.obj) : error LNK2001: unresolved external symbol _CrtDbgReportW
cinder.lib(Signals.obj) : error LNK2001: unresolved external symbol _CrtDbgReportW
cinder.lib(System.obj) : error LNK2001: unresolved external symbol _CrtDbgReportW
cinder.lib(Context.obj) : error LNK2001: unresolved external symbol _CrtDbgReportW
cinder.lib(Batch.obj) : error LNK2001: unresolved external symbol _CrtDbgReportW
cinder.lib(Log.obj) : error LNK2001: unresolved external symbol _CrtDbgReportW
cinder.lib(Exception.obj) : error LNK2001: unresolved external symbol _CrtDbgReportW
cinder.lib(Window.obj) : error LNK2001: unresolved external symbol _CrtDbgReportW
cinder.lib(Environment.obj) : error LNK2001: unresolved external symbol _CrtDbgReportW
cinder.lib(CinderAssert.obj) : error LNK2001: unresolved external symbol _CrtDbgReportW
cinder.lib(Shader.obj) : error LNK2001: unresolved external symbol _CrtDbgReportW
cinder.lib(wrapper.obj) : error LNK2001: unresolved external symbol _CrtDbgReportW
cinder.lib(RendererGl.obj) : error LNK2001: unresolved external symbol _CrtDbgReportW
cinder.lib(AppBase.obj) : error LNK2001: unresolved external symbol _CrtDbgReportW
cinder.lib(AppMsw.obj) : error LNK2001: unresolved external symbol _CrtDbgReportW
cinder.lib(AppMsw.obj) : error LNK2019: unresolved external symbol __imp_GetCursorPos referenced in function "public: virtual struct glm::tvec2<int,0> __cdecl cinder::app::AppMsw::getMousePos(void)const " (?getMousePos#AppMsw#app#cinder##UEBA?AU?$tvec2#H$0A##glm##XZ)
cinder.lib(AppMsw.obj) : error LNK2019: unresolved external symbol __imp_CommandLineToArgvW referenced in function "public: static void __cdecl cinder::app::AppMsw::initialize(class cinder::app::AppMsw::Settings *,class std::shared_ptr<class cinder::app::Renderer> const &,char const *)" (?initialize#AppMsw#app#cinder##SAXPEAVSettings#123#AEBV?$shared_ptr#VRenderer#app#cinder###std##PEBD#Z)
cinder.lib(ConstantConversions.obj) : error LNK2001: unresolved external symbol _calloc_dbg
cinder.lib(PlatformMsw.obj) : error LNK2001: unresolved external symbol _free_dbg
cinder.lib(GeomIo.obj) : error LNK2001: unresolved external symbol _free_dbg
cinder.lib(GlslProg.obj) : error LNK2001: unresolved external symbol _free_dbg
cinder.lib(BufferObj.obj) : error LNK2001: unresolved external symbol _free_dbg
cinder.lib(Vao.obj) : error LNK2001: unresolved external symbol _free_dbg
cinder.lib(Fbo.obj) : error LNK2001: unresolved external symbol _free_dbg
cinder.lib(Context.obj) : error LNK2001: unresolved external symbol _free_dbg
cinder.lib(Log.obj) : error LNK2001: unresolved external symbol _free_dbg
cinder.lib(Utilities.obj) : error LNK2001: unresolved external symbol _free_dbg
cinder.lib(Texture.obj) : error LNK2001: unresolved external symbol _free_dbg
cinder.lib(ShaderPreprocessor.obj) : error LNK2001: unresolved external symbol _malloc_dbg
cinder.lib(ConstantConversions.obj) : error LNK2001: unresolved external symbol _malloc_dbg
cinder.lib(VboMesh.obj) : error LNK2001: unresolved external symbol _malloc_dbg
cinder.lib(PlatformMsw.obj) : error LNK2001: unresolved external symbol _malloc_dbg
cinder.lib(GeomIo.obj) : error LNK2001: unresolved external symbol _malloc_dbg
cinder.lib(GlslProg.obj) : error LNK2001: unresolved external symbol _malloc_dbg
cinder.lib(BufferObj.obj) : error LNK2001: unresolved external symbol _malloc_dbg
cinder.lib(Vao.obj) : error LNK2001: unresolved external symbol _malloc_dbg
cinder.lib(Fbo.obj) : error LNK2001: unresolved external symbol _malloc_dbg
cinder.lib(Context.obj) : error LNK2001: unresolved external symbol _malloc_dbg
cinder.lib(Log.obj) : error LNK2001: unresolved external symbol _malloc_dbg
cinder.lib(Utilities.obj) : error LNK2001: unresolved external symbol _malloc_dbg
cinder.lib(Texture.obj) : error LNK2001: unresolved external symbol _malloc_dbg
cinder.lib(Log.obj) : error LNK2019: unresolved external symbol __imp_CloseEventLog referenced in function "public: virtual __cdecl cinder::log::LoggerSystem::ImplEventLog::~ImplEventLog(void)" (??1ImplEventLog#LoggerSystem#log#cinder##UEAA#XZ)
cinder.lib(Log.obj) : error LNK2019: unresolved external symbol __imp_RegisterEventSourceW referenced in function "public: __cdecl cinder::log::LoggerSystem::ImplEventLog::ImplEventLog(void)" (??0ImplEventLog#LoggerSystem#log#cinder##QEAA#XZ)
cinder.lib(Log.obj) : error LNK2019: unresolved external symbol __imp_ReportEventW referenced in function "public: virtual void __cdecl cinder::log::LoggerSystem::ImplEventLog::write(struct cinder::log::Metadata const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?write#ImplEventLog#LoggerSystem#log#cinder##UEAAXAEBUMetadata#34#AEBV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std###Z)
cinder.lib(RendererImplGlMsw.obj) : error LNK2019: unresolved external symbol __imp_ChoosePixelFormat referenced in function "bool __cdecl cinder::app::`anonymous namespace'::getWglFunctionPointers(struct HGLRC__ * (__cdecl**)(struct HDC__ *,struct HGLRC__ *,int const *),int (__cdecl**)(struct HDC__ *,int const *,float const *,unsigned int,int *,unsigned int *))" (?getWglFunctionPointers#?A0x83b54a9b#app#cinder##YA_NPEAP6APEAUHGLRC__##PEAUHDC__##PEAU4#PEBH#ZPEAP6AH02PEBMIPEAHPEAI#Z#Z)
cinder.lib(RendererImplGlMsw.obj) : error LNK2019: unresolved external symbol __imp_DescribePixelFormat referenced in function "bool __cdecl cinder::app::`anonymous namespace'::setPixelFormat(struct HDC__ *,struct cinder::app::RendererGl::Options const &)" (?setPixelFormat#?A0x83b54a9b#app#cinder##YA_NPEAUHDC__##AEBUOptions#RendererGl#23##Z)
cinder.lib(RendererImplGlMsw.obj) : error LNK2019: unresolved external symbol __imp_SetPixelFormat referenced in function "bool __cdecl cinder::app::`anonymous namespace'::getWglFunctionPointers(struct HGLRC__ * (__cdecl**)(struct HDC__ *,struct HGLRC__ *,int const *),int (__cdecl**)(struct HDC__ *,int const *,float const *,unsigned int,int *,unsigned int *))" (?getWglFunctionPointers#?A0x83b54a9b#app#cinder##YA_NPEAP6APEAUHGLRC__##PEAUHDC__##PEAU4#PEBH#ZPEAP6AH02PEBMIPEAHPEAI#Z#Z)
cinder.lib(RendererImplGlMsw.obj) : error LNK2019: unresolved external symbol __imp_SwapBuffers referenced in function "public: virtual void __cdecl cinder::app::RendererImplGlMsw::swapBuffers(void)const " (?swapBuffers#RendererImplGlMsw#app#cinder##UEBAXXZ)
cinder.lib(RendererImplGlMsw.obj) : error LNK2019: unresolved external symbol __imp_DefWindowProcW referenced in function "struct HWND__ * __cdecl cinder::app::`anonymous namespace'::createDummyWindow(void)" (?createDummyWindow#?A0x83b54a9b#app#cinder##YAPEAUHWND__##XZ)
cinder.lib(AppImplMsw.obj) : error LNK2001: unresolved external symbol __imp_DefWindowProcW
cinder.lib(RendererImplGlMsw.obj) : error LNK2019: unresolved external symbol __imp_RegisterClassW referenced in function "struct HWND__ * __cdecl cinder::app::`anonymous namespace'::createDummyWindow(void)" (?createDummyWindow#?A0x83b54a9b#app#cinder##YAPEAUHWND__##XZ)
cinder.lib(AppImplMsw.obj) : error LNK2019: unresolved external symbol __imp_MapVirtualKeyW referenced in function "wchar_t __cdecl cinder::app::mapVirtualKey(unsigned __int64)" (?mapVirtualKey#app#cinder##YA_W_K#Z)
cinder.lib(AppImplMsw.obj) : error LNK2019: unresolved external symbol __imp_SetCapture referenced in function "__int64 __cdecl cinder::app::WndProc(struct HWND__ *,unsigned int,unsigned __int64,__int64)" (?WndProc#app#cinder##YA_JPEAUHWND__##I_K_J#Z)
cinder.lib(AppImplMsw.obj) : error LNK2019: unresolved external symbol __imp_ReleaseCapture referenced in function "__int64 __cdecl cinder::app::WndProc(struct HWND__ *,unsigned int,unsigned __int64,__int64)" (?WndProc#app#cinder##YA_JPEAUHWND__##I_K_J#Z)
cinder.lib(AppImplMsw.obj) : error LNK2019: unresolved external symbol __imp_SetForegroundWindow referenced in function "public: __cdecl cinder::app::BlankingWindow::BlankingWindow(class std::shared_ptr<class cinder::Display>)" (??0BlankingWindow#app#cinder##QEAA#V?$shared_ptr#VDisplay#cinder###std###Z)
cinder.lib(AppImplMsw.obj) : error LNK2019: unresolved external symbol __imp_BeginPaint referenced in function "__int64 __cdecl cinder::app::BlankingWndProc(struct HWND__ *,unsigned int,unsigned __int64,__int64)" (?BlankingWndProc#app#cinder##YA_JPEAUHWND__##I_K_J#Z)
cinder.lib(RendererImpl2dGdi.obj) : error LNK2001: unresolved external symbol __imp_BeginPaint
cinder.lib(AppImplMsw.obj) : error LNK2019: unresolved external symbol __imp_EndPaint referenced in function "__int64 __cdecl cinder::app::BlankingWndProc(struct HWND__ *,unsigned int,unsigned __int64,__int64)" (?BlankingWndProc#app#cinder##YA_JPEAUHWND__##I_K_J#Z)
cinder.lib(RendererImpl2dGdi.obj) : error LNK2001: unresolved external symbol __imp_EndPaint
cinder.lib(AppImplMsw.obj) : error LNK2019: unresolved external symbol __imp_InvalidateRect referenced in function "public: void __cdecl cinder::app::WindowImplMsw::setBorderless(bool)" (?setBorderless#WindowImplMsw#app#cinder##QEAAX_N#Z)
cinder.lib(AppImplMsw.obj) : error LNK2019: unresolved external symbol __imp_RedrawWindow referenced in function "public: virtual void __cdecl cinder::app::WindowImplMsw::redraw(void)" (?redraw#WindowImplMsw#app#cinder##UEAAXXZ)
cinder.lib(AppImplMsw.obj) : error LNK2019: unresolved external symbol __imp_SetWindowTextW referenced in function "public: virtual void __cdecl cinder::app::WindowImplMsw::setTitle(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?setTitle#WindowImplMsw#app#cinder##UEAAXAEBV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std###Z)
cinder.lib(AppImplMsw.obj) : error LNK2019: unresolved external symbol __imp_GetWindowTextW referenced in function "public: virtual class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl cinder::app::WindowImplMsw::getTitle(void)const " (?getTitle#WindowImplMsw#app#cinder##UEBA?AV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##XZ)
cinder.lib(AppImplMsw.obj) : error LNK2019: unresolved external symbol __imp_GetOpenFileNameW referenced in function "public: static class std::experimental::filesystem::v1::path __cdecl cinder::app::AppImplMsw::getOpenFilePath(class std::experimental::filesystem::v1::path const &,class std::vector<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::allocator<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > >)" (?getOpenFilePath#AppImplMsw#app#cinder##SA?AVpath#v1#filesystem#experimental#std##AEBV45678#V?$vector#V?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##V?$allocator#V?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std###2##8##Z)
cinder.lib(AppImplMsw.obj) : error LNK2019: unresolved external symbol __imp_GetSaveFileNameW referenced in function "public: static class std::experimental::filesystem::v1::path __cdecl cinder::app::AppImplMsw::getSaveFilePath(class std::experimental::filesystem::v1::path const &,class std::vector<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::allocator<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > >)" (?getSaveFilePath#AppImplMsw#app#cinder##SA?AVpath#v1#filesystem#experimental#std##AEBV45678#V?$vector#V?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##V?$allocator#V?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std###2##8##Z)
cinder.lib(ImageTargetFileWic.obj) : error LNK2001: unresolved external symbol __imp_CoCreateInstance
cinder.lib(ImageTargetFileWic.obj) : error LNK2019: unresolved external symbol __imp_VariantInit referenced in function "protected: __cdecl cinder::ImageTargetFileWic::ImageTargetFileWic(class std::shared_ptr<class cinder::DataTarget>,class std::shared_ptr<class cinder::ImageSource>,class cinder::ImageTarget::Options,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??0ImageTargetFileWic#cinder##IEAA#V?$shared_ptr#VDataTarget#cinder###std##V?$shared_ptr#VImageSource#cinder###3#VOptions#ImageTarget#1#AEBV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##3##Z)
bin\Debug\Qub3d.exe : fatal error LNK1120: 93 unresolved externals
I've linked cinder.lib, libEGL.lib, libGLESv2.lib, and libpng.lib
I don't see any reason why this should not be working.

Output with cout << endl

So, i have a program where i include static lib.
After that i write this:
cout << 1 << endl;
And i have this many errors like this:
1>RL.lib(Connection.obj) : warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/OPT:LBR' specification
1>Ggsg.lib(StrategyInfo.obj) : error LNK2001: unresolved external symbol _m_mem_nchar_undup
1>Ggsg.lib(StrategyLegInfo.obj) : error LNK2001: unresolved external symbol _m_mem_nchar_undup
1>Ggsg.lib(ProductRmsInfo.obj) : error LNK2019: unresolved external symbol _m_mem_nchar_undup referenced in function "int __cdecl RApiImp::dupProductRmsInfo(class RApi::ProductRmsInfo *,class RApi::ProductRmsInfo *,int *)" (?dupProductRmsInfo#RApiImp##YAHPAVProductRmsInfo#RApi##0PAH#Z)
1>Ggsg.lib(OrderReportElseRqCtx.obj) : error LNK2001: unresolved external symbol _m_mem_nchar_undup
1>Ggsg.lib(PnlInfo.obj) : error LNK2001: unresolved external symbol _m_mem_nchar_undup
1>Ggsg.lib(SubSymCtx.obj) : error LNK2001: unresolved external symbol _m_mem_nchar_undup
1>Ggsg.lib(RebuildBookRqCtx.obj) : error LNK2001: unresolved external symbol _m_mem_nchar_undup
1>Ggsg.lib(SubRqCtx.obj) : error LNK2001: unresolved external symbol _m_mem_nchar_undup
1>Ggsg.lib(SubWatchCtx.obj) : error LNK2001: unresolved external symbol _m_mem_nchar_undup
1>Ggsg.lib(TradeRouteInfo.obj) : error LNK2001: unresolved external symbol _m_mem_nchar_undup
1>Ggsg.lib(PreSubmitOrderRqCtx.obj) : error LNK2001: unresolved external symbol _m_mem_nchar_undup
1>Ggsg.lib(RothFillsRqCb.obj) : error LNK2001: unresolved external symbol _m_mem_nchar_undup
When i write this:
cout << 1;
Working well. Whats the matter?

error LNK2001: unresolved external symbol in cocos2d-x lua support

I have created a cpp cocos2d-x project, and manually add lua support(import the liblua project in my solution). I want to run lua code in my cocos2d-x project. But I met these errors. I cannot use any functions in "CCLuaEngine.h". When I try to write some lua api code , there still unresolved external symbol errors.
my cocos2d-x version is 2.1.5 , and I use visual studio 2012 under Windows 7
following picture is my project.
1>liblua.lib(tolua_to.obj) : error LNK2001: unresolved external symbol _lua_pushnumber
1>liblua.lib(CCLuaEngine.obj) : error LNK2019: unresolved external symbol _lua_pushnumber referenced in function "public: virtual int __thiscall cocos2d::CCLuaEngine::executeLayerTouchesEvent(class cocos2d::CCLayer *,int,class cocos2d::CCSet *)" (?executeLayerTouchesEvent#CCLuaEngine#cocos2d##UAEHPAVCCLayer#2#HPAVCCSet#2##Z)
1>liblua.lib(CCLuaStack.obj) : error LNK2001: unresolved external symbol _lua_pushnumber
1>liblua.lib(tolua_is.obj) : error LNK2001: unresolved external symbol _lua_pushnumber
1>liblua.lib(tolua_push.obj) : error LNK2001: unresolved external symbol _lua_pushnumber
1>liblua.lib(CCLuaEngine.obj) : error LNK2019: unresolved external symbol _lua_pushinteger referenced in function "public: virtual int __thiscall cocos2d::CCLuaEngine::executeLayerTouchesEvent(class cocos2d::CCLayer *,int,class cocos2d::CCSet *)" (?executeLayerTouchesEvent#CCLuaEngine#cocos2d##UAEHPAVCCLayer#2#HPAVCCSet#2##Z)
1>liblua.lib(CCLuaStack.obj) : error LNK2001: unresolved external symbol _lua_pushinteger
1>liblua.lib(tolua_fix.obj) : error LNK2001: unresolved external symbol _lua_pushinteger
1>liblua.lib(tolua_event.obj) : error LNK2001: unresolved external symbol _lua_createtable
1>liblua.lib(CCLuaEngine.obj) : error LNK2019: unresolved external symbol _lua_createtable referenced in function "public: virtual int __thiscall cocos2d::CCLuaEngine::executeLayerTouchesEvent(class cocos2d::CCLayer *,int,class cocos2d::CCSet *)" (?executeLayerTouchesEvent#CCLuaEngine#cocos2d##UAEHPAVCCLayer#2#HPAVCCSet#2##Z)
1>liblua.lib(CCLuaStack.obj) : error LNK2001: unresolved external symbol _lua_createtable
1>liblua.lib(tolua_fix.obj) : error LNK2001: unresolved external symbol _lua_createtable
1>liblua.lib(tolua_map.obj) : error LNK2001: unresolved external symbol _lua_createtable
1>liblua.lib(CCLuaEngine.obj) : error LNK2019: unresolved external symbol _lua_rawseti referenced in function "public: virtual int __thiscall cocos2d::CCLuaEngine::executeLayerTouchesEvent(class cocos2d::CCLayer *,int,class cocos2d::CCSet *)" (?executeLayerTouchesEvent#CCLuaEngine#cocos2d##UAEHPAVCCLayer#2#HPAVCCSet#2##Z)
1>liblua.lib(CCLuaStack.obj) : error LNK2001: unresolved external symbol _lua_rawseti
1>liblua.lib(tolua_push.obj) : error LNK2001: unresolved external symbol _lua_gettop
1>liblua.lib(tolua_map.obj) : error LNK2001: unresolved external symbol _lua_gettop
1>liblua.lib(tolua_to.obj) : error LNK2001: unresolved external symbol _lua_gettop
1>liblua.lib(tolua_event.obj) : error LNK2001: unresolved external symbol _lua_gettop
1>liblua.lib(CCLuaStack.obj) : error LNK2019: unresolved external symbol _lua_gettop referenced in function "int __cdecl `anonymous namespace'::lua_print(struct lua_State *)" (?lua_print#?A0x5bb22735##YAHPAUlua_State###Z)
1>liblua.lib(tolua_fix.obj) : error LNK2001: unresolved external symbol _lua_gettop
1>liblua.lib(LuaCocos2d.obj) : error LNK2001: unresolved external symbol _lua_gettop
1>liblua.lib(tolua_is.obj) : error LNK2001: unresolved external symbol _lua_gettop
1>liblua.lib(tolua_map.obj) : error LNK2001: unresolved external symbol _lua_settop
1>liblua.lib(tolua_to.obj) : error LNK2001: unresolved external symbol _lua_settop
1>liblua.lib(tolua_event.obj) : error LNK2001: unresolved external symbol _lua_settop
1>liblua.lib(CCLuaStack.obj) : error LNK2019: unresolved external symbol _lua_settop referenced in function "public: virtual void __thiscall cocos2d::CCLuaStack::addLuaLoader(int (__cdecl*)(struct lua_State *))" (?addLuaLoader#CCLuaStack#cocos2d##UAEXP6AHPAUlua_State###Z#Z)
1>liblua.lib(tolua_fix.obj) : error LNK2001: unresolved external symbol _lua_settop
1>liblua.lib(tolua_is.obj) : error LNK2001: unresolved external symbol _lua_settop
1>liblua.lib(tolua_push.obj) : error LNK2001: unresolved external symbol _lua_settop
1>liblua.lib(tolua_event.obj) : error LNK2001: unresolved external symbol _lua_insert
1>liblua.lib(CCLuaStack.obj) : error LNK2019: unresolved external symbol _lua_insert referenced in function "public: virtual int __thiscall cocos2d::CCLuaStack::executeFunction(int)" (?executeFunction#CCLuaStack#cocos2d##UAEHH#Z)
1>liblua.lib(tolua_is.obj) : error LNK2001: unresolved external symbol _lua_insert
1>liblua.lib(tolua_push.obj) : error LNK2001: unresolved external symbol _lua_insert
1>liblua.lib(tolua_map.obj) : error LNK2001: unresolved external symbol _lua_insert
1>liblua.lib(CCLuaStack.obj) : error LNK2019: unresolved external symbol _lua_isnumber referenced in function "public: virtual int __thiscall cocos2d::CCLuaStack::executeFunction(int)" (?executeFunction#CCLuaStack#cocos2d##UAEHH#Z)
1>liblua.lib(tolua_is.obj) : error LNK2001: unresolved external symbol _lua_isnumber
1>liblua.lib(tolua_event.obj) : error LNK2001: unresolved external symbol _lua_isnumber
1>liblua.lib(tolua_map.obj) : error LNK2001: unresolved external symbol _lua_type
1>liblua.lib(tolua_to.obj) : error LNK2001: unresolved external symbol _lua_type
1>liblua.lib(tolua_event.obj) : error LNK2001: unresolved external symbol _lua_type
1>liblua.lib(CCLuaStack.obj) : error LNK2019: unresolved external symbol _lua_type referenced in function "public: virtual int __thiscall cocos2d::CCLuaStack::executeFunction(int)" (?executeFunction#CCLuaStack#cocos2d##UAEHH#Z)
1>liblua.lib(tolua_fix.obj) : error LNK2001: unresolved external symbol _lua_type
1>liblua.lib(tolua_is.obj) : error LNK2001: unresolved external symbol _lua_type
1>liblua.lib(tolua_push.obj) : error LNK2001: unresolved external symbol _lua_type
1>liblua.lib(CCLuaStack.obj) : error LNK2019: unresolved external symbol _lua_typename referenced in function "int __cdecl `anonymous namespace'::lua_print(struct lua_State *)" (?lua_print#?A0x5bb22735##YAHPAUlua_State###Z)
1>liblua.lib(tolua_fix.obj) : error LNK2001: unresolved external symbol _lua_typename
1>liblua.lib(tolua_is.obj) : error LNK2001: unresolved external symbol _lua_typename
1>liblua.lib(CCLuaStack.obj) : error LNK2019: unresolved external symbol _lua_tointeger referenced in function "public: virtual int __thiscall cocos2d::CCLuaStack::executeFunction(int)" (?executeFunction#CCLuaStack#cocos2d##UAEHH#Z)
1>liblua.lib(tolua_to.obj) : error LNK2001: unresolved external symbol _lua_toboolean
1>liblua.lib(CCLuaStack.obj) : error LNK2019: unresolved external symbol _lua_toboolean referenced in function "public: virtual int __thiscall cocos2d::CCLuaStack::executeFunction(int)" (?executeFunction#CCLuaStack#cocos2d##UAEHH#Z)
1>liblua.lib(tolua_fix.obj) : error LNK2001: unresolved external symbol _lua_toboolean
1>liblua.lib(tolua_is.obj) : error LNK2001: unresolved external symbol _lua_toboolean
1>liblua.lib(tolua_push.obj) : error LNK2001: unresolved external symbol _lua_toboolean
1>liblua.lib(tolua_to.obj) : error LNK2001: unresolved external symbol _lua_tolstring
1>liblua.lib(CCLuaStack.obj) : error LNK2019: unresolved external symbol _lua_tolstring referenced in function "public: virtual void __thiscall cocos2d::CCLuaStack::addSearchPath(char const *)" (?addSearchPath#CCLuaStack#cocos2d##UAEXPBD#Z)
1>liblua.lib(tolua_fix.obj) : error LNK2001: unresolved external symbol _lua_tolstring
1>liblua.lib(Cocos2dxLuaLoader.obj) : error LNK2001: unresolved external symbol _lua_tolstring
1>liblua.lib(tolua_is.obj) : error LNK2001: unresolved external symbol _lua_tolstring
1>liblua.lib(CCLuaStack.obj) : error LNK2019: unresolved external symbol _lua_objlen referenced in function "public: virtual void __thiscall cocos2d::CCLuaStack::addLuaLoader(int (__cdecl*)(struct lua_State *))" (?addLuaLoader#CCLuaStack#cocos2d##UAEXP6AHPAUlua_State###Z#Z)
1>liblua.lib(tolua_event.obj) : error LNK2001: unresolved external symbol _lua_pushnil
1>liblua.lib(CCLuaStack.obj) : error LNK2019: unresolved external symbol _lua_pushnil referenced in function "public: virtual void __thiscall cocos2d::CCLuaStack::pushNil(void)" (?pushNil#CCLuaStack#cocos2d##UAEXXZ)
1>liblua.lib(tolua_fix.obj) : error LNK2001: unresolved external symbol _lua_pushnil
1>liblua.lib(tolua_push.obj) : error LNK2001: unresolved external symbol _lua_pushnil
1>liblua.lib(tolua_map.obj) : error LNK2001: unresolved external symbol _lua_pushnil
1>liblua.lib(CCLuaStack.obj) : error LNK2019: unresolved external symbol _lua_pushlstring referenced in function "public: virtual void __thiscall cocos2d::CCLuaStack::pushString(char const *,int)" (?pushString#CCLuaStack#cocos2d##UAEXPBDH#Z)
1>liblua.lib(tolua_is.obj) : error LNK2001: unresolved external symbol _lua_pushlstring
1>liblua.lib(tolua_map.obj) : error LNK2001: unresolved external symbol _lua_pushlstring
1>liblua.lib(tolua_event.obj) : error LNK2001: unresolved external symbol _lua_pushlstring
1>liblua.lib(tolua_push.obj) : error LNK2001: unresolved external symbol _lua_pushstring
1>liblua.lib(tolua_map.obj) : error LNK2001: unresolved external symbol _lua_pushstring
1>liblua.lib(tolua_event.obj) : error LNK2001: unresolved external symbol _lua_pushstring
1>liblua.lib(CCLuaStack.obj) : error LNK2019: unresolved external symbol _lua_pushstring referenced in function "public: virtual void __thiscall cocos2d::CCLuaStack::pushCCLuaValueDict(class std::map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class cocos2d::CCLuaValue,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,class cocos2d::CCLuaValue> > > const &)" (?pushCCLuaValueDict#CCLuaStack#cocos2d##UAEXABV?$map#V?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##VCCLuaValue#cocos2d##U?$less#V?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std###2#V?$allocator#U?$pair#$$CBV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##VCCLuaValue#cocos2d###std###2##std###Z)
1>liblua.lib(tolua_fix.obj) : error LNK2001: unresolved external symbol _lua_pushstring
1>liblua.lib(LuaCocos2d.obj) : error LNK2001: unresolved external symbol _lua_pushstring
1>liblua.lib(tolua_is.obj) : error LNK2001: unresolved external symbol _lua_pushstring
1>liblua.lib(CCLuaStack.obj) : error LNK2019: unresolved external symbol _lua_pushfstring referenced in function "public: virtual void __thiscall cocos2d::CCLuaStack::addSearchPath(char const *)" (?addSearchPath#CCLuaStack#cocos2d##UAEXPBD#Z)
1>liblua.lib(CCLuaStack.obj) : error LNK2019: unresolved external symbol _lua_pushcclosure referenced in function "public: virtual void __thiscall cocos2d::CCLuaStack::addLuaLoader(int (__cdecl*)(struct lua_State *))" (?addLuaLoader#CCLuaStack#cocos2d##UAEXP6AHPAUlua_State###Z#Z)
1>liblua.lib(tolua_map.obj) : error LNK2001: unresolved external symbol _lua_pushcclosure
1>liblua.lib(tolua_event.obj) : error LNK2001: unresolved external symbol _lua_pushcclosure
1>liblua.lib(CCLuaStack.obj) : error LNK2019: unresolved external symbol _lua_pushboolean referenced in function "public: virtual void __thiscall cocos2d::CCLuaStack::pushBoolean(bool)" (?pushBoolean#CCLuaStack#cocos2d##UAEX_N#Z)
1>liblua.lib(tolua_push.obj) : error LNK2001: unresolved external symbol _lua_pushboolean
1>liblua.lib(tolua_map.obj) : error LNK2001: unresolved external symbol _lua_pushboolean
1>liblua.lib(tolua_event.obj) : error LNK2001: unresolved external symbol _lua_pushboolean
1>liblua.lib(CCLuaStack.obj) : error LNK2019: unresolved external symbol _lua_getfield referenced in function "public: virtual void __thiscall cocos2d::CCLuaStack::addLuaLoader(int (__cdecl*)(struct lua_State *))" (?addLuaLoader#CCLuaStack#cocos2d##UAEXP6AHPAUlua_State###Z#Z)
1>liblua.lib(tolua_fix.obj) : error LNK2001: unresolved external symbol _lua_getfield
1>liblua.lib(tolua_push.obj) : error LNK2001: unresolved external symbol _lua_getfield
1>liblua.lib(tolua_map.obj) : error LNK2001: unresolved external symbol _lua_getfield
1>liblua.lib(CCLuaStack.obj) : error LNK2019: unresolved external symbol _lua_rawgeti referenced in function "public: virtual void __thiscall cocos2d::CCLuaStack::addLuaLoader(int (__cdecl*)(struct lua_State *))" (?addLuaLoader#CCLuaStack#cocos2d##UAEXP6AHPAUlua_State###Z#Z)
1>liblua.lib(CCLuaStack.obj) : error LNK2019: unresolved external symbol _lua_setfield referenced in function "public: virtual void __thiscall cocos2d::CCLuaStack::addLuaLoader(int (__cdecl*)(struct lua_State *))" (?addLuaLoader#CCLuaStack#cocos2d##UAEXP6AHPAUlua_State###Z#Z)
1>liblua.lib(tolua_event.obj) : error LNK2001: unresolved external symbol _lua_rawset
1>liblua.lib(CCLuaStack.obj) : error LNK2019: unresolved external symbol _lua_rawset referenced in function "public: virtual void __thiscall cocos2d::CCLuaStack::pushCCLuaValueDict(class std::map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class cocos2d::CCLuaValue,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,class cocos2d::CCLuaValue> > > const &)" (?pushCCLuaValueDict#CCLuaStack#cocos2d##UAEXABV?$map#V?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##VCCLuaValue#cocos2d##U?$less#V?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std###2#V?$allocator#U?$pair#$$CBV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##VCCLuaValue#cocos2d###std###2##std###Z)
1>liblua.lib(tolua_fix.obj) : error LNK2001: unresolved external symbol _lua_rawset
1>liblua.lib(tolua_push.obj) : error LNK2001: unresolved external symbol _lua_rawset
1>liblua.lib(tolua_map.obj) : error LNK2001: unresolved external symbol _lua_rawset
1>liblua.lib(CCLuaStack.obj) : error LNK2019: unresolved external symbol _lua_pcall referenced in function "public: virtual int __thiscall cocos2d::CCLuaStack::executeFunction(int)" (?executeFunction#CCLuaStack#cocos2d##UAEHH#Z)
1>liblua.lib(tolua_map.obj) : error LNK2001: unresolved external symbol _lua_pcall
1>liblua.lib(CCLuaStack.obj) : error LNK2019: unresolved external symbol _lua_error referenced in function "public: virtual bool __thiscall cocos2d::CCLuaStack::handleAssert(char const *)" (?handleAssert#CCLuaStack#cocos2d##UAE_NPBD#Z)
1>liblua.lib(tolua_map.obj) : error LNK2001: unresolved external symbol _lua_error
1>liblua.lib(CCLuaStack.obj) : error LNK2019: unresolved external symbol _luaL_register referenced in function "protected: bool __thiscall cocos2d::CCLuaStack::init(void)" (?init#CCLuaStack#cocos2d##IAE_NXZ)
1>liblua.lib(CCLuaStack.obj) : error LNK2019: unresolved external symbol _luaL_loadfile referenced in function "public: virtual int __thiscall cocos2d::CCLuaStack::executeScriptFile(char const *)" (?executeScriptFile#CCLuaStack#cocos2d##UAEHPBD#Z)
1>liblua.lib(CCLuaStack.obj) : error LNK2019: unresolved external symbol _luaL_loadstring referenced in function "public: virtual int __thiscall cocos2d::CCLuaStack::executeString(char const *)" (?executeString#CCLuaStack#cocos2d##UAEHPBD#Z)
1>liblua.lib(CCLuaStack.obj) : error LNK2019: unresolved external symbol _luaL_newstate referenced in function "protected: bool __thiscall cocos2d::CCLuaStack::init(void)" (?init#CCLuaStack#cocos2d##IAE_NXZ)
1>liblua.lib(CCLuaStack.obj) : error LNK2019: unresolved external symbol _luaL_openlibs referenced in function "protected: bool __thiscall cocos2d::CCLuaStack::init(void)" (?init#CCLuaStack#cocos2d##IAE_NXZ)
1>liblua.lib(tolua_event.obj) : error LNK2001: unresolved external symbol _lua_pushvalue
1>liblua.lib(tolua_fix.obj) : error LNK2019: unresolved external symbol _lua_pushvalue referenced in function _toluafix_ref_function
1>liblua.lib(tolua_is.obj) : error LNK2001: unresolved external symbol _lua_pushvalue
1>liblua.lib(tolua_push.obj) : error LNK2001: unresolved external symbol _lua_pushvalue
1>liblua.lib(tolua_map.obj) : error LNK2001: unresolved external symbol _lua_pushvalue
1>liblua.lib(tolua_fix.obj) : error LNK2019: unresolved external symbol _lua_remove referenced in function _toluafix_get_function_by_refid
1>liblua.lib(tolua_push.obj) : error LNK2001: unresolved external symbol _lua_remove
1>liblua.lib(tolua_event.obj) : error LNK2001: unresolved external symbol _lua_remove
1>liblua.lib(tolua_fix.obj) : error LNK2019: unresolved external symbol _lua_tonumber referenced in function _toluafix_stack_dump
1>liblua.lib(tolua_to.obj) : error LNK2001: unresolved external symbol _lua_tonumber
1>liblua.lib(tolua_event.obj) : error LNK2001: unresolved external symbol _lua_touserdata
1>liblua.lib(tolua_fix.obj) : error LNK2019: unresolved external symbol _lua_touserdata referenced in function _toluafix_remove_ccobject_by_refid
1>liblua.lib(LuaCocos2d.obj) : error LNK2001: unresolved external symbol _lua_touserdata
1>liblua.lib(tolua_map.obj) : error LNK2001: unresolved external symbol _lua_touserdata
1>liblua.lib(tolua_to.obj) : error LNK2001: unresolved external symbol _lua_touserdata
1>liblua.lib(tolua_fix.obj) : error LNK2019: unresolved external symbol _lua_pushlightuserdata referenced in function _toluafix_pushusertype_ccobject
1>liblua.lib(tolua_push.obj) : error LNK2001: unresolved external symbol _lua_pushlightuserdata
1>liblua.lib(tolua_map.obj) : error LNK2001: unresolved external symbol _lua_pushlightuserdata
1>liblua.lib(tolua_event.obj) : error LNK2001: unresolved external symbol _lua_pushlightuserdata
1>liblua.lib(tolua_map.obj) : error LNK2001: unresolved external symbol _lua_rawget
1>liblua.lib(tolua_event.obj) : error LNK2001: unresolved external symbol _lua_rawget
1>liblua.lib(tolua_fix.obj) : error LNK2019: unresolved external symbol _lua_rawget referenced in function _toluafix_get_function_by_refid
1>liblua.lib(LuaCocos2d.obj) : error LNK2001: unresolved external symbol _lua_rawget
1>liblua.lib(tolua_is.obj) : error LNK2001: unresolved external symbol _lua_rawget
1>liblua.lib(tolua_push.obj) : error LNK2001: unresolved external symbol _lua_rawget
1>liblua.lib(Cocos2dxLuaLoader.obj) : error LNK2019: unresolved external symbol _luaL_checklstring referenced in function _cocos2dx_lua_loader
1>liblua.lib(Cocos2dxLuaLoader.obj) : error LNK2019: unresolved external symbol _luaL_error referenced in function _cocos2dx_lua_loader
1>liblua.lib(tolua_is.obj) : error LNK2001: unresolved external symbol _luaL_error
1>liblua.lib(tolua_map.obj) : error LNK2001: unresolved external symbol _luaL_error
1>liblua.lib(Cocos2dxLuaLoader.obj) : error LNK2019: unresolved external symbol _luaL_loadbuffer referenced in function _cocos2dx_lua_loader
1>liblua.lib(tolua_map.obj) : error LNK2001: unresolved external symbol _luaL_loadbuffer
1>liblua.lib(tolua_is.obj) : error LNK2019: unresolved external symbol _lua_replace referenced in function _push_table_instance
1>liblua.lib(tolua_is.obj) : error LNK2019: unresolved external symbol _lua_isstring referenced in function _lua_isusertable
1>liblua.lib(tolua_is.obj) : error LNK2019: unresolved external symbol _lua_isuserdata referenced in function _lua_isusertype
1>liblua.lib(tolua_map.obj) : error LNK2001: unresolved external symbol _lua_isuserdata
1>liblua.lib(tolua_to.obj) : error LNK2001: unresolved external symbol _lua_isuserdata
1>liblua.lib(tolua_event.obj) : error LNK2001: unresolved external symbol _lua_isuserdata
1>liblua.lib(tolua_is.obj) : error LNK2019: unresolved external symbol _lua_rawequal referenced in function _tolua_fast_isa
1>liblua.lib(tolua_map.obj) : error LNK2001: unresolved external symbol _lua_rawequal
1>liblua.lib(tolua_event.obj) : error LNK2001: unresolved external symbol _lua_rawequal
1>liblua.lib(tolua_is.obj) : error LNK2019: unresolved external symbol _lua_gettable referenced in function _push_table_instance
1>liblua.lib(tolua_to.obj) : error LNK2001: unresolved external symbol _lua_gettable
1>liblua.lib(tolua_event.obj) : error LNK2001: unresolved external symbol _lua_gettable
1>liblua.lib(tolua_is.obj) : error LNK2019: unresolved external symbol _lua_getmetatable referenced in function _lua_isusertype
1>liblua.lib(tolua_push.obj) : error LNK2001: unresolved external symbol _lua_getmetatable
1>liblua.lib(tolua_map.obj) : error LNK2001: unresolved external symbol _lua_getmetatable
1>liblua.lib(tolua_event.obj) : error LNK2001: unresolved external symbol _lua_getmetatable
1>liblua.lib(tolua_is.obj) : error LNK2019: unresolved external symbol _lua_concat referenced in function _lua_isusertable
1>liblua.lib(tolua_push.obj) : error LNK2019: unresolved external symbol _lua_newuserdata referenced in function _tolua_pushusertype
1>liblua.lib(tolua_push.obj) : error LNK2019: unresolved external symbol _lua_settable referenced in function _tolua_pushfieldboolean
1>liblua.lib(tolua_map.obj) : error LNK2001: unresolved external symbol _lua_settable
1>liblua.lib(tolua_event.obj) : error LNK2001: unresolved external symbol _lua_settable
1>liblua.lib(tolua_push.obj) : error LNK2019: unresolved external symbol _lua_setmetatable referenced in function _tolua_pushusertype
1>liblua.lib(tolua_map.obj) : error LNK2001: unresolved external symbol _lua_setmetatable
1>liblua.lib(tolua_event.obj) : error LNK2001: unresolved external symbol _lua_setmetatable
1>liblua.lib(tolua_push.obj) : error LNK2019: unresolved external symbol _lua_setfenv referenced in function _tolua_pushusertype
1>liblua.lib(tolua_map.obj) : error LNK2001: unresolved external symbol _lua_setfenv
1>liblua.lib(tolua_event.obj) : error LNK2001: unresolved external symbol _lua_setfenv
1>liblua.lib(tolua_map.obj) : error LNK2019: unresolved external symbol _lua_getfenv referenced in function _tolua_bnd_getpeer
1>liblua.lib(tolua_event.obj) : error LNK2001: unresolved external symbol _lua_getfenv
1>liblua.lib(tolua_map.obj) : error LNK2019: unresolved external symbol _lua_gc referenced in function _tolua_bnd_releaseownership
1>liblua.lib(tolua_map.obj) : error LNK2019: unresolved external symbol _lua_next referenced in function _mapsuper
1>liblua.lib(tolua_map.obj) : error LNK2019: unresolved external symbol _luaL_newmetatable referenced in function _tolua_newmetatable
1>liblua.lib(tolua_event.obj) : error LNK2019: unresolved external symbol _lua_iscfunction referenced in function _class_index_event
1>liblua.lib(tolua_event.obj) : error LNK2019: unresolved external symbol _lua_tocfunction referenced in function _tolua_ismodulemetatable
1>liblua.lib(tolua_event.obj) : error LNK2019: unresolved external symbol _lua_call referenced in function _class_call_event
Add the liblua.lib and lua51.lib in the text field.
Project Properties -> Linker -> Input -> Additional Dependencies.
When you click in the field, you get a ... key. Click on this key and add one library name per line. Alternatively you can write the names in the field. Separate all entries with space characters.
verify that it's on the command line in
Project Properties -> Linker -> Comamnd Line.
I finally get it, in case anyone encounters a similar problem. To get lua to work with cocos2d-x, you need the following
add libluacocos2d project to your solution. (its found in [cocos2dx-root-folder]/cocos/scripting/lua-bindings/proj.win32/libluacocos2d.vcxproj)
Go to your project properties>Common Properties>References>click add New Reference and add the libluacocos2d
Go to your project properties>Configuration Properties>C/C++>General>Additional Include Directories and add these folders $(EngineRoot)cocos\scripting\lua-bindings\auto , $(EngineRoot)cocos\scripting\lua-bindings\manual , $(EngineRoot)external\lua\lua , $(EngineRoot)external\lua\tolua
Go to your project properties>Configuration Properties>C/C++>Preprocessor>Preprocessor Definitions and add _USRLUASTATIC or else you get errors like error LNK2019: unresolved external symbol "_declspec(dllimport) public: static class cocos2d::LuaEngine * __cdecl cocos2d::LuaEngine::getInstance(void)" (__imp?getInstance#LuaEngine#cocos2d##SAPAV12#XZ)
Go to your project properties>Configuration Properties>Linker>input>additional Dependencies and add lua51.lib
By now every thing should compile and work.My cocos2d setup is cocos2d-x 3.10, Android NDK r9b ,visual studio 2013, python 2.7, android sdk 19
Ps: I got the answer on a Chinese forum http://m.blog.csdn.net/j0903/article/details/73289291

VC++, linking error with wxWidgets, x64

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: unresolved external symbol "class wxPoint const wxDefaultPosition" (?wxDefaultPosition##3VwxPoint##B)
1>ConsoleDlg.obj : error LNK2001: unresolved external symbol "class wxPoint const wxDefaultPosition" (?wxDefaultPosition##3VwxPoint##B)
1>ControlDialog.obj : error LNK2019: unresolved external symbol "class wxPoint const wxDefaultPosition" (?wxDefaultPosition##3VwxPoint##B) referenced in function "public: void __cdecl ControlDialog::loadFile(class std::basic_string,class std::allocator >)" (?loadFile#ControlDialog##QEAAXV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std###Z)
1>WxWidgetsWindow.obj : error LNK2001: unresolved external symbol "class wxPoint const wxDefaultPosition" (?wxDefaultPosition##3VwxPoint##B)
1>MainFrame.obj : error LNK2001: unresolved external symbol "class wxPoint const wxDefaultPosition" (?wxDefaultPosition##3VwxPoint##B)
1>MainFrame.obj : error LNK2019: unresolved external symbol "public: static unsigned __int64 const wxStringBase::npos" (?npos#wxStringBase##2_KB) referenced in function "public: __cdecl MainFrame::MainFrame(class wxWindow *,class UIApp *)" (??0MainFrame##QEAA#PEAVwxWindow##PEAVUIApp###Z)
1>UIApp.obj : error LNK2001: unresolved external symbol "public: static unsigned __int64 const wxStringBase::npos" (?npos#wxStringBase##2_KB)
1>VISUI.obj : error LNK2001: unresolved external symbol "public: static unsigned __int64 const wxStringBase::npos" (?npos#wxStringBase##2_KB)
1>WelcomeDlg.obj : error LNK2001: unresolved external symbol "public: static unsigned __int64 const wxStringBase::npos" (?npos#wxStringBase##2_KB)
1>ConsoleDlg.obj : error LNK2001: unresolved external symbol "public: static unsigned __int64 const wxStringBase::npos" (?npos#wxStringBase##2_KB)
1>ControlDialog.obj : error LNK2001: unresolved external symbol "public: static unsigned __int64 const wxStringBase::npos" (?npos#wxStringBase##2_KB)
1>Helper.obj : error LNK2001: unresolved external symbol "public: static unsigned __int64 const wxStringBase::npos" (?npos#wxStringBase##2_KB)
1>WxWidgetsWindow.obj : error LNK2001: unresolved external symbol "public: static unsigned __int64 const wxStringBase::npos" (?npos#wxStringBase##2_KB)
1>MainFrame.obj : error LNK2001: unresolved external symbol "char const * const wxEmptyString" (?wxEmptyString##3PEBDEB)
1>UIApp.obj : error LNK2001: unresolved external symbol "char const * const wxEmptyString" (?wxEmptyString##3PEBDEB)
1>VISUI.obj : error LNK2001: unresolved external symbol "char const * const wxEmptyString" (?wxEmptyString##3PEBDEB)
1>WelcomeDlg.obj : error LNK2001: unresolved external symbol "char const * const wxEmptyString" (?wxEmptyString##3PEBDEB)
1>ConsoleDlg.obj : error LNK2001: unresolved external symbol "char const * const wxEmptyString" (?wxEmptyString##3PEBDEB)
1>ControlDialog.obj : error LNK2001: unresolved external symbol "char const * const wxEmptyString" (?wxEmptyString##3PEBDEB)
1>Helper.obj : error LNK2001: unresolved external symbol "char const * const wxEmptyString" (?wxEmptyString##3PEBDEB)
1>WxWidgetsWindow.obj : error LNK2001: unresolved external symbol "char const * const wxEmptyString" (?wxEmptyString##3PEBDEB)
1>ControlDialog.obj : error LNK2001: unresolved external symbol "class wxMBConvUTF8 & wxConvUTF8" (?wxConvUTF8##3AEAVwxMBConvUTF8##EA)
1>Helper.obj : error LNK2001: unresolved external symbol "class wxMBConvUTF8 & wxConvUTF8" (?wxConvUTF8##3AEAVwxMBConvUTF8##EA)
1>WxWidgetsWindow.obj : error LNK2001: unresolved external symbol "protected: static struct wxEventTable const wxGLCanvas::sm_eventTable" (?sm_eventTable#wxGLCanvas##1UwxEventTable##B)
1>WxWidgetsWindow.obj : error LNK2001: unresolved external symbol "char const * const wxFrameNameStr" (?wxFrameNameStr##3QBDB)
1>VISUI.obj : error LNK2001: unresolved external symbol "char const * const wxFrameNameStr" (?wxFrameNameStr##3QBDB)
1>WxWidgetsWindow.obj : error LNK2001: unresolved external symbol "class wxPalette wxNullPalette" (?wxNullPalette##3VwxPalette##A)
1>WxWidgetsWindow.obj : error LNK2001: unresolved external symbol "class wxCursor wxNullCursor" (?wxNullCursor##3VwxCursor##A)
1>WxWidgetsWindow.obj : error LNK2001: unresolved external symbol "int const wxEVT_NULL" (?wxEVT_NULL##3HB)
1>WxWidgetsWindow.obj : error LNK2001: unresolved external symbol "int const wxEVT_ERASE_BACKGROUND" (?wxEVT_ERASE_BACKGROUND##3HB)
1>WxWidgetsWindow.obj : error LNK2001: unresolved external symbol "int const wxEVT_PAINT" (?wxEVT_PAINT##3HB)
1>WxWidgetsWindow.obj : error LNK2001: unresolved external symbol "int const wxEVT_SIZE" (?wxEVT_SIZE##3HB)
1>WxWidgetsWindow.obj : error LNK2001: unresolved external symbol "int const wxEVT_IDLE" (?wxEVT_IDLE##3HB)
The libraries I'm linking against (64-bit wxwidgets libraries)
wxbase28.lib
wxmsw28_core.lib
wxmsw28_richtext.lib
wxmsw28_html.lib
wxmsw28_gl.lib
wxmsw28_adv.lib
comctl32.lib
Rpcrt4.lib
My compiling settings:
Treat Wchat_t as built in type: Yes
Multi-threaded Debug DLL
I found the solution to my own problem. Just post here in case anyone faces it.
It's not about x64 or x32, neither about wxWidgets. I just need to add these 2 lines in header (before #include <wx/wx.h>)
#define __WXMSW__
#define WXUSINGDLL
How did you build wxWidgets? My understanding is that you will have to change the Visual Studio projects files distributed with wxWidgets, so that it builds in 64-bit mode. Unless you are targeting 32-bit mode. So make sure that you are targeting the same architecture with both your application and wxWidgets (i.e. both should be either 32 or 64 bit).
Also, last I looked, wxWidgets 2.8 doesn't support x64, you will need to upgrade to wxWidgets 2.9 if you want to target x64.
You can also check out the following link: http://wiki.wxwidgets.org/Supporting_x64_and_Win32_within_one_solution
1>WelcomeDlg.obj : error LNK2001: unresolved external symbol "class wxPoint const wxDefaultPosition" (?wxDefaultPosition##3VwxPoint##B)
This is an extremely strange external symbol. What is 'class' doing there - it is a C++ keyword. What are all the spaces doing?
My guess is that something horrible happened during compilation. Are you certain you even submitted your source code to a C++ compiler?
Had the same problems on MSVC 2019 as described in the question when try to build from precompiled binaries downloaded from site.
When I compiled from source from ...\build\msw\wx_vc12.sln with "Release" option (NOT "Release DLL", but "Release") and get "vc_x64_lib" folder everything works. In my case no needs specify #define __WXMSW__ and #define WXUSINGDLL, just check you build with Multi-threaded DLL (/MD)