PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Linker Error Building with Visual C++ 2005 Express

Is VS Express supported? I tried using Visual C++ 2005 Express on the ssamples (Plasma) and got the following linker errors. It seems I'm missing a lib declaration? Thanks.

Code:

1>------ Rebuild All started: Project: Plasma, Configuration: Debug Win32 ------
1>Deleting intermediate and output files for project 'Plasma', configuration 'Debug|Win32'
1>Compiling...
1>myapplication.cpp
1>PlasmaRoutine.cpp
1>GapiApplication.cpp
1>Generating Code...
1>Compiling resources...
1>Compiling manifest to resources...
1>Linking...
1>gapidraw.lib(GapiBitmapFont.obj) : MSIL .netmodule or module compiled with /GL found; restarting link with /LTCG; add /LTCG to the link command line to improve linker performance
1>LINK : warning LNK4075: ignoring '/INCREMENTAL' due to '/LTCG' specification
1>LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library
1>GapiApplication.obj : error LNK2001: unresolved external symbol __imp__DispatchMessageW@4
1>GapiApplication.obj : error LNK2001: unresolved external symbol __imp__TranslateMessage@4
1>GapiApplication.obj : error LNK2001: unresolved external symbol __imp__PeekMessageW@20
1>GapiApplication.obj : error LNK2001: unresolved external symbol __imp__UpdateWindow@4
1>GapiApplication.obj : error LNK2001: unresolved external symbol __imp__ShowWindow@8
1>GapiApplication.obj : error LNK2001: unresolved external symbol __imp__SetFocus@4
1>GapiApplication.obj : error LNK2001: unresolved external symbol __imp__MoveWindow@24
1>GapiApplication.obj : error LNK2001: unresolved external symbol __imp__GetWindowRect@8
1>gapidraw.lib(ddutil.obj) : error LNK2001: unresolved external symbol __imp__GetWindowRect@8
1>GapiApplication.obj : error LNK2001: unresolved external symbol __imp__CreateWindowExW@48
1>GapiApplication.obj : error LNK2001: unresolved external symbol __imp__RegisterClassW@4
1>GapiApplication.obj : error LNK2001: unresolved external symbol __imp__LoadCursorW@8
1>GapiApplication.obj : error LNK2001: unresolved external symbol __imp__LoadIconW@8
1>GapiApplication.obj : error LNK2001: unresolved external symbol __imp__DestroyWindow@4
1>GapiApplication.obj : error LNK2001: unresolved external symbol __imp__MessageBoxW@16
1>gapidraw.lib(GapiDisplayDDraw.obj) : error LNK2001: unresolved external symbol __imp__MessageBoxW@16
1>GapiApplication.obj : error LNK2001: unresolved external symbol __imp__DefWindowProcW@16
1>GapiApplication.obj : error LNK2001: unresolved external symbol __imp__PostMessageW@16
1>GapiApplication.obj : error LNK2001: unresolved external symbol __imp__SetCursor@4
1>GapiApplication.obj : error LNK2001: unresolved external symbol __imp__PostQuitMessage@4
1>GapiApplication.obj : error LNK2001: unresolved external symbol __imp__MsgWaitForMultipleObjects@20
1>GapiApplication.obj : error LNK2001: unresolved external symbol __imp__ScreenToClient@8
1>GapiApplication.obj : error LNK2001: unresolved external symbol __imp__GetCursorPos@4
1>gapidraw.lib(GapiSurface.obj) : error LNK2001: unresolved external symbol __imp__ReleaseDC@8
1>gapidraw.lib(GapiSurface.obj) : error LNK2001: unresolved external symbol __imp__SetRect@20
1>gapidraw.lib(GapiSurface.obj) : error LNK2001: unresolved external symbol __imp__CreateCompatibleDC@4
1>gapidraw.lib(GapiSurface.obj) : error LNK2001: unresolved external symbol __imp__GetDC@4
1>gapidraw.lib(GapiSurface.obj) : error LNK2001: unresolved external symbol __imp__SelectObject@8
1>gapidraw.lib(GapiSurface.obj) : error LNK2001: unresolved external symbol __imp__DeleteObject@4
1>gapidraw.lib(GapiSurface.obj) : error LNK2001: unresolved external symbol __imp__GdiFlush@0
1>gapidraw.lib(GapiSurface.obj) : error LNK2001: unresolved external symbol __imp__CreateDIBSection@24
1>gapidraw.lib(GapiSurface.obj) : error LNK2001: unresolved external symbol __imp__DeleteDC@4
1>gapidraw.lib(GapiDisplayDDraw.obj) : error LNK2001: unresolved external symbol __imp__IsWindow@4
1>gapidraw.lib(GapiDisplayDDraw.obj) : error LNK2001: unresolved external symbol __imp__GetClientRect@8
1>gapidraw.lib(GapiDisplayDDraw.obj) : error LNK2001: unresolved external symbol __imp__ClientToScreen@8
1>gapidraw.lib(ddutil.obj) : error LNK2001: unresolved external symbol __imp__TextOutW@20
1>gapidraw.lib(ddutil.obj) : error LNK2001: unresolved external symbol __imp__GetPixel@12
1>gapidraw.lib(ddutil.obj) : error LNK2001: unresolved external symbol __imp__GetSystemMetrics@4
1>gapidraw.lib(ddutil.obj) : error LNK2001: unresolved external symbol __imp__AdjustWindowRectEx@16
1>gapidraw.lib(ddutil.obj) : error LNK2001: unresolved external symbol __imp__GetObjectW@12
1>gapidraw.lib(ddutil.obj) : error LNK2001: unresolved external symbol __imp__SetWindowPos@28
1>gapidraw.lib(ddutil.obj) : error LNK2001: unresolved external symbol __imp__SetWindowLongW@12
1>gapidraw.lib(ddutil.obj) : error LNK2001: unresolved external symbol __imp__SystemParametersInfoW@16
1>gapidraw.lib(ddutil.obj) : error LNK2001: unresolved external symbol __imp__GetWindowLongW@8
1>gapidraw.lib(ddutil.obj) : error LNK2001: unresolved external symbol __imp__GetMenu@4
1>gapidraw.lib(ddutil.obj) : error LNK2001: unresolved external symbol __imp__SetPixel@16
1>gapidraw.lib(ddutil.obj) : error LNK2001: unresolved external symbol __imp__SetBkColor@8
1>gapidraw.lib(ddutil.obj) : error LNK2001: unresolved external symbol __imp__StretchBlt@44
1>gapidraw.lib(ddutil.obj) : error LNK2001: unresolved external symbol __imp__SetTextColor@8
1>gapidraw.lib(ddutil.obj) : error LNK2001: unresolved external symbol __imp__LoadImageW@24
1>gapidraw.lib(ddutil.obj) : error LNK2001: unresolved external symbol __imp__GetTextExtentPoint32W@16
1>gapidraw.lib(GapiImageLoaderWin32.obj) : error LNK2001: unresolved external symbol __imp__GetDeviceCaps@8
1>gapidraw.lib(GapiImageLoaderWin32.obj) : error LNK2001: unresolved external symbol __imp__BitBlt@36
1>C:\Documents and Settings\tmyaing\My Documents\Visual Studio 2005\Projects\GapiDraw\samples\win32\Plasma\vs2005-pc\Debug\Plasma.exe : fatal error LNK1120: 51 unresolved externals
1>Build log was saved at "file://c:\Documents and Settings\tmyaing\My Documents\Visual Studio 2005\Projects\GapiDraw\samples\win32\Plasma\vs2005-pc\Debug\BuildLog.htm"
1>Plasma - 54 error(s), 2 warning(s)
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
Hello,

Please check:
http://msdn.microsoft.com/vstudio/products/compare/

"Mobile Device Support" is not supported by Visual Studio 2005 Express. You need at least the standard edition to do so.

Sincerely
Johan
Thanks Johan.

I played around with VS Express a bit more and I was able to get it to compile the PC version of the samples. You'll get a lot of warnings, but it does build and run.

You'll need access to the following two lib files:

    User32.lib
    Gdi32.lib


1. Specify the path to the lib files in Tools, Options, Project and Solutions, VC++ Directories, Library Files

2. Add the lib files to the Additional Dependencies in Project, Properties, Configuration Properties, Linker, Input

It might not be useful for most people since you can't do any mobile development using VS Express, but perhaps someone might find it helpful.