Giter Club home page Giter Club logo

Comments (2)

ThomasTJdev avatar ThomasTJdev commented on July 18, 2024

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.

genotrance avatar genotrance commented on July 18, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.