libgb.c 1.2021.2 → 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 +33 -6
- package/gb/gb.h +10824 -0
- package/gb.h +11 -10820
- package/package.json +18 -7
- /package/{gb_gl.h → gb/gb_gl.h} +0 -0
- /package/{gb_ini.h → gb/gb_ini.h} +0 -0
- /package/{gb_math.h → gb/gb_math.h} +0 -0
- /package/{gb_string.h → gb/gb_string.h} +0 -0
package/README.md
CHANGED
|
@@ -14,19 +14,44 @@ library | latest version | category | description
|
|
|
14
14
|
## Installation
|
|
15
15
|
|
|
16
16
|
Run:
|
|
17
|
+
|
|
17
18
|
```bash
|
|
18
19
|
$ npm i libgb.c
|
|
19
20
|
```
|
|
20
21
|
|
|
21
22
|
And then include `gb.h`, and related, as follows:
|
|
23
|
+
|
|
22
24
|
```c
|
|
23
|
-
|
|
24
|
-
#
|
|
25
|
-
#include "node_modules/libgb.c/
|
|
26
|
-
#
|
|
27
|
-
#include "node_modules/libgb.c/
|
|
25
|
+
// main.c
|
|
26
|
+
#define GB_IMPLEMENTATION
|
|
27
|
+
#include "node_modules/libgb.c/gb.h"
|
|
28
|
+
#define GB_MATH_IMPLEMENTATION
|
|
29
|
+
#include "node_modules/libgb.c/gb_math.h"
|
|
30
|
+
#define GB_STRING_IMPLEMENTATION
|
|
31
|
+
#include "node_modules/libgb.c/gb_string.h"
|
|
32
|
+
#define GB_INI_IMPLEMENTATION
|
|
33
|
+
#include "node_modules/libgb.c/gb_ini.h"
|
|
34
|
+
#define GBGL_IMPLEMENTATION
|
|
35
|
+
#include "node_modules/libgb.c/gb_gl.h"
|
|
36
|
+
|
|
37
|
+
int main() { /* ... */ }
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Finally, compile while adding the path `node_modules/libgb.c` to your compiler's include paths.
|
|
41
|
+
|
|
42
|
+
```bash
|
|
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
|
|
28
45
|
```
|
|
29
46
|
|
|
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.
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
$ cpoach clang main.c # or, use gcc
|
|
51
|
+
$ cpoach gcc main.c
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
<br>
|
|
30
55
|
|
|
31
56
|
## FAQ
|
|
32
57
|
|
|
@@ -64,5 +89,7 @@ I may change it in the future but at the moment it is like this this:
|
|
|
64
89
|
<br>
|
|
65
90
|
|
|
66
91
|
|
|
92
|
+
[](https://wolfram77.github.io)<br>
|
|
93
|
+
[](https://github.com/gingerBill/gb)
|
|
67
94
|
[](https://nodef.github.io)
|
|
68
|
-

|