xmake provides some api, which can detect whether exist some library functions.
```lua
target("test")
-- checks some libc functions from the header files: wchar.h and stdlib.h
add_cfuncs("libc", nil, {"wchar.h", "stdlib.h"}, "wcscat",
继续阅读 »
New features
Add ping demo for network
Changes
Modify license to Apache License 2.0
Rename --smallest=y|n option to --small=y|n
Support stat64
Improve copy speed and fix permissions for tb_file_copy
Improve path operation for posix platform
Improve socket interfaces and support icmp
Improve xmake.lua and remove binar继续阅读 »
xmake can run and debug the given target program now.
We only need configure the debug mode to compile this target and run it.
e.g.
```lua
-- enable debug symbols
if is_mode("debug")
set_symbols("debug")
end
-- define target
target("demo")
set_kind("kind")
add_files("src/*.c")
```
And we compile and r继续阅读 »
We create an empty console project first:
```bash
$ xmake create -P ./hello
create hello ...
create ok!👌
```
And xmake will generate some files:
```bash
$ cd ./hello
$ tree .
.
├── src
│ └── main.c
└── xmake.lua
```
It is a simple console program only for printing hello xmake!
```bash
$ cat ./src/main.c
incl继续阅读 »
You can use xmake to run the given target and need not know where is the target program.
e.g.
We define a simple target with named 'test'.
lua
target("test")
set_kind("console")
add_files("*.c")
So, we can run it directly.
bash
$xmake r test
or $xmake run test
xmake will compile it 继续阅读 »