Http linux problem



  • Hi,

    my project work on osx and windows machine but when build it for a linux distribution (with proj.cmake) work everything until I try to call rest api. The problem is that:

    ox::spHttpRequestTask task = ox::HttpRequestTask::create();

    doesn't create spHttpRequestTask object.

    I work on Debian 8 for this build.

    I watch for libcurl installation and seems ok.

    Sorry for bad english.



  • The problem is that OX_HAVE_HTTP in CMakeList is set to 0 and then

    if (NOT OX_HAVE_HTTP)
    set(OX_DEFINITIONS ${OX_DEFINITIONS} -DOX_NO_HTTP)
    endif(NOT OX_HAVE_HTTP)

    and also in HttpRequestTask.cpp

    #if OX_NO_HTTP
    void HttpRequestTask::init() {}
    void HttpRequestTask::release() {}
    #endif

    If I set OX_HAVE_HTTP = 1 fail because OX_HAVE_LIBCURL = 0 and linker find no implementation.

    Some ideas?


  • administrators

    hi
    It is not workting because I haven't configured it for linux
    http://prntscr.com/o79lcd
    1 arrow - as you see there is not define for linux
    2 arrow - I used curl version included to oxygine, and only windows version included to oxygine



  • Thank you.

    I write simplest (dirty) solution I've found.

    Only on linux build machine:
    Force OX_HAVE_HTTP = 1 and OX_HAVE_LIBCURL = 1 in oxygine-framework CMakeFile

    Install latest stable dev curl version (in my case libcurl4-openssl-dev)

    Force library in CMAKE_CXX_FLAGS in CMakeList of my project -> -lcurl

    Work everything.


Log in to reply
 

Looks like your connection to Oxygine was lost, please wait while we try to reconnect.