当前位置:网站首页>Develop those things: go plus c.free to free memory, and what are the reasons for compilation errors?
Develop those things: go plus c.free to free memory, and what are the reasons for compilation errors?
2022-07-07 23:02:00 【TSINGSEE】
stay EasyGBS During the development and testing of platform functions , We are go Medium plus C.free Free memory , An error message appears in the figure below :“could not determine kind of name for C.free”( Compile failed ).

The following code is plus C.free After the function , Resulting in compilation failure :

stay EasyGBS In the same project , Other go There are also documents C.free Release memory functions in this way . When compiling the executable , There are no compilation errors .
So here , I immediately thought it might be some C The header file of is not added . Because in go Write in C Program , There will be no error prompt . So this leads to writing errors , But I don't know . Only when it is compiled into an executable program will an error be reported .
In view of the above situation , Compare two go in C The header file , Finally find #include <stdlib.h> References to header files .
cgo in C.free It can be done with #include <stdlib.h> Use it together , Refer to the following :

As a family, it originated from EasyDarwin Open source framework for technology-based enterprises , In the development process , We are also happy to communicate code technology with all technology development enthusiasts 、 Share development experience , To provide you with some small reference .

With AI The continuous development and application of Technology , We are also gradually integrating AI detection and analysis technology into the platform , For example, face detection 、 Face recognition 、 People flow statistics 、 Vehicle detection 、 License plate recognition 、 Track tracking 、 Behavior recognition, etc .
At present, we are based on EasyCVR The platform and AI Safety production camera , Launched a video that can be applied to the scene of enterprise safety production +AI Solution . among ,AI The safety production camera adopts a new embedded multi algorithm framework , Built in a variety of AI Algorithm , Algorithm can be selected according to camera configuration , In addition to helmet testing , It also includes fireworks detection 、 Indoor channel blockage detection 、 Off duty sleep detection 、 Perimeter intrusion detection 、 Occupancy detection of outdoor fire passage, etc . Interested users can go to the demonstration platform for experience or deployment testing .
边栏推荐
- Use JfreeChart to generate curves, histograms, pie charts, and distribution charts and display them to JSP-1
- Some parameters of Haikang IPC
- Debezium series: support the use of variables in the Kill Command
- Debezium系列之:支持 mysql8 的 set role 语句
- The author of LinkedList said he didn't use LinkedList himself
- Debezium系列之:源码阅读之SnapshotReader
- [language programming] exe virus code example
- “拧巴”的早教行业:万亿市场,难出巨头
- 聊聊 Dart 的空安全 (null safety) 特性
- Unity local coordinates and world coordinates
猜你喜欢
![[record of question brushing] 3 Longest substring without duplicate characters](/img/44/1cd8128d93c9c273e0f4718d84936e.png)
[record of question brushing] 3 Longest substring without duplicate characters

CTF exercise

Two minutes, talk about some wrong understandings of MySQL index

【测试面试题】页面很卡的原因分析及解决方案
Redis official ORM framework is more elegant than redistemplate

ASEMI整流桥KBPC1510的型号数字代表什么

行测-图形推理-2-黑白格类

Line test - graphic reasoning - 3 - symmetric graphic class

Line test - graphic reasoning -5- one stroke class

Transparent i/o model from beginning to end
随机推荐
小程序多种开发方式对比-跨端?低代码?原生?还是云开发?
The author of LinkedList said he didn't use LinkedList himself
0-5VAC转4-20mA交流电流隔离变送器/转换模块
肠道里的微生物和皮肤上的一样吗?
PCL .vtk文件与.pcd的相互转换
Microbial Health Network, How to restore Microbial Communities
DTC社群运营怎么做?
Debezium系列之: 支持在 KILL 命令中使用变量
Line test graph reasoning graph group class
Take full control! Create a "leading cockpit" for smart city construction
消息队列与快递柜之间妙不可言的关系
Use JfreeChart to generate curves, histograms, pie charts, and distribution charts and display them to jsp-2
双非大厂测试员亲述:对测试员来说,学历重要吗?
Some parameters of Haikang IPC
Loki, the "open source star picking program", realizes the efficient management of harbor logs
UWA Q & a collection
Class implementation of linear stack and linear queue (another binary tree pointer version)
[problem] pytorch installation
Visual studio 2019 installation
[record of question brushing] 3 Longest substring without duplicate characters