Commit cd93deb
GraphicsPipeline: export preset data symbols from the Windows DLL
The GPU_BlendState* and GPU_GraphicsPipeline* presets are the only
exported global *data* in the library (everything else is functions or
Class descriptors). clang-cl propagates __declspec(dllexport) from a
prior declaration to a function definition, but not to a variable
definition, so these consts were compiled into ObjectivelyGPU.dll
without export records and were absent from the import library. That
broke downstream links on Windows (e.g. Quetoo's renderer):
lld-link : error : undefined symbol: GPU_BlendStateOpaque
lld-link : error : undefined symbol: GPU_GraphicsPipeline3D
...
Add an OBJECTIVELYGPU_EXPORT_DATA macro (dllexport/dllimport on the
Windows DLL build, empty elsewhere) and apply it to the preset
definitions so the symbols are exported. Using a dedicated data macro
rather than OBJECTIVELYGPU_EXPORT (which is `extern`) also avoids a
-Wextern-initializer warning on the autotools/Linux build.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent d49e2cd commit cd93deb
3 files changed
Lines changed: 12 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
| 31 | + | |
30 | 32 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
| 57 | + | |
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
| 67 | + | |
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
| 85 | + | |
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
38 | 42 | | |
39 | 43 | | |
40 | 44 | | |
| |||
0 commit comments