Comments (2)
Hi @mantielero
Thanks for creating this issue - I'm in the same boat. libxmlswriter
is broken since nimgen
will receive no further updates, so that would require another fork..
I'm on the same code as you, but you can get past these errors by using cOverride:
. I still havn't got libxmlswriter
to work with nimterop, but you can get a full compile with the below:
import os, strutils
import nimterop/[cimport, build]
const
baseDir = currentSourcePath.parentDir() / "build"
srcDir = baseDir
static:
cDebug()
cDisableCaching()
gitPull("https://github.com/jmcnamara/libxlsxwriter", outdir = srcDir, plist = """
include/*
include/xlsxwriter/*
""",
checkout = "main" )
cOverride:
const
LXW_DEF_COL_WIDTH* = float(8.43)
LXW_DEF_ROW_HEIGHT* = float(15.0)
type
lxw_selection* {.bycopy, impxlsxwriterHdr, importc: "struct lxw_selection".} = object
pane*: cchar
active_cell*: string #This one
sqref*: string #This one
list_pointers*: Type_xlsxwriterh16
lxw_data_val_obj* {.bycopy, impxlsxwriterHdr,
importc: "struct lxw_data_val_obj".} = object ## ```
## A copy of lxw_data_validation which is used internally and which contains
## some additional fields.
## ```
validate*: uint8
criteria*: uint8
ignore_blank*: uint8
show_input*: uint8
show_error*: uint8
error_type*: uint8
dropdown*: uint8
value_number*: cdouble
value_formula*: cstring
value_list*: ptr cstring
minimum_number*: cdouble
minimum_formula*: cstring
minimum_datetime*: lxw_datetime
maximum_number*: cdouble
maximum_formula*: cstring
maximum_datetime*: lxw_datetime
input_title*: cstring
input_message*: cstring
error_title*: cstring
error_message*: cstring
sqref*: string #This one
list_pointers*: Type_xlsxwriterh17
cImport(srcDir / "include/xlsxwriter.h", recurse = true)
from nimterop.
@mantielero - you can check /home/jose/.cache/nim/nimterop/toastCache/nimterop_2964624690.nim to see what exactly was generated in the code and what's being wrapped incorrectly. You can then use cOverride to work around it as @ThomasTJdev suggests.
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
- [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.