I am new in OpenWRT and I need to crosscompile c++ program. The problem is, I am still getting this error:
error: 'to_string' is not a member of 'std'
"duplicate raw value " + std::to_string(it->first));
^
Now I know, it's problem, that there isn't used c++11 flag during compilation. I tried to add TARGET_CXXFLAGS into Makefile, but it didn't help me.
Here is the Makefile:
include $(TOPDIR)/rules.mk
PKG_NAME:=gateway
PKG_VERSION:=1.0
PKG_RELEASE:=2
INIT_SCRIPT_NAME:=$(PKG_NAME)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_PROTO:=git
PKG_BUILD_DEPENDS:=+libmosquittopp +poco +zmq +cppzmq +openzwave +cppunit +bluez-libs
PKG_SOURCE_URL:=....
PKG_SOURCE_VERSION:=...
CMAKE_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
CMAKE_OPTIONS += \
-DCMAKE_INSTALL_PREFIX=/ \
-DCMAKE_BUILD_TYPE:STRING=Release
TARGET_CXXFLAGS += -DPOCO_NO_FPENVIRONMENT
TARGET_CXXFLAGS += -g -std=c++11 -Wall -pedantic
....
Thank you for your advice, Jakub.
Aucun commentaire:
Enregistrer un commentaire