当前位置:网站首页>Ruixin micro rk1126 platform platform porting libevent cross compiling libevent

Ruixin micro rk1126 platform platform porting libevent cross compiling libevent

2022-06-10 19:04:00 QMCY_ jason

The program needs to have a http Service to interact with the master , Just before, the Hisilicon platform used libevent

Now you need to migrate to RK platform . hold libevent After the source code comes down Put a random Directory

And build a build.sh

The contents are as follows : It's not complicated. The main thing is to set up the correct cross compilation tool

./configure \
  --host=arm-linux-gnueabihf CC=arm-linux-gnueabihf-gcc\
	--prefix=/home/QMCY/libevent-2.1.12-stable/rk1126 \
	--disable-openssl

after make make install If you don't make mistakes normally, you will Generate a rk1126 Catalog

It contains include and lib Catalog Enter into lib Catalog Find that all the required libraries have been compiled

then In the program modify CMakeLists.txt Compare the header file path to lib Library paths are added

In the main program code   Start a thread http service  

 

 

Compiler Program down to the board , And then again pc Use postman Send a test message  

In the program You can receive the message correctly  

 

  after According to the improbable api  Just deal with it separately

原网站

版权声明
本文为[QMCY_ jason]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/161/202206101808157482.html