Results 1 to 12 of 12

Thread: Help in Installing Clanlib [Visual 2008]

  1. #1

    Default Help in Installing Clanlib [Visual 2008]

    Heh, I didn't really want to post this, because I feel kind of stupid asking for help on installing ClanLib. However, I've just struggled for four days trying to install it in Code::Blocks (which I gave up on). So I'm a little exhausted, and feeling kindof lazy now... don't feel like struggling anymore with this installation. So I'm just going to ask for help.

    I'm installing it using Visual C++ 2008 Express. Well, I installed libpng, libjpeg, and zlib, and linked them up with the IDE. I got as far as compiling the configure file, and going through the wizard. So, I got the ClanLib.sln

    Now, after loading up the .sln, I proceeded to try to compile clanCore. However, upon doing this, I got several errors, all having to do with not being able to open include files (such as dinput.h, SDL/SDL.h, dsound.h, etc).

    Anyone know what might be wrong?

  2. #2
    Administrator Seth's Avatar
    Join Date
    Jul 2002
    Location
    Japan
    Posts
    5,343

    Default

    You can ignore the sdl thing, the clanSDL target is no longer supported anyway.

    dsound.h and dinput.h (and the libs they require) are part of the directx SDK which you will need to download, unpack, and then add it's include/lib directories to your project settings so it will find them when you compile. You're almost there!
    Seth A. Robinson
    Robinson Technologies

  3. #3

    Default

    That'd probably be it; I never did download the DirectX SDK. I'll try that.

    Thanks!

    Edit: Yep, that fixed the rest of my problems.
    Last edited by AndrewFM; 10-27-2008 at 07:12 PM.

  4. #4
    ClanLib Developer
    Join Date
    Sep 2006
    Location
    Denmark
    Posts
    554

    Default

    Although this guide is for ClanLib 0.9 SVN and not the 0.8.x series, most of the stuff written there also apply to the older versions:

    http://clanlib.org/docs/clanlib-0.9....dows-msvc.html

  5. #5

    Default

    Alright, I have just one more problem.

    I get this error when actually successfully compiling:

    1>LINK : fatal error LNK1104: cannot open file 'zlib-static-mt-debug.lib'
    Upon further investigation, it seems that these are the lib files for zlib that I should have:

    • zlib-static-mt.lib
    • zlib-static-mt.pdb
    • zlib-static-mt-debug.lib
    • zlib-static-mt-debug.pdb
    • zlib-x64-static-mt.lib
    • zlib-x64-static-mt.pdb
    • zlib-x64-static-mt-debug.lib
    • zlib-x64-static-mt-debug.pdb


    However, when I downloaded the binaries for zlib, from zlib.net, the only lib it came with was zdll.lib

    Does anyone have a link as to where I can get the needed zlib libraries and includes that ClanLib requires?
    Last edited by AndrewFM; 10-27-2008 at 10:36 PM.

  6. #6

  7. #7

    Default

    Oh wow... how did I not see that on the download page -___-;

    I feel like an idiot now :P

    Edit: What the hell? Alright, I installed all the binaries, linked up all the include files and libraries with the IDE, went to build my project, and:

    Code:
    1>LIBCMTD.lib(stdexcpt.obj) : error LNK2005: "public: __thiscall std::exception::exception(void)" (??0exception@std@@QAE@XZ) already defined in MSVCRTD.lib(MSVCR90D.dll)
    1>LIBCMTD.lib(stdexcpt.obj) : error LNK2005: "public: __thiscall std::exception::exception(char const * const &)" (??0exception@std@@QAE@ABQBD@Z) already defined in MSVCRTD.lib(MSVCR90D.dll)
    1>LIBCMTD.lib(stdexcpt.obj) : error LNK2005: "public: __thiscall std::exception::exception(class std::exception const &)" (??0exception@std@@QAE@ABV01@@Z) already defined in MSVCRTD.lib(MSVCR90D.dll)
    1>LIBCMTD.lib(stdexcpt.obj) : error LNK2005: "public: virtual __thiscall std::exception::~exception(void)" (??1exception@std@@UAE@XZ) already defined in MSVCRTD.lib(MSVCR90D.dll)
    1>LIBCMTD.lib(stdexcpt.obj) : error LNK2005: "public: virtual char const * __thiscall std::exception::what(void)const " (?what@exception@std@@UBEPBDXZ) already defined in MSVCRTD.lib(MSVCR90D.dll)
    1>LIBCMTD.lib(stdexcpt.obj) : error LNK2005: "public: __thiscall std::bad_cast::bad_cast(char const *)" (??0bad_cast@std@@QAE@PBD@Z) already defined in MSVCRTD.lib(MSVCR90D.dll)
    1>LIBCMTD.lib(stdexcpt.obj) : error LNK2005: "public: __thiscall std::bad_cast::bad_cast(class std::bad_cast const &)" (??0bad_cast@std@@QAE@ABV01@@Z) already defined in MSVCRTD.lib(MSVCR90D.dll)
    1>LIBCMTD.lib(stdexcpt.obj) : error LNK2005: "public: virtual __thiscall std::bad_cast::~bad_cast(void)" (??1bad_cast@std@@UAE@XZ) already defined in MSVCRTD.lib(MSVCR90D.dll)
    1>LIBCMTD.lib(_file.obj) : error LNK2005: ___iob_func already defined in MSVCRTD.lib(MSVCR90D.dll)
    1>LIBCMTD.lib(tidtable.obj) : error LNK2005: __encode_pointer already defined in MSVCRTD.lib(MSVCR90D.dll)
    1>LIBCMTD.lib(tidtable.obj) : error LNK2005: __decode_pointer already defined in MSVCRTD.lib(MSVCR90D.dll)
    1>LIBCMTD.lib(_trnsctrl_.obj) : error LNK2005: ___CxxFrameHandler3 already defined in MSVCRTD.lib(MSVCR90D.dll)
    1>LIBCMTD.lib(hooks.obj) : error LNK2005: "void __cdecl terminate(void)" (?terminate@@YAXXZ) already defined in MSVCRTD.lib(MSVCR90D.dll)
    1>LIBCMTD.lib(typinfo.obj) : error LNK2005: "public: void __thiscall type_info::_type_info_dtor_internal_method(void)" (?_type_info_dtor_internal_method@type_info@@QAEXXZ) already defined in MSVCRTD.lib(MSVCR90D.dll)
    1>LIBCMTD.lib(typinfo.obj) : error LNK2005: "private: __thiscall type_info::type_info(class type_info const &)" (??0type_info@@AAE@ABV0@@Z) already defined in MSVCRTD.lib(ti_inst.obj)
    1>LIBCMTD.lib(typinfo.obj) : error LNK2005: "private: class type_info & __thiscall type_info::operator=(class type_info const &)" (??4type_info@@AAEAAV0@ABV0@@Z) already defined in MSVCRTD.lib(ti_inst.obj)
    1>LIBCMTD.lib(dbghook.obj) : error LNK2005: __crt_debugger_hook already defined in MSVCRTD.lib(MSVCR90D.dll)
    1>LIBCMTD.lib(invarg.obj) : error LNK2005: __invalid_parameter already defined in MSVCRTD.lib(MSVCR90D.dll)
    1>LIBCMTD.lib(lconv.obj) : error LNK2005: _localeconv already defined in MSVCRTD.lib(MSVCR90D.dll)
    1>LIBCMTD.lib(mlock.obj) : error LNK2005: __lock already defined in MSVCRTD.lib(MSVCR90D.dll)
    1>LIBCMTD.lib(mlock.obj) : error LNK2005: __unlock already defined in MSVCRTD.lib(MSVCR90D.dll)
    1>LIBCMTD.lib(sprintf.obj) : error LNK2005: _sprintf_s already defined in MSVCRTD.lib(MSVCR90D.dll)
    1>LIBCMTD.lib(atox.obj) : error LNK2005: _atoi already defined in MSVCRTD.lib(MSVCR90D.dll)
    1>LIBCMTD.lib(dbgrptw.obj) : error LNK2005: __CrtDbgReportW already defined in MSVCRTD.lib(MSVCR90D.dll)
    1>LIBCMTD.lib(tolower.obj) : error LNK2005: _tolower already defined in MSVCRTD.lib(MSVCR90D.dll)
    1>LINK : warning LNK4098: defaultlib 'MSVCRTD' conflicts with use of other libs; use /NODEFAULTLIB:library
    1>Test.obj : error LNK2028: unresolved token (0A0005EF) "public: virtual __thiscall AppCtrl::~AppCtrl(void)" (??1AppCtrl@@$$FUAE@XZ) referenced in function "void __clrcall `dynamic atexit destructor for 'app''(void)" (???__Fapp@@YMXXZ@?A0x2087b73d@@$$FYMXXZ)
    1>Test.obj : error LNK2028: unresolved token (0A0005FF) "public: __thiscall AppCtrl::AppCtrl(void)" (??0AppCtrl@@$$FQAE@XZ) referenced in function "void __clrcall `dynamic initializer for 'app''(void)" (???__Eapp@@YMXXZ@?A0x2087b73d@@$$FYMXXZ)
    1>Test.obj : error LNK2019: unresolved external symbol "public: __thiscall AppCtrl::AppCtrl(void)" (??0AppCtrl@@$$FQAE@XZ) referenced in function "void __clrcall `dynamic initializer for 'app''(void)" (???__Eapp@@YMXXZ@?A0x2087b73d@@$$FYMXXZ)
    1>Test.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall AppCtrl::~AppCtrl(void)" (??1AppCtrl@@$$FUAE@XZ) referenced in function "void __clrcall `dynamic atexit destructor for 'app''(void)" (???__Fapp@@YMXXZ@?A0x2087b73d@@$$FYMXXZ)
    1>clanCore-static-mt-debug.lib(init_win32.obj) : 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)
    1>clanCore-static-mt-debug.lib(init_win32.obj) : error LNK2019: unresolved external symbol __imp__TranslateMessage@4 referenced in function "public: virtual void __thiscall CL_Win32Event_Dispatcher::keep_alive(void)" (?keep_alive@CL_Win32Event_Dispatcher@@UAEXXZ)
    1>clanCore-static-mt-debug.lib(init_win32.obj) : error LNK2019: unresolved external symbol __imp__GetMessageA@16 referenced in function "public: virtual void __thiscall CL_Win32Event_Dispatcher::keep_alive(void)" (?keep_alive@CL_Win32Event_Dispatcher@@UAEXXZ)
    1>clanCore-static-mt-debug.lib(init_win32.obj) : 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)
    1>LIBCMTD.lib(crt0.obj) : error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup
    1>clanDisplay-static-mt-debug.lib(display_mode.obj) : error LNK2019: unresolved external symbol __imp__EnumDisplaySettingsA@12 referenced in function "public: static class std::vector<class CL_DisplayMode,class std::allocator<class CL_DisplayMode> > & __cdecl CL_DisplayMode::get_display_modes(void)" (?get_display_modes@CL_DisplayMode@@SAAAV?$vector@VCL_DisplayMode@@V?$allocator@VCL_DisplayMode@@@std@@@std@@XZ)
    1>D:\My Documents\Visual Studio 2008\Projects\Test\Debug\Test.exe : fatal error LNK1120: 10 unresolved externals
    ClanLib doesn't seem to like me...
    Last edited by AndrewFM; 10-27-2008 at 10:46 PM.

  8. #8
    Administrator Seth's Avatar
    Join Date
    Jul 2002
    Location
    Japan
    Posts
    5,343

    Default

    This happens when not all of your libs are compiled with the same run-time libraries.

    You can sort of force it to work anyway by setting up your project to ignore certain libs, so there won't be a conflict.

    Some info here.
    Seth A. Robinson
    Robinson Technologies

  9. #9

    Default

    Thanks, that resolved all the errors with the conflicting libraries

    However, I still have a few more errors about unresolved items. However, all the errors look similar, so I think this might be the last problem I'll have (hopefully!)

    Code:
    1>Test.obj : error LNK2028: unresolved token (0A0005EF) "public: virtual __thiscall AppCtrl::~AppCtrl(void)" (??1AppCtrl@@$$FUAE@XZ) referenced in function "void __clrcall `dynamic atexit destructor for 'app''(void)" (???__Fapp@@YMXXZ@?A0x2087b73d@@$$FYMXXZ)
    1>Test.obj : error LNK2028: unresolved token (0A0005FF) "public: __thiscall AppCtrl::AppCtrl(void)" (??0AppCtrl@@$$FQAE@XZ) referenced in function "void __clrcall `dynamic initializer for 'app''(void)" (???__Eapp@@YMXXZ@?A0x2087b73d@@$$FYMXXZ)
    1>MSVCMRTD.lib(mstartup.obj) : error LNK2020: unresolved token (0A000090) __native_vcclrit_reason
    1>MSVCMRTD.lib(mstartup.obj) : error LNK2020: unresolved token (0A000096) __native_startup_state
    1>MSVCMRTD.lib(mstartup.obj) : error LNK2020: unresolved token (0A0000E5) __native_startup_lock
    1>MSVCMRTD.lib(mstartup.obj) : error LNK2020: unresolved token (0A0000E6) __native_dllmain_reason
    1>MSVCMRTD.lib(ManagedMain.obj) : error LNK2028: unresolved token (0A000060) "extern "C" int * __cdecl __p__commode(void)" (?__p__commode@@$$J0YAPAHXZ) referenced in function "void __cdecl `anonymous namespace'::_common_init(void)" (?_common_init@?A0x1f9b0358@@$$FYAXXZ)
    1>MSVCMRTD.lib(ManagedMain.obj) : error LNK2028: unresolved token (0A000072) "extern "C" int * __cdecl __p__fmode(void)" (?__p__fmode@@$$J0YAPAHXZ) referenced in function "void __cdecl `anonymous namespace'::_common_init(void)" (?_common_init@?A0x1f9b0358@@$$FYAXXZ)
    1>MSVCMRTD.lib(ManagedMain.obj) : error LNK2028: unresolved token (0A00008A) "extern "C" int __cdecl __wgetmainargs(int *,wchar_t * * *,wchar_t * * *,int,struct _startupinfo *)" (?__wgetmainargs@@$$J0YAHPAHPAPAPA_W1HPAU_startupinfo@@@Z) referenced in function "int __clrcall mainCRTStartupStrArray(cli::array<class System::String ^ >^)" (?mainCRTStartupStrArray@@$$FYMHP$01AP$AAVString@System@@@Z)
    1>Test.obj : error LNK2019: unresolved external symbol "public: __thiscall AppCtrl::AppCtrl(void)" (??0AppCtrl@@$$FQAE@XZ) referenced in function "void __clrcall `dynamic initializer for 'app''(void)" (???__Eapp@@YMXXZ@?A0x2087b73d@@$$FYMXXZ)
    1>Test.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall AppCtrl::~AppCtrl(void)" (??1AppCtrl@@$$FUAE@XZ) referenced in function "void __clrcall `dynamic atexit destructor for 'app''(void)" (???__Fapp@@YMXXZ@?A0x2087b73d@@$$FYMXXZ)
    1>clanCore-static-mt-debug.lib(init_win32.obj) : 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)
    1>clanCore-static-mt-debug.lib(init_win32.obj) : error LNK2019: unresolved external symbol __imp__TranslateMessage@4 referenced in function "public: virtual void __thiscall CL_Win32Event_Dispatcher::keep_alive(void)" (?keep_alive@CL_Win32Event_Dispatcher@@UAEXXZ)
    1>clanCore-static-mt-debug.lib(init_win32.obj) : error LNK2019: unresolved external symbol __imp__GetMessageA@16 referenced in function "public: virtual void __thiscall CL_Win32Event_Dispatcher::keep_alive(void)" (?keep_alive@CL_Win32Event_Dispatcher@@UAEXXZ)
    1>clanCore-static-mt-debug.lib(init_win32.obj) : 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)
    1>MSVCMRTD.lib(mstartup.obj) : error LNK2001: unresolved external symbol ___native_dllmain_reason
    1>MSVCMRTD.lib(mstartup.obj) : error LNK2001: unresolved external symbol ___native_vcclrit_reason
    1>MSVCMRTD.lib(mstartup.obj) : error LNK2001: unresolved external symbol ___native_startup_state
    1>MSVCMRTD.lib(mstartup.obj) : error LNK2001: unresolved external symbol ___native_startup_lock
    1>MSVCMRTD.lib(ManagedMain.obj) : error LNK2019: unresolved external symbol "extern "C" int __cdecl __wgetmainargs(int *,wchar_t * * *,wchar_t * * *,int,struct _startupinfo *)" (?__wgetmainargs@@$$J0YAHPAHPAPAPA_W1HPAU_startupinfo@@@Z) referenced in function "int __clrcall mainCRTStartupStrArray(cli::array<class System::String ^ >^)" (?mainCRTStartupStrArray@@$$FYMHP$01AP$AAVString@System@@@Z)
    1>MSVCMRTD.lib(ManagedMain.obj) : error LNK2019: unresolved external symbol "extern "C" int * __cdecl __p__commode(void)" (?__p__commode@@$$J0YAPAHXZ) referenced in function "void __cdecl `anonymous namespace'::_common_init(void)" (?_common_init@?A0x1f9b0358@@$$FYAXXZ)
    1>MSVCMRTD.lib(ManagedMain.obj) : error LNK2019: unresolved external symbol "extern "C" int * __cdecl __p__fmode(void)" (?__p__fmode@@$$J0YAPAHXZ) referenced in function "void __cdecl `anonymous namespace'::_common_init(void)" (?_common_init@?A0x1f9b0358@@$$FYAXXZ)
    1>MSVCMRTD.lib(ManagedMain.obj) : error LNK2019: unresolved external symbol ___setusermatherr referenced in function "int __cdecl `anonymous namespace'::_mixed_pre_c_init(void)" (?_mixed_pre_c_init@?A0x1f9b0358@@YAHXZ)
    1>LIBCMTD.lib(crt0.obj) : error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup
    1>clanDisplay-static-mt-debug.lib(display_mode.obj) : error LNK2019: unresolved external symbol __imp__EnumDisplaySettingsA@12 referenced in function "public: static class std::vector<class CL_DisplayMode,class std::allocator<class CL_DisplayMode> > & __cdecl CL_DisplayMode::get_display_modes(void)" (?get_display_modes@CL_DisplayMode@@SAAAV?$vector@VCL_DisplayMode@@V?$allocator@VCL_DisplayMode@@@std@@@std@@XZ)
    1>D:\My Documents\Visual Studio 2008\Projects\Test\Debug\Test.exe : fatal error LNK1120: 25 unresolved externals

  10. #10

    Default

    I am brand new to C++, and programming at all, actually. I got a book for like $50 that's running me through a bunch of basic stuff, and just as I get to the interesting parts (actually being able to make something with graphics I can interact with), the author copped out with a single paragraph about installing ClanLib into my IDE...
    I have read the above posts and am sorry to say it's all just going over my head. Even the read_me files are kind of going over my head...
    I've got Code::blocks, and I've just finished downloading the DirectX SDK. The problem I'm having is with trying to compile the ClanLib info into a .lib file that I can refer to in my projects.
    Specifically, here's what I'm doing:
    I open the configure project in code::blocks, and I go into project/build options and I've added all the DirectX files in the link libraries.
    When I go to build it, it tells me;

    "Configure - Release" uses an invalid compiler. Skipping...
    Nothing to be done.

    I'm sure there's something obvious I should know to do, but it doesn't elaborate in my book and I'm getting really frustrated. I downloaded the Zlib, Png, and Jpeg library files from the download section of Clanlib.org, but I'm not sure what to do with them either, or even if I downloaded the right versions of them (I got, and extracted, the zip file versions).

    Please, in baby-steps, can anyone tell me what I'm missing and how to proceed?

  11. #11

    Default

    Alright, I played around with rebuilding ClanLib with different Runtime Libraries, and messed around with the /NODEFAULTLIB command some more, and I think I might finally be getting somewhere.

    Right now the only problem I seem to be having is files I am missing.

    If you look in the image below:



    I only have the "-mt-debug" library files for Clanlib. However, my program is looking for the "-mt" ones (no debug). I've built Clanlib using /MDd, and also with /MT. I'm not sure how to go about building it so that I get the "-mt" only files... any help?

    --------------------------------------

    @loki: Well, first thing you'll want to do is to forget about using Code::Blocks. Seriously, it's near impossible to get ClanLib to work using it. Download Visual C++ 2008 Express Edition. It's much easier to get ClanLib working in that.

    Other than that, you pretty much just have to download all the necessary files, and then follow the INSTALL.win32 step by step. After that, though, if you're like me, that's when you'll run into a billion problems. :P

    Oh, and if you have any additional problems, I'd recommend making your own topic. You'll have a much larger chance of getting helped if you ask a question in your own topic, rather than someone elses

  12. #12
    ClanLib Developer
    Join Date
    Sep 2006
    Location
    Denmark
    Posts
    554

    Default

    The reason you do not have any -mt versions of the libraries is because you only built the debug version of clanlib. If you go into the Build->Batch Build menu, you can build the release versions of the library.

    ClanLib uses the #pragma comment(lib, "filename.lib") instruction in the API headers (i.e. ClanLib/core.h) to inform the compiler which version it should link with. It determines this by looking at the _DEBUG define and the _M_X64 define. According to the compiler documentation the _DEBUG define is automatically set when you compile with /LDd, /MDd or /MTd. In other words, with one of the three debug C/C++ runtime libraries.

    Hope this helps a bit.

Similar Threads

  1. How To Configure IDE VisualC++ 2008 Express to Build ClanLib
    By THULE in forum Official ClanLib SDK Forums
    Replies: 2
    Last Post: 08-28-2008, 09:50 AM
  2. Installing ClanLib 0.8 and ClanLib 0.9 on linux
    By rombust in forum Official ClanLib SDK Forums
    Replies: 4
    Last Post: 07-15-2008, 09:51 AM
  3. Help ! Installing ClanLib ...
    By dzoni88 in forum Official ClanLib SDK Forums
    Replies: 1
    Last Post: 10-29-2007, 06:01 AM
  4. Replies: 0
    Last Post: 10-16-2007, 04:44 PM
  5. Help Installing clanlib
    By dgilla in forum Official ClanLib SDK Forums
    Replies: 5
    Last Post: 01-03-2007, 07:29 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
  •