CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: Wont compile

  1. #1
    Join Date
    Feb 2010
    Posts
    112

    Wont compile

    I have winmain app:

    int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)

    these headers are included:

    #include <windows.h>
    #include <windowsx.h>
    #include <commctrl.h>
    #include <time.h>
    #include <cstdlib>
    #include "resource.h"

    and I have this error:

    Error 1 error LNK2019: unresolved external symbol __imp__InitCommonControls@0 referenced in function "int __stdcall DlgProc(struct HWND__ *,unsigned int,unsigned int,long)" (?DlgProc@@YGHPAUHWND__@@IIJ@Z) main.obj project9

  2. #2
    Join Date
    Feb 2005
    Posts
    2,160

    Re: Wont compile

    Add comctl32.lib to your linker libs.

  3. #3
    Join Date
    Feb 2010
    Posts
    112

    Re: Wont compile

    And I forgot to say Im using MSVC++ 2008 and I think code is ok but some linker/compiler setting needs adjustment.

  4. #4
    Join Date
    Feb 2010
    Posts
    112

    Re: Wont compile

    Thread solved in 5 minutes.

    You are the best!!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured