B4R creates an Arduino project and compiles it with Arduino compiler. You will need to wrap libraries or access them with inline C code.
Creating libraries for B4R
Because there are multiple.h header files in this library, your method can only convert one file
C:\Users\admin\Documents\Arduino>java -jar "D:\Java\jdk-17\bin\B4Rh2xml.jar" "C:\Users\admin\Documents\Arduino\libraries\Blinker" "D:\B4R\Libraries\Blinker.xml"
parser._parseh (java line: 418)
java.io.FileNotFoundException: C:\Users\admin\Documents\Arduino\libraries\Blinker (????????)
at java.base/java.io.FileInputStream.open0(Native Method)
at java.base/java.io.FileInputStream.open(FileInputStream.java:216)
at java.base/java.io.FileInputStream.<init>(FileInputStream.java:157)
at anywheresoftware.b4a.objects.streams.File.OpenInput(File.java:225)
at anywheresoftware.b4a.objects.streams.File.ReadList(File.java:241)
at b4j.example.parser._parseh(parser.java:418)
at b4j.example.parser._parse(parser.java:267)
at b4j.example.main._appstart(main.java:46)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:93)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:84)
在 b4j.example.main.main(main.java:2
This is my error, can not convert the whole folder, can only convert a single header file, this is not what I need, please provide other methods