/usr/include/newlib/c++/10.3.1/arm-none-eabi/thumb/v6-m/nofp/bits/ctype_base.h:44:35: error: '_U' was not declared in this scope; did you me
by oti from LinuxQuestions.org on (#6FYV9)
Hi
This problem I am getting on Ubuntu 22.04.3as well as on Raspberry PI OS Full (64-bit). Generally I am able to build, but I have a c++ program, where I need CURL for easy internet file access. I have therefore successfully installed libcurl4-openssl-dev.
But when I am building with CMAKE, I am getting these funny messages:
Consolidate compiler generated dependencies of target itest
[ 11%] Building CXX object CMakeFiles/itest.dir/itest.cpp.obj
In file included from /usr/include/newlib/c++/10.3.1/bits/locale_facets.h:41,
from /usr/include/newlib/c++/10.3.1/bits/basic_ios.h:37,
from /usr/include/newlib/c++/10.3.1/ios:44,
from /usr/include/newlib/c++/10.3.1/ostream:38,
from /usr/include/newlib/c++/10.3.1/iostream:39,
from /home/oti/pico/itest/itest.cpp:1:
/usr/include/newlib/c++/10.3.1/arm-none-eabi/thumb/v6-m/nofp/bits/ctype_base.h:44:35: error: '_U' was not declared in this scope; did you mean '_u'?
44 | static const mask upper = _U;
| ^~
| _u
/usr/include/newlib/c++/10.3.1/arm-none-eabi/thumb/v6-m/nofp/bits/ctype_base.h:45:32: error: '_L' was not declared in this scope; did you mean '_u'?
45 | static const mask lower = _L;
| ^~
Here is my itest.cpp file (code) ("includes" only):
Code:#include <iostream>
#include <string>
#include <stdio.h>
#include <map>
#include <ctime>
#include "pico/stdlib.h"
#include "pico/cyw43_arch.h"
#include <string.h>
#include <time.h>
#include <curl/curl.h>
#include "lwip/dns.h"
#include "lwip/pbuf.h"
#include "lwip/udp.h"
Here is my CMakeLists.txt:
Code:cmake_minimum_required(VERSION 3.13)
include(pico_sdk_import.cmake)
project(itest_project C CXX ASM)
set(CMAKE_C_STANDARD 11)
set(CMAKE_CXX_STANDARD 17)
set(INCLUDE_PATH "/usr/include")
include_directories(${INCLUDE_PATH})
set(INCLUDE_PATH1 "/usr/include/aarch64-linux-gnu")
include_directories(${INCLUDE_PATH1})
set(INCLUDE_PATH2 "/usr/share/doc")
include_directories(${INCLUDE_PATH2})
pico_sdk_init()
add_executable(itest
itest.cpp
)
pico_enable_stdio_usb(itest 1)
pico_enable_stdio_uart(itest 1)
pico_add_extra_outputs(itest)
target_include_directories(itest PRIVATE ${CMAKE_CURRENT_LIST_DIR} )
target_link_libraries(itest pico_cyw43_arch_lwip_threadsafe_background pico_stdlib)
If the 2 include paths PATH and PATH1 in the CMakeLists are removed, the problem dissapears - if also #include <curl/curl.h> in the source file is removed , but then I cannot run run the program using the library I need - but other simple functions can be build and are working.
Any hints are highly appreciated, thanks!
Br, Ole
This problem I am getting on Ubuntu 22.04.3as well as on Raspberry PI OS Full (64-bit). Generally I am able to build, but I have a c++ program, where I need CURL for easy internet file access. I have therefore successfully installed libcurl4-openssl-dev.
But when I am building with CMAKE, I am getting these funny messages:
Consolidate compiler generated dependencies of target itest
[ 11%] Building CXX object CMakeFiles/itest.dir/itest.cpp.obj
In file included from /usr/include/newlib/c++/10.3.1/bits/locale_facets.h:41,
from /usr/include/newlib/c++/10.3.1/bits/basic_ios.h:37,
from /usr/include/newlib/c++/10.3.1/ios:44,
from /usr/include/newlib/c++/10.3.1/ostream:38,
from /usr/include/newlib/c++/10.3.1/iostream:39,
from /home/oti/pico/itest/itest.cpp:1:
/usr/include/newlib/c++/10.3.1/arm-none-eabi/thumb/v6-m/nofp/bits/ctype_base.h:44:35: error: '_U' was not declared in this scope; did you mean '_u'?
44 | static const mask upper = _U;
| ^~
| _u
/usr/include/newlib/c++/10.3.1/arm-none-eabi/thumb/v6-m/nofp/bits/ctype_base.h:45:32: error: '_L' was not declared in this scope; did you mean '_u'?
45 | static const mask lower = _L;
| ^~
Here is my itest.cpp file (code) ("includes" only):
Code:#include <iostream>
#include <string>
#include <stdio.h>
#include <map>
#include <ctime>
#include "pico/stdlib.h"
#include "pico/cyw43_arch.h"
#include <string.h>
#include <time.h>
#include <curl/curl.h>
#include "lwip/dns.h"
#include "lwip/pbuf.h"
#include "lwip/udp.h"
Here is my CMakeLists.txt:
Code:cmake_minimum_required(VERSION 3.13)
include(pico_sdk_import.cmake)
project(itest_project C CXX ASM)
set(CMAKE_C_STANDARD 11)
set(CMAKE_CXX_STANDARD 17)
set(INCLUDE_PATH "/usr/include")
include_directories(${INCLUDE_PATH})
set(INCLUDE_PATH1 "/usr/include/aarch64-linux-gnu")
include_directories(${INCLUDE_PATH1})
set(INCLUDE_PATH2 "/usr/share/doc")
include_directories(${INCLUDE_PATH2})
pico_sdk_init()
add_executable(itest
itest.cpp
)
pico_enable_stdio_usb(itest 1)
pico_enable_stdio_uart(itest 1)
pico_add_extra_outputs(itest)
target_include_directories(itest PRIVATE ${CMAKE_CURRENT_LIST_DIR} )
target_link_libraries(itest pico_cyw43_arch_lwip_threadsafe_background pico_stdlib)
If the 2 include paths PATH and PATH1 in the CMakeLists are removed, the problem dissapears - if also #include <curl/curl.h> in the source file is removed , but then I cannot run run the program using the library I need - but other simple functions can be build and are working.
Any hints are highly appreciated, thanks!
Br, Ole