Results 1 to 6 of 6

Thread: clanlib & codeblock on windows

  1. #1

    Default clanlib & codeblock on windows

    i've success compile clanlib by vs2010 express.
    i've also added *.lib which built by vs2010 to codeblocks environment as i do on linux.
    but:
    D:\WORK\first\main.cpp|17|undefined reference to `clan::SetupCore::SetupCore()'|
    ... ...

    #define WIN32

    #include <ClanLib/core.h>
    #include <ClanLib/application.h>
    using namespace clan;
    class ConsoleProgram
    {
    public:
    static int main(const std::vector<std::string> &args);
    };
    // Create global application object:
    // You MUST include this line or the application start-up will fail to
    // locate your console application object.
    Application app(&ConsoleProgram::main);
    int ConsoleProgram::main(const std::vector<std::string> &args) // Setup clanCore:
    {
    SetupCore setup_core;
    // Create a console Window if one does not exist:
    ConsoleWindow console_window("Console");
    // Write a line to the console:
    Console::write_line("Hello World!");
    // Wait for a key so the window won't close immediately.
    Console::wait_for_key();
    return 0;
    }

  2. #2
    ClanLib Developer
    Join Date
    May 2007
    Posts
    1,824

    Default

    I'm not sure why you are using Visual Studio 2010 Express.

    Try http://www.visualstudio.com/en-us/ne...munity-vs.aspx "Visual Studio Community 2013"

  3. #3

    Default

    use vs 2013 cannot compile


    1>------ Build started: Project: Core, Configuration: DebugMT Win32 ------
    1> tls_client_impl.cpp
    1> work_queue.cpp
    1>..\Sources\Core\Crypto\tls_client_impl.cpp(92): error C2039: 'min' : is not a member of 'std'
    1>..\Sources\Core\Crypto\tls_client_impl.cpp(92): error C3861: 'min': identifier not found
    1>..\Sources\Core\Crypto\tls_client_impl.cpp(109) : error C2039: 'min' : is not a member of 'std'
    1>..\Sources\Core\Crypto\tls_client_impl.cpp(109) : error C3861: 'min': identifier not found
    1>..\Sources\Core\Crypto\tls_client_impl.cpp(223) : error C2039: 'min' : is not a member of 'std'
    1>..\Sources\Core\Crypto\tls_client_impl.cpp(223) : error C3861: 'min': identifier not found
    1>..\Sources\Core\System\work_queue.cpp(141): error C2039: 'max' : is not a member of 'std'
    1>..\Sources\Core\System\work_queue.cpp(141): error C3861: 'max': identifier not found
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

  4. #4
    ClanLib Developer
    Join Date
    May 2007
    Posts
    1,824

    Default

    If I remember correctly, use cl_min instead. You may need to also include another clanlib header.

  5. #5

    Default

    ClanLib 3.0 compiles on VC2013

    With minimal changes to boot;

    Add #include <algorithm> to;
    tls_client_impl.cpp (Core)
    work_queue.cpp (Core)
    input_device_provider_win32hid.cpp (Display)
    iodevice_provider_tls_connection.cpp (Network)
    gui_css_used_values.h (GUI)

    This fixes missing min/max declarations.


    Quote Originally Posted by creatxr View Post
    use vs 2013 cannot compile


    1>------ Build started: Project: Core, Configuration: DebugMT Win32 ------
    1> tls_client_impl.cpp
    1> work_queue.cpp
    1>..\Sources\Core\Crypto\tls_client_impl.cpp(92): error C2039: 'min' : is not a member of 'std'
    1>..\Sources\Core\Crypto\tls_client_impl.cpp(92): error C3861: 'min': identifier not found
    1>..\Sources\Core\Crypto\tls_client_impl.cpp(109) : error C2039: 'min' : is not a member of 'std'
    1>..\Sources\Core\Crypto\tls_client_impl.cpp(109) : error C3861: 'min': identifier not found
    1>..\Sources\Core\Crypto\tls_client_impl.cpp(223) : error C2039: 'min' : is not a member of 'std'
    1>..\Sources\Core\Crypto\tls_client_impl.cpp(223) : error C3861: 'min': identifier not found
    1>..\Sources\Core\System\work_queue.cpp(141): error C2039: 'max' : is not a member of 'std'
    1>..\Sources\Core\System\work_queue.cpp(141): error C3861: 'max': identifier not found
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

  6. #6

    Default

    but, i still cannot use the libs in codeblocks & mingw.

    i've change tools->options->debugging->general->Use Managed Compatibility Mode

Similar Threads

  1. ClanLib 2.3.7 and MinGW on Windows
    By Veitikka in forum Official ClanLib SDK Forums
    Replies: 3
    Last Post: 07-11-2014, 06:00 PM
  2. ClanLib with Windows and Eclipse
    By Nutomic in forum Official ClanLib SDK Forums
    Replies: 0
    Last Post: 07-02-2012, 06:10 PM
  3. X windows inside a sdl/clanlib window
    By l3thal in forum Official ClanLib SDK Forums
    Replies: 2
    Last Post: 12-26-2009, 08:47 PM
  4. ClanLib 2.0 and Windows 7?
    By Sir Smashy in forum Official ClanLib SDK Forums
    Replies: 2
    Last Post: 09-12-2009, 09:47 AM
  5. using clanlib on windows CE?
    By babyvegas in forum Official ClanLib SDK Forums
    Replies: 0
    Last Post: 07-22-2008, 08:44 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
  •