andlabs / andlabs/libui

Master issue for static library nonsense: Windows resource file copying and Unix build oddities

オープン
#308 コメント 8 件 リアクション 1 件 担当者 0 名 GitHub で見る
主要言語
C
スター
10.9k
フォーク
612
PR マージ指標
30日以内にマージされた PR はありません

説明

libui needs to be available as both a static and as a dynamic library, as different users have different requirements. Static libraries have two major issues:

- they share the same symbol namespace with whatever they are linked to
- on Windows, static libraries can't have resources

Right now, libui tries to hack around all this by a) obfuscating non-public symbols using a trick deduced by @pcwalton b) manually copying the compiled `resources.o` file on Windows into the `build\out` folder so it can be linked into binaries.

These options have caused nothing but build issues and maintenance nightmares for everyone, including myself, so I'm going to be fixing this properly:

- prefix all non-public names that aren't `static` with `uipriv`
- embed compiled resources on Windows directly into the binary somehow

I need to figure out whether all structs and classes (including ones only used in one source file) need to have this too. All GObject and Objective-C classes also need this change, because they share an application-global namespace regardless.

I need to figure out how to do the Windows resource precompiling thing in a way suitable for each toolchain.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。