Skip to main content
Jvan .10
Associate III
May 3, 2021
Question

Why my program doesn't compile using LwIP?

  • May 3, 2021
  • 2 replies
  • 1537 views

I'm trying to compile my program, but it doesn't work due to an error probably related to LwIP includes.

In file included from c:\st\stm32cubeide_1.6.0\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.win32_1.5.0.202011040924\tools\arm-none-eabi\include\c++\9.3.1\system_error:39,
 from c:\st\stm32cubeide_1.6.0\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.win32_1.5.0.202011040924\tools\arm-none-eabi\include\c++\9.3.1\bits\ios_base.h:46,
 from c:\st\stm32cubeide_1.6.0\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.win32_1.5.0.202011040924\tools\arm-none-eabi\include\c++\9.3.1\ios:42,
 from c:\st\stm32cubeide_1.6.0\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.win32_1.5.0.202011040924\tools\arm-none-eabi\include\c++\9.3.1\ostream:38,
 from E:/AFG/AFG_Test/gtest_src/gtest/gtest.h:58,
 from ../Core/Src/Buzzer_test.cpp:1:
c:\st\stm32cubeide_1.6.0\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.win32_1.5.0.202011040924\tools\bin\../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/include/c++/9.3.1/arm-none-eabi/thumb/v7e-m+dp/hard/bits/error_constants.h:122:27: error: 'ENOTSUP' was not declared in this scope
 122 | not_supported = ENOTSUP,
 | ^~~~~~~
c:\st\stm32cubeide_1.6.0\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.win32_1.5.0.202011040924\tools\bin\../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/include/c++/9.3.1/arm-none-eabi/thumb/v7e-m+dp/hard/bits/error_constants.h:126:31: error: 'ECANCELED' was not declared in this scope
 126 | operation_canceled = ECANCELED,
 | ^~~~~~~~~
c:\st\stm32cubeide_1.6.0\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.win32_1.5.0.202011040924\tools\bin\../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/include/c++/9.3.1/arm-none-eabi/thumb/v7e-m+dp/hard/bits/error_constants.h:135:24: error: 'EOWNERDEAD' was not declared in this scope
 135 | owner_dead = EOWNERDEAD,
 | ^~~~~~~~~~
c:\st\stm32cubeide_1.6.0\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.win32_1.5.0.202011040924\tools\bin\../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/include/c++/9.3.1/arm-none-eabi/thumb/v7e-m+dp/hard/bits/error_constants.h:151:34: error: 'ENOTRECOVERABLE' was not declared in this scope
 151 | state_not_recoverable = ENOTRECOVERABLE,

I've found online that there's a problem with LwIP's errno file.

https://community.nxp.com/t5/Digital-Signal-Controllers/I-did-not-compile-quot-Hello-World-quot-cpp-code-in-MCUXpresso/m-p/983807

Doesn't fix my problem at all, the output is no different.

Anyone know's the solution?

UPDATE:

0693W00000ANAYJQA5.png 

Seems to be the issue... anyone able to help me?

This topic has been closed for replies.

2 replies

_Saurabh Nishad_old
Visitor II
May 3, 2021

Hello @Jvan .10​  it seems from picture that header file is not properly included in project.

If Its possible you can share your project folder here to try.

Saurabh

Tonatiuh
Visitor II
December 16, 2021

Just add <sys/errno.h> at the beginning like:

#pragma once
 
#include <sys/errno.h>
#include <string>
 
#include "lwip/udp.h"

<sys/errno.h> define ENOTSUP and more

(169) #define ENOTSUP 134 /* Not supported */