File tree Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Original file line number Diff line number Diff line change
1
+ # First project
2
+
3
+ Let's create the first bfdev based project:
4
+
5
+ ``` c
6
+ #include < bfdev.h>
7
+
8
+ int main (int argc, const char * argv[ ] )
9
+ {
10
+ bfdev_log_info("helloworld\n");
11
+ return 0;
12
+ }
13
+ ```
14
+
15
+ If bfdev is installed on user's local, we first need to set the environment variables, you can also add it to bashrc:
16
+
17
+ ```shell
18
+ export C_INCLUDE_PATH=$C_INCLUDE_PATH:$HOME/.local/include
19
+ export CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:$HOME/.local/include
20
+ export LIBRARY_PATH=$LIBRARY_PATH:$HOME/.local/lib:$HOME/.local/lib64
21
+ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/.local/lib:$HOME/.local/lib64
22
+ ```
23
+
24
+ Then we compile and run it:
25
+
26
+ ```
27
+ # gcc -lbfdev -o helloworld helloworld.c
28
+ # ./helloworld
29
+ [info] helloworld
30
+ ```
Original file line number Diff line number Diff line change 7
7
8
8
## Development guide
9
9
10
+ - [ First project] ( en_US/first.md )
10
11
- [ Code layout] ( en_US/layout.md )
11
12
- [ Include files] ( en_US/include.md )
12
13
You can’t perform that action at this time.
0 commit comments