Comments (2)
Fixed in #head.
from nimterop.
Still appears to be an issue for enums.
import os, nimterop/[build, cimport]
const
baseDir = currentSourcePath.parentDir() / "lib" / "sokol"
static:
cDebug()
cDefine("SOKOL_IMPL")
cDefine("SOKOL_D3D11")
cPlugin:
import strutils
proc onSymbol*(sym: var Symbol) {.exportc, dynlib.} =
sym.name = sym.name.strip(chars = {'_'})
cImport(baseDir / "sokol_gfx.h")
SG_SLOT_MASK* = ((1 shl _SG_SLOT_SHIFT)-1).Enum_sokol_gfxh2
C:\Users\carte\AppData\Local\Temp\nimterop_1978424579.nim(609, 28) Error: invalid token: _ (\95)
Here's the C enum definition:
enum {
_SG_STRING_SIZE = 16,
_SG_SLOT_SHIFT = 16,
_SG_SLOT_MASK = (1<<_SG_SLOT_SHIFT)-1,
_SG_MAX_POOL_SIZE = (1<<_SG_SLOT_SHIFT),
_SG_DEFAULT_BUFFER_POOL_SIZE = 128,
_SG_DEFAULT_IMAGE_POOL_SIZE = 128,
_SG_DEFAULT_SHADER_POOL_SIZE = 32,
_SG_DEFAULT_PIPELINE_POOL_SIZE = 64,
_SG_DEFAULT_PASS_POOL_SIZE = 16,
_SG_DEFAULT_CONTEXT_POOL_SIZE = 16,
_SG_MTL_DEFAULT_UB_SIZE = 4 * 1024 * 1024,
_SG_MTL_DEFAULT_SAMPLER_CACHE_CAPACITY = 64,
};
from nimterop.
Related Issues (20)
- Parsing a global variable that's a pointer to an array of functions
- Structs mapped from C header need completeStruct pragma, otherwise sizeof doesn't work on those
- VM does not support 'cast' from tyFloat to tyFloat HOT 2
- [Question] Change build directory HOT 1
- Toast parsing comment as var HOT 4
- Inject code to process `#define`? HOT 8
- Building Failed with nimble. HOT 2
- [Question] Binding to OpenCV HOT 2
- Using nimterop in MSYS2 Bash environment on Windows HOT 3
- Header path handling on Windows HOT 3
- βuint16_t β What happened?
- Typedef function with an enum return type
- Support OpenBSD
- The nimterop good this reference documentation to convert small C project
- [Question] Nimterop, libnx and DevKitPro | sys/lock.h : No such file or directory HOT 1
- "cmd: not found" when building using mingw building a windows executable in linux
- ssing comma in the example
- Toast segfault with comment after define
- Build fails due to `macro getHeader` Implementation
- Documentation
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nimterop.