Net exception:Address family not supported

本文介绍了解决Poco库在Debug版本下出现“NetException: Address family not supported”错误的方法。通过调整编译配置加入-std=c++11选项,解决了因代码优化导致的问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

项目需要,编译了Poco的静态库。
在release版本中,一切正常。
而在debug版本,运行报错:"Net exception:Address family not supported"。

翻阅了一些资料后,发现了可能的原因(没有深究)和解决方案,具体如下:

原因:(release之所以ok,是因为不会自动优化代码,不会去字节对齐)
    

解决方案:(在Poco-1.6.1-all/build/config/Darwin-clang, CXXFLAGS增加-std=c++11)
    

参考资料:
    https://github.com/pocoproject/poco/issues/234



Wed Jun 25, 2025 16:11:53: : IAR Embedded Workbench 9.40.1 (armPROC.dll) Wed Jun 25, 2025 16:11:53: : Loaded macro file: C:\iar\arm/config/debugger/Infineon/CYT2BL_M4.dmac Wed Jun 25, 2025 16:11:53: : Loaded macro file: C:\iar\arm/config/debugger/Infineon/CYTVII_M4.dmac Wed Jun 25, 2025 16:11:53: : Loaded macro file: C:\iar\arm/config/debugger/Infineon/CYTVII_Trace.dmac Wed Jun 25, 2025 16:11:53: : Loaded macro file: C:\iar\arm/config/debugger/Infineon/CYTVII_Common.dmac Wed Jun 25, 2025 16:11:54: : Loaded macro file: C:\iar\arm/config/flashloader/Infineon/FlashTVII.mac Wed Jun 25, 2025 16:11:54: : Loading the CMSIS-DAP driver Wed Jun 25, 2025 16:11:54: : Probe: CMSIS-DAP probe SW module ver 1.24 Wed Jun 25, 2025 16:11:54: : Probe: Connecting to ZF-WLFS-CMSIS-DAP:80940860-DC5475E17B3C firmware v.2.1.1 Wed Jun 25, 2025 16:11:54: : Emulation layer version 5.21 Wed Jun 25, 2025 16:11:54: : Notification to core-connect hookup. Wed Jun 25, 2025 16:11:54: : Connected DAP v2 on SWD. Detected DP ID=0x6ba02477. Wed Jun 25, 2025 16:11:54: : Connecting to TAP#0 DAP AHB-AP-CM port 0x2 (IDR=0x2477'0011). Wed Jun 25, 2025 16:11:54: : Recognized CPUID=0x410fc241 Cortex-M4 r0p1 arch ARMv7-M Wed Jun 25, 2025 16:11:54: : Debug resources: 6 instruction comparators, 4 data watchpoints. Wed Jun 25, 2025 16:11:54: : DMAC: Family ID: 0x108, Series: CYT2BL, Major.Minor Rev.: 1.1, Silicon ID: 0xea02 Wed Jun 25, 2025 16:11:54: : DMAC: FlashBoot Ver.: 3.1.0.556, TOC2 Flags: 0x243, Protection: NORMAL Wed Jun 25, 2025 16:11:54: : LowLevelReset(script, delay 200) Wed Jun 25, 2025 16:11:54: : Calling reset script: Traveo2_CM4_ResetAndAcquireDevice Wed Jun 25, 2025 16:11:54: : DMAC: Performing a hardware reset and entering test mode ... Wed Jun 25, 2025 16:11:54: : DMAC: Device has successfully entered test mode. Wed Jun 25, 2025 16:11:54: : DMAC: The power mode of Cortex-M4 core was set to ENABLED. Wed Jun 25, 2025 16:11:54: : Loaded debugee: C:\iar\arm/config/flashloader/Infineon/FlashTVIIBE_128K.out Wed Jun 25, 2025 16:11:55: : Target reset Wed Jun 25, 2025 16:11:55: : Unloaded macro file: C:\iar\arm/config/flashloader/Infineon/FlashTVII.mac Wed Jun 25, 2025 16:11:55: : Downloaded C:\Users\zhang\Desktop\CYT2BL3_Brushless_Driver_Project-master\Seekfree_CYT2BL3_Double_Foc_Project\project\iar\Debug_m4\Exe\cyt2bl3.out to flash memory. Wed Jun 25, 2025 16:11:55: : 104902 bytes downloaded into FLASH (53.30 Kbytes/sec) Wed Jun 25, 2025 16:11:55: : DMAC: Performing a hardware reset and entering test mode ... Wed Jun 25, 2025 16:11:56: : DMAC: Device has successfully entered test mode. Wed Jun 25, 2025 16:11:56: : DMAC: The power mode of Cortex-M4 core was set to ENABLED. Wed Jun 25, 2025 16:11:56: : Loaded debugee: C:\Users\zhang\Desktop\CYT2BL3_Brushless_Driver_Project-master\Seekfree_CYT2BL3_Double_Foc_Project\project\iar\Debug_m4\Exe\cyt2bl3.out Wed Jun 25, 2025 16:11:56: : Loaded extra image: C:\Users\zhang\Desktop\CYT2BL3_Brushless_Driver_Project-master\Seekfree_CYT2BL3_Double_Foc_Project\project\iar\project_config\cyt2bl3.ewx, image ID 3 Wed Jun 25, 2025 16:11:56: : LowLevelReset(software, delay 200) Wed Jun 25, 2025 16:11:56: : LowLevelReset(script, delay 200) Wed Jun 25, 2025 16:11:56: : Calling reset script: Traveo2_CM4_ResetAndAcquireDevice Wed Jun 25, 2025 16:11:56: : Download completed. Wed Jun 25, 2025 16:11:56: : LowLevelReset(software, delay 200) Wed Jun 25, 2025 16:11:56: : Target reset Wed Jun 25, 2025 16:11:57: : DMAC: Cortex-M0+ core was reset. Wed Jun 25, 2025 16:11:57: : DMAC/Trace: Configuring platform side SWO component. Wed Jun 25, 2025 16:11:57: : INFO: Configuring trace using 'swoinit(baseswo=0xE008_E002,baseitm=0xE000_0002)' setting... Wed Jun 25, 2025 16:11:57: : INFO: SWO trace mode is not supported by the probe (use I-jet/I-jet-Trace probe) - trace is disabled. Wed Jun 25, 2025 16:12:07: : Stopped by a vector catch: Wed Jun 25, 2025 16:12:07: : BusFault fault escalated into HardFault Wed Jun 25, 2025 16:12:07: : The BusFault handler is disabled Wed Jun 25, 2025 16:12:07: : HardFault exception. Wed Jun 25, 2025 16:12:07: : The processor has escalated a configurable-priority exception to HardFault. Wed Jun 25, 2025 16:12:07: : A precise data access error has occurred (CFSR.PRECISERR, BFAR) Wed Jun 25, 2025 16:12:07: : At data address 0x1400580c. Wed Jun 25, 2025 16:12:07: : Exception occurred at PC = 0x10092a64, LR = 0x10092a49 Wed Jun 25, 2025 16:12:07: : See the call stack for more information. 什么意思
最新发布
06-26
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值