libgb.c 1.2021.3 → 1.2021.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -24
- package/gb/gb.h +10824 -10824
- package/gb/gb_gl.h +2592 -2592
- package/gb/gb_ini.h +425 -425
- package/gb/gb_math.h +2234 -2234
- package/gb/gb_string.h +511 -511
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -37,36 +37,18 @@ And then include `gb.h`, and related, as follows:
|
|
|
37
37
|
int main() { /* ... */ }
|
|
38
38
|
```
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
Finally, compile while adding the path `node_modules/libgb.c` to your compiler's include paths.
|
|
41
41
|
|
|
42
42
|
```bash
|
|
43
|
-
$ clang main.c # or, use gcc
|
|
44
|
-
$ gcc main.c
|
|
43
|
+
$ clang -I./node_modules/libgb.c -I./node_modules/stb.c main.c # or, use gcc
|
|
44
|
+
$ gcc -I./node_modules/libgb.c -I./node_modules/stb.c main.c
|
|
45
45
|
```
|
|
46
46
|
|
|
47
|
-
You may also use a simpler approach
|
|
48
|
-
|
|
49
|
-
```c
|
|
50
|
-
// main.c
|
|
51
|
-
#define GB_IMPLEMENTATION
|
|
52
|
-
#include <gb/gb.h>
|
|
53
|
-
#define GB_MATH_IMPLEMENTATION
|
|
54
|
-
#include <gb/gb_math.h>
|
|
55
|
-
#define GB_STRING_IMPLEMENTATION
|
|
56
|
-
#include <gb/gb_string.h>
|
|
57
|
-
#define GB_INI_IMPLEMENTATION
|
|
58
|
-
#include <gb/gb_ini.h>
|
|
59
|
-
#define GBGL_IMPLEMENTATION
|
|
60
|
-
#include <gb/gb_gl.h>
|
|
61
|
-
|
|
62
|
-
int main() { /* ... */ }
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
If you add the path `node_modules/libgb.c` to your compiler's include paths.
|
|
47
|
+
You may also use a simpler approach with the [cpoach](https://www.npmjs.com/package/cpoach.sh) tool, which automatically adds the necessary include paths of all the installed dependencies for your project.
|
|
66
48
|
|
|
67
49
|
```bash
|
|
68
|
-
$ clang
|
|
69
|
-
$ gcc
|
|
50
|
+
$ cpoach clang main.c # or, use gcc
|
|
51
|
+
$ cpoach gcc main.c
|
|
70
52
|
```
|
|
71
53
|
|
|
72
54
|
<br>
|
|
@@ -107,6 +89,7 @@ I may change it in the future but at the moment it is like this this:
|
|
|
107
89
|
<br>
|
|
108
90
|
|
|
109
91
|
|
|
92
|
+
[](https://wolfram77.github.io)<br>
|
|
110
93
|
[](https://github.com/gingerBill/gb)
|
|
111
94
|
[](https://nodef.github.io)
|
|
112
95
|

|