added stb, more binaryout changes"
[henge/apc.git] / stb / tools / README.footer.md
1
2 FAQ
3 ---
4
5 #### What's the license?
6
7 These libraries are in the public domain (or the equivalent where that is not
8 possible). You can do anything you want with them. You have no legal obligation
9 to do anything else, although I appreciate attribution.
10
11 #### <a name="other_libs"></a> Are there other single-file public-domain/open source libraries with minimal dependencies out there?
12
13 [Yes.](https://github.com/nothings/single_file_libs)
14
15 #### If I wrap an stb library in a new library, does the new library have to be public domain?
16
17 No.
18
19 #### Some of these libraries seem redundant to existing open source libraries. Are they better somehow?
20
21 Generally they're only better in that they're easier to integrate,
22 easier to use, and easier to release (single file; good API; no
23 attribution requirement). They may be less featureful, slower,
24 and/or use more memory. If you're already using an equivalent
25 library, there's probably no good reason to switch.
26
27 ###### Can I link directly to the table of stb libraries?
28
29 You can use [this URL](https://github.com/nothings/stb#stb_libs) to link directly to that list.
30
31 #### Why do you list "lines of code"? It's a terrible metric.
32
33 Just to give you some idea of the internal complexity of the library,
34 to help you manage your expectations, or to let you know what you're
35 getting into. While not all the libraries are written in the same
36 style, they're certainly similar styles, and so comparisons between
37 the libraries are probably still meaningful.
38
39 Note though that the lines do include both the implementation, the
40 part that corresponds to a header file, and the documentation.
41
42 #### Why single-file headers?
43
44 Windows doesn't have standard directories where libraries
45 live. That makes deploying libraries in Windows a lot more
46 painful than open source developers on Unix-derivates generally
47 realize. (It also makes library dependencies a lot worse in Windows.)
48
49 There's also a common problem in Windows where a library was built
50 against a different version of the runtime library, which causes
51 link conflicts and confusion. Shipping the libs as headers means
52 you normally just compile them straight into your project without
53 making libraries, thus sidestepping that problem.
54
55 Making them a single file makes it very easy to just
56 drop them into a project that needs them. (Of course you can
57 still put them in a proper shared library tree if you want.)
58
59 Why not two files, one a header and one an implementation?
60 The difference between 10 files and 9 files is not a big deal,
61 but the difference between 2 files and 1 file is a big deal.
62 You don't need to zip or tar the files up, you don't have to
63 remember to attach *two* files, etc.
64
65 #### Why "stb"? Is this something to do with Set-Top Boxes?
66
67 No, they are just the initials for my name, Sean T. Barrett.
68 This was not chosen out of egomania, but as a moderately sane
69 way of namespacing the filenames and source function names.
70
71 #### Will you add more image types to stb_image.h?
72
73 If people submit them, I generally add them, but the goal of stb_image
74 is less for applications like image viewer apps (which need to support
75 every type of image under the sun) and more for things like games which
76 can choose what images to use, so I may decline to add them if they're
77 too rare or if the size of implementation vs. apparent benefit is too low.
78
79 #### Do you have any advice on how to create my own single-file library?
80
81 Yes. https://github.com/nothings/stb/blob/master/docs/stb_howto.txt
82
83 #### Why public domain?
84
85 I prefer it over GPL, LGPL, BSD, zlib, etc. for many reasons.
86 Some of them are listed here:
87 https://github.com/nothings/stb/blob/master/docs/why_public_domain.md
88
89 #### Why C?
90
91 Primarily, because I use C, not C++. But it does also make it easier
92 for other people to use them from other languages.
93
94 #### Why not C99? stdint.h, declare-anywhere, etc.
95
96 I still use MSVC 6 (1998) as my IDE because it has better human factors
97 for me than later versions of MSVC.
98
99
100