Coder Social home page Coder Social logo

Comments (5)

fpagliughi avatar fpagliughi commented on August 18, 2024

Hi. Can you copy and paste the full output of the build? I can't tell from just this.
Also, have you considered upgrading the compiler? gcc4.9 is nearly 10years old.

from paho.mqtt.cpp.

wangwenqiangGitHub avatar wangwenqiangGitHub commented on August 18, 2024

cmake -Bbuild -DPAHO_ENABLE_TESTING=OFF -DPAHO_BUILD_STATIC=ON -DPAHO_WITH_SSL=OFF -DPAHO_HIGH_PERFORMANCE=ON -DCMAKE_INSTALL_PREFIX=./OUT -DPAHO_MQTT_C_LIBRARIES=../paho.mqtt.c-1.3.13/build/OUT/lib -DPAHO_MQTT_C_INCLUDE_DIRS=../paho.mqtt.c-1.3.13/build/OUT/include
-- The CXX compiler identification is GNU 4.9.4
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /mnt/d/code/r14_ltev2x_app/build/toolchain/gcc-4.9-2016.02-x86_64_arm-linux-gnueabi/bin/arm-linux-gnueabi-g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PahoMqttC: /mnt/d/mqtt_build/paho.mqtt.c-1.3.13/build/OUT/include
-- Paho C Headers: /mnt/d/mqtt_build/paho.mqtt.c-1.3.13/build/OUT/include
-- Paho C Library: /mnt/d/mqtt_build/paho.mqtt.c-1.3.13/build/OUT/lib
-- Looking for C++ include pthread.h
-- Looking for C++ include pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - yes
-- Found Threads: TRUE
-- Configuring done
-- Generating done
CMake Warning:
Manually-specified variables were not used by the project:

PAHO_ENABLE_TESTING
PAHO_HIGH_PERFORMANCE

-- Build files have been written to: /mnt/d/mqtt_build/paho.mqtt.cpp-1.3.2/build

cmake --build build
[ 5%] Building CXX object src/CMakeFiles/paho-cpp-objs.dir/async_client.cpp.o
In file included from /mnt/d/mqtt_build/paho.mqtt.cpp-1.3.2/src/mqtt/iasync_client.h:34:0,
from /mnt/d/mqtt_build/paho.mqtt.cpp-1.3.2/src/mqtt/async_client.h:41,
from /mnt/d/mqtt_build/paho.mqtt.cpp-1.3.2/src/async_client.cpp:20:
/mnt/d/mqtt_build/paho.mqtt.cpp-1.3.2/src/mqtt/disconnect_options.h: In constructor 'mqtt::disconnect_options::disconnect_options(const MQTTAsync_disconnectOptions&)':
/mnt/d/mqtt_build/paho.mqtt.cpp-1.3.2/src/mqtt/disconnect_options.h:68:76: error: cannot convert 'const MQTTAsync_disconnectOptions' to 'char' in initialization
disconnect_options(const MQTTAsync_disconnectOptions& copts) : opts_{copts} {}
^
/mnt/d/mqtt_build/paho.mqtt.cpp-1.3.2/src/mqtt/disconnect_options.h:68:76: warning: missing initializer for member 'MQTTAsync_disconnectOptions::struct_version' [-Wmissing-field-initializers]
/mnt/d/mqtt_build/paho.mqtt.cpp-1.3.2/src/mqtt/disconnect_options.h:68:76: warning: missing initializer for member 'MQTTAsync_disconnectOptions::timeout' [-Wmissing-field-initializers]
/mnt/d/mqtt_build/paho.mqtt.cpp-1.3.2/src/mqtt/disconnect_options.h:68:76: warning: missing initializer for member 'MQTTAsync_disconnectOptions::onSuccess' [-Wmissing-field-initializers]
/mnt/d/mqtt_build/paho.mqtt.cpp-1.3.2/src/mqtt/disconnect_options.h:68:76: warning: missing initializer for member 'MQTTAsync_disconnectOptions::onFailure' [-Wmissing-field-initializers]
/mnt/d/mqtt_build/paho.mqtt.cpp-1.3.2/src/mqtt/disconnect_options.h:68:76: warning: missing initializer for member 'MQTTAsync_disconnectOptions::context' [-Wmissing-field-initializers]
/mnt/d/mqtt_build/paho.mqtt.cpp-1.3.2/src/mqtt/disconnect_options.h:68:76: warning: missing initializer for member 'MQTTAsync_disconnectOptions::properties' [-Wmissing-field-initializers]
/mnt/d/mqtt_build/paho.mqtt.cpp-1.3.2/src/mqtt/disconnect_options.h:68:76: warning: missing initializer for member 'MQTTAsync_disconnectOptions::reasonCode' [-Wmissing-field-initializers]
/mnt/d/mqtt_build/paho.mqtt.cpp-1.3.2/src/mqtt/disconnect_options.h:68:76: warning: missing initializer for member 'MQTTAsync_disconnectOptions::onSuccess5' [-Wmissing-field-initializers]
/mnt/d/mqtt_build/paho.mqtt.cpp-1.3.2/src/mqtt/disconnect_options.h:68:76: warning: missing initializer for member 'MQTTAsync_disconnectOptions::onFailure5' [-Wmissing-field-initializers]
make[2]: *** [src/CMakeFiles/paho-cpp-objs.dir/build.make:76: src/CMakeFiles/paho-cpp-objs.dir/async_client.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:137: src/CMakeFiles/paho-cpp-objs.dir/all] Error 2
make: *** [Makefile:156: all] Error 2

from paho.mqtt.cpp.

wangwenqiangGitHub avatar wangwenqiangGitHub commented on August 18, 2024

Hi. Can you copy and paste the full output of the build? I can't tell from just this.
Also, have you considered upgrading the compiler? gcc4.9 is nearly 10years old.
Hi,this is error ,thanks

from paho.mqtt.cpp.

fpagliughi avatar fpagliughi commented on August 18, 2024

I tried to build a (native) gcc-4.9 for my system, but apparently the older gcc compilers can't be built by the latest versions?!?

As I recall, v4.9 had good C++11 coverage, so I thought it would be able to build the library. I think I was using v4.8 when I first wrote it.

Did it work with a newer compiler?

from paho.mqtt.cpp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.