xmake v2.0 has supported the plugin module and we can develop ourself plugin module conveniently.
We can run command xmake -h to look over some builtin plugins of xmake
Plugins:
l, lua Run the lua script.
m, macro Run the given macro.继续阅读 »
A simplest xmake.lua
```lua
-- define a target with named 'demo'
target("demo")
-- set the target kind, .e.g 'binary' is a console program
-- - static: a static library
-- - shared: a shared library
set_kind("binary")
-- add all c source files in the directory: src
add_files("src/*.c"继续阅读 »
Recently, xmake's description syntax has been enhanced to support two different grammar styles at the same time.
The set-add style
The key-val style
The set-add style
This is xmake's classic style, for example:
lua
target("test")
set_kind("static")
add_defines("DEBUG")
add_files("src/*.c", "test/*.cpp")
继续阅读 »
ACE provides lots of wrapper classes to hide the difference between OS. ACE_Process is one of them to give us an unified operation interface to fork/kill/wait a process. And ACE_Process is also a good example code to show useful function, such as how to check whether a process is alive.继续阅读 »
tbox supports sqlite3 and mysql databases now(depends on libsqlite3.a and libmysql.a) and provides the unified api to access database.
We only need pass a given url for connecting and accessing it.
A simple example:
```c
/* init a mysql database
*
* mysql database url:
*
* - "sql://localhost:继续阅读 »