"Undefined identifier" in the BUILD.gn file

82 views
Skip to first unread message

Điền Đô

unread,
Oct 5, 2023, 6:37:25 AM10/5/23
to discuss-webrtc
I made the project build with the following process:

gn gen out/libc++ --args="is_debug=true use_custom_libcxx=false use_custom_libcxx_for_host=false"
ninja -C out/libc++

Then,  I got some warnings about using is_pod, as you saw in the picture. And I had build failure.
I also get the suggestion as shown in the Pic,  define _SILENCE_CXX20_IS_POD_DEPRECATION_WARNING or _SILENCE_ALL_CXX20_DEPRECATION_WARNINGS to suppress this warning.
384541898_199688843140543_5242875807882208254_n.png

I followed the error message's suggestion but no success :((

386466556_700455095129673_6763677983515639705_n.png

I searched on the internet and I found a solution to this problem.
Make changes in the BUILD.gn file adding macro definitions:
D:\Workplace\webrtc-checkout\src\build\config\compiler\BUILD.gn
Add macro definitions:
defines += ["_SILENCE_CXX20_IS_POD_DEPRECATION_WARNING=1","_SILENCE_ALL_CXX20_DEPRECATION_WARNINGS=1"]
384554660_1370255276896454_1355588348230773766_n.png
386472584_1060670462042545_6637743868268066399_n.png

I have 2 questions:
1. What to do when making changes in BUILD.gn files to rebuild the library? Looks like I'm missing something.
2. Is there a faster way to get rid of notifications like I originally mentioned?

Thanks for watching:))

Reply all
Reply to author
Forward
0 new messages