libQtShadowsocks compilation issue



  • Hello guys

    I am not a big pro so need a little help from the comunity with compiling libQtShadowsocks

    I am already getting through QT installation and configuration and succefull cmake and than I stucked with project build.

    Here is the lib I try to build https://github.com/shadowsocks/libQtShadowsocks/tree/master/lib

    My system is Windows 8, QTCreator 4.4.1

    Whyle building the lib I got the following errors:

    Here are the errors:

    C:\QTProjects\libQtShadowsocks-2.0.0beta\lib\cipher.cpp:153: error: C2440: 'reinterpret_cast': cannot convert from 'std::_Vector_iterator<std::_Vector_val<std::_Simple_types>>' to 'const char *'
    
    C:\QTProjects\libQtShadowsocks-2.0.0beta\lib\cipher.cpp:154: error: C2440: '': cannot convert from 'unsigned int' to 'std::string'
    
    C:\QTProjects\libQtShadowsocks-2.0.0beta\lib\cipher.cpp:176: error: C2440: 'reinterpret_cast': cannot convert from 'std::_Vector_iterator<std::_Vector_val<std::_Simple_types>>' to 'const char *'
    
    C:\QTProjects\libQtShadowsocks-2.0.0beta\lib\cipher.cpp:176: error: C2440: '': cannot convert from 'unsigned int' to 'std::string'
    
    C:\QTProjects\libQtShadowsocks-2.0.0beta\lib\cipher.cpp:192: error: C2440: 'reinterpret_cast': cannot convert from 'std::_Vector_iterator<std::_Vector_val<std::_Simple_types>>' to 'const char *'
    
    C:\QTProjects\libQtShadowsocks-2.0.0beta\lib\cipher.cpp:192: error: C2440: '': cannot convert from 'unsigned int' to 'std::string'
    
    Also I have some warnings like
    
    C:\QTProjects\libQtShadowsocks-2.0.0beta\lib\address.cpp:34: warning: C4273: 'QSS::Address::Address': inconsistent dll linkage
    
    C:\QTProjects\libQtShadowsocks-2.0.0beta\lib\address.cpp:40: warning: C4273: 'QSS::Address::Address': inconsistent dll linkage
    

    alt text

    Can somebody point me out what I'm doing wrong. Thanks a lot.


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    What version of Qt are you using ?
    What compiler ? Guessing MSVC but which one if it's the case ?



  • Hi SGaist

    QT 5.9.2 and MSVC 14

    0_1511391027848_c7268cdf-0a81-4161-85f5-12f0d8b96cd1-image.png


  • Qt Champions 2017

    Hi
    Did you give visual studio 2015 all service packs it can get ?
    The library you are trying to use demand c++14 and you should be running update 3 in the hope
    all needed 14 features are in fact supported.

    https://stackoverflow.com/questions/41308933/how-to-enable-c17-compiling-in-visual-studio



  • Hi mrjj

    My current vc version is 14.0.25431.01 Update 3

    Anyway I will try with vc 2017, thanks

    0_1511391771764_d37a17a4-d1ac-4b05-8187-cb0167b82847-image.png



  • That the answer from the official github thread

    https://github.com/shadowsocks/libQtShadowsocks/issues/151

    So the topic is solved. Thank you all.


Log in to reply
 

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