Giter Site home page Giter Site logo

Comments (4)

wqking avatar wqking commented on May 26, 2024

What's the error message? Is it a linking error or compiling error? It sounds like a compiling error if uint_64t is not defined on your platform.
Adding flags is ugly, I will find better way to handle it, but please give me the error message first.

from eventpp.

mangrooveforest avatar mangrooveforest commented on May 26, 2024

The entire error looks like

Linking .pio/build/esp32dev/firmware.elf
GNU ld (crosstool-NG crosstool-ng-1.22.0-80-g6c4433a) 2.25.1
.pio/build/esp32dev/src/main.o:(.literal._ZN7eventpp9internal_16CallbackListBaseIFvRK5EventE13EventPoliciesE14getNextCounterEv[eventpp::internal_::CallbackListBase<void (Event const&), EventPolicies>::getNextCounter()]+0x8): undefined reference to `__atomic_fetch_add_8'
  Supported emulations:
.pio/build/esp32dev/src/main.o:(.literal._ZNK7eventpp9internal_16CallbackListBaseIFvRK5EventE13EventPoliciesE11doForEachIfIZNKS7_9forEachIfIZNKS7_clES4_EUlRSt8functionIS5_EE_EEbOT_EUlRSt10shared_ptrINS7_4NodeEEE_EEbSF_[bool eventpp::internal_::CallbackListBase<void (Event const&), EventPolicies>::doForEachIf<bool eventpp::internal_::CallbackListBase<void (Event const&), EventPolicies>::forEachIf<eventpp::internal_::CallbackListBase<void (Event const&), EventPolicies>::operator()(Event const&) const::{lambda(std::function<void (Event const&)>&)#1}>(eventpp::internal_::CallbackListBase<void (Event const&), EventPolicies>::operator()(Event const&) const::{lambda(std::function<void (Event const&)>&)#1}&&) const::{lambda(std::shared_ptr<eventpp::internal_::CallbackListBase<void (Event const&), EventPolicies>::Node>&)#1}>(bool eventpp::internal_::CallbackListBase<void (Event const&), EventPolicies>::forEachIf<eventpp::internal_::CallbackListBase<void (Event const&), EventPolicies>::operator()(Event const&) con   elf32xtensa
st::{lambda(std::function<void (Event const&)>&)#1}>(eventpp::internal_::CallbackListBase<void (Event const&), EventPolicies>::operator()(Event const&) const::{lambda(std::function<void (Event const&)>&)#1}&&) const::{lambda(std::shared_ptr<eventpp::internal_::CallbackListBase<void (Event const&), EventPolicies>::Node>&)#1}) const]+0x0): undefined reference to `__atomic_load_8'
.pio/build/esp32dev/src/main.o: In function `eventpp::internal_::CallbackListBase<void (Event const&), EventPolicies>::getNextCounter()':
main.cpp:(.text._ZN7eventpp9internal_16CallbackListBaseIFvRK5EventE13EventPoliciesE14getNextCounterEv[eventpp::internal_::CallbackListBase<void (Event const&), EventPolicies>::getNextCounter()]+0x10): undefined reference to `__atomic_fetch_add_8'
main.cpp:(.text._ZN7eventpp9internal_16CallbackListBaseIFvRK5EventE13EventPoliciesE14getNextCounterEv[eventpp::internal_::CallbackListBase<void (Event const&), EventPolicies>::getNextCounter()]+0x82): undefined reference to `__atomic_fetch_add_8'
.pio/build/esp32dev/src/main.o: In function `bool eventpp::internal_::CallbackListBase<void (Event const&), EventPolicies>::doForEachIf<bool eventpp::internal_::CallbackListBase<void (Event const&), EventPolicies>::forEachIf<eventpp::internal_::CallbackListBase<void (Event const&), EventPolicies>::operator()(Event const&) const::{lambda(std::function<void (Event const&)>&)#1}>(eventpp::internal_::CallbackListBase<void (Event const&), EventPolicies>::operator()(Event const&) const::{lambda(std::function<void (Event const&)>&)#1}&&) const::{lambda(std::shared_ptr<eventpp::internal_::CallbackListBase<void (Event const&), EventPolicies>::Node>&)#1}>(bool eventpp::internal_::CallbackListBase<void (Event const&), EventPolicies>::forEachIf<eventpp::internal_::CallbackListBase<void (Event const&), EventPolicies>::operator()(Event const&) const::{lambda(std::function<void (Event const&)>&)#1}>(eventpp::internal_::CallbackListBase<void (Event const&), EventPolicies>::operator()(Event const&) const::{lambda(std::function<void (Event const&)>&)#1}&&) const::{lambda(std::shared_ptr<eventpp::internal_::CallbackListBase<void (Event const&), EventPolicies>::Node>&)#1}) const':
main.cpp:(.text._ZNK7eventpp9internal_16CallbackListBaseIFvRK5EventE13EventPoliciesE11doForEachIfIZNKS7_9forEachIfIZNKS7_clES4_EUlRSt8functionIS5_EE_EEbOT_EUlRSt10shared_ptrINS7_4NodeEEE_EEbSF_[bool eventpp::internal_::CallbackListBase<void (Event const&), EventPolicies>::doForEachIf<bool eventpp::internal_::CallbackListBase<void (Event const&), EventPolicies>::forEachIf<eventpp::internal_::CallbackListBase<void (Event const&), EventPolicies>::operator()(Event const&) const::{lambda(std::function<void (Event const&)>&)#1}>(eventpp::internal_::CallbackListBase<void (Event const&), EventPolicies>::operator()(Event const&) const::{lambda(std::function<void (Event const&)>&)#1}&&) const::{lambda(std::shared_ptr<eventpp::internal_::CallbackListBase<void (Event const&), EventPolicies>::Node>&)#1}>(bool eventpp::internal_::CallbackListBase<void (Event const&), EventPolicies>::forEachIf<eventpp::internal_::CallbackListBase<void (Event const&), EventPolicies>::operator()(Event const&) const::{lambda(std::function<void (Event const&)>&)#1}>(eventpp::internal_::CallbackListBase<void (Event const&), EventPolicies>::operator()(Event const&) const::{lambda(std::function<void (Event const&)>&)#1}&&) const::{lambda(std::shared_ptr<eventpp::internal_::CallbackListBase<void (Event const&), EventPolicies>::Node>&)#1}) const]+0x26): undefined reference to `__atomic_load_8'
collect2: error: ld returned 1 exit status
*** [.pio/build/esp32dev/firmware.elf] Error 1

from eventpp.

wqking avatar wqking commented on May 26, 2024

Thanks for the error message.
It's not that uint_64t is not defined, but your std::atomic doesn't support uint_64t.
I will try to see how to fix it.
Now it's fine that you change it to uint_32t, it's safe.
And since you are on ESP32, if you are sure you don't use multithread, you can also use SingleThreading as the threading policy, that wil not cause linker error.

from eventpp.

wqking avatar wqking commented on May 26, 2024

Fixed

from eventpp.

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.