Results 1 to 5 of 5

Thread: Linking errors with VC++ Express 2005

  1. #1

    Default Linking errors with VC++ Express 2005

    I've download and built ClanLib 0.8 following the instructions in INSTALL.win32. Now when I try to build a simple app I get a ton of linking errors like these:

    Error 1 error LNK2019: unresolved external symbol __imp__DispatchMessageA@4 referenced in function "public: virtual void __thiscall CL_Win32Event_Dispatcher::keep_alive(void)" (?keep_alive@CL_Win32Event_Dispatcher@@UAEXXZ) in clanCore-static-mt-debug.lib

    Error 4 error LNK2019: unresolved external symbol __imp__PeekMessageA@20 referenced in function "public: virtual void __thiscall CL_Win32Event_Dispatcher::keep_alive(void)" (?keep_alive@CL_Win32Event_Dispatcher@@UAEXXZ) in clanCore-static-mt-debug.lib

    Error 8 error LNK2019: unresolved external symbol __imp__DeleteObject@4 referenced in function "public: virtual class CL_Font_Target * __thiscall CL_OpenGLTarget::create_system_font_target(class CL_Font_Generic *,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,int,int,bool,bool,bool,bool)" (?create_system_font_target@CL_OpenGLTarget@@UAEPA VCL_Font_Target@@PAVCL_Font_Generic@@ABV?$basic_st ring@DU?$char_traits@D@std@@V?$allocator@D@2@@std@ @1HH_N222@Z) in clanGL-static-mt-debug.lib

    What am I doing wrong?
    TIA!

  2. #2

    Default

    Your project may be the wrong kind of application. Here is what you need to do to make a Win32 application.
    Quote Originally Posted by http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/
    In Visual C++ Express, the Win32 Windows Application type is disabled in the Win32 Application Wizard. To enable that type, you need to edit the file AppSettings.htm file located in the folder "%ProgramFiles%\Microsoft Visual Studio 8\VC\VCWizards\AppWiz\Generic\Application\html\103 3\".

    In a text editor comment out lines 441 - 444 by putting a // in front of them as shown here:

    // WIN_APP.disabled = true;
    // WIN_APP_LABEL.disabled = true;
    // DLL_APP.disabled = true;
    // DLL_APP_LABEL.disabled = true;

    Save and close the file and open Visual C++ Express.

    From the File menu, click New Project. In the New Project dialog box, expand the Visual C++ node in the Product Types tree and then click Win32. Click on the Win32 Console Application template and then give your project a name and click OK. In the Win32 Application Wizard dialog box, make sure that Windows application is selected as the Application type and the ATL is not selected. Click the Finish button to generate the project.
    Emphasis is mine. Don't be fooled by the lack of "Win32 Application" in the New Project window -- select Win32 Console Application, and THEN in the following window select Win32 Application.

  3. #3

    Default

    That worked. Thanks! BTW, why is the installation process so complex? Why not simply provide a zip file with pre-built libs, DLLs, and include files like many other projects do (SDL for instance)?

  4. #4

    Default

    I get the same errors like you, but I'm trying to compile an example, so it must be the right application type. Can someone tell me what's wrong there?

  5. #5

    Default

    Finally I discovered what the problem was. For all those who still have problems with the linker: check if you have entered in the linker-options of project-settings the additional libs user32.lib gdi32.lib and ole32.lib they are needed for the examples.

Similar Threads

  1. Help! linking error
    By thfai2000 in forum Official ClanLib SDK Forums
    Replies: 4
    Last Post: 10-30-2008, 04:30 AM
  2. Anyone using Microsoft Visual Studio Express with Clanlib?
    By killarkai in forum Official ClanLib SDK Forums
    Replies: 9
    Last Post: 12-24-2006, 03:16 PM
  3. i_my_id errors
    By in forum Funeral Quest
    Replies: 3
    Last Post: 11-26-2003, 02:04 AM
  4. Windsock Errors
    By Tobin in forum Funeral Quest
    Replies: 4
    Last Post: 04-19-2003, 07:21 PM
  5. FQ errors
    By in forum Funeral Quest
    Replies: 3
    Last Post: 08-29-2002, 02:21 PM

Bookmarks

Bookmarks

Posting Permissions

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