nimlibxlsxwriter icon indicating copy to clipboard operation
nimlibxlsxwriter copied to clipboard

Update nimlibxlsxwriter to fix errors

Open ThomasTJdev opened this issue 5 years ago • 11 comments

I could not compile nimlibxlsxwriter with the current configuration. It failed with:

  • Imports had nimlibxlsxwriter prepend, but cfg tried to find without
  • INNER_C_STRUCT_temp-common.nim_73 suddenly has the filename included
  • charts.nim were not updated
  • hash_table.nim and releationships.nim was not catched by wildcard
  • The tests were using new_workbook instead og workbook_new

I haven't checked if the problem were caused by the libxlsxwriter, Nim 1.2.0, nimgen or c2nim - only fixed it to work with current versions.

ThomasTJdev avatar Apr 17 '20 13:04 ThomasTJdev

@ThomasTJdev It is compiling now, but I am getting other error when I am trying to run the compiled exe: "could not load: libxlsxwriter.dll"

whydee86 avatar Apr 17 '20 23:04 whydee86

@ThomasTJdev It is compiling now, but I am getting other error when I am trying to run the compiled exe: "could not load: libxlsxwriter.dll"

Hi @whydee86 As the error message says, you are missing the libxlsxwriter.dll. On the official libxlsxwriter page there's a fine guide on how to get this file: https://libxlsxwriter.github.io/getting_started.html . Which OS are you running?

ThomasTJdev avatar Apr 18 '20 05:04 ThomasTJdev

@ThomasTJdev It is compiling now, but I am getting other error when I am trying to run the compiled exe: "could not load: libxlsxwriter.dll"

Hi @whydee86 As the error message says, you are missing the libxlsxwriter.dll. On the official libxlsxwriter page there's a fine guide on how to get this file: https://libxlsxwriter.github.io/getting_started.html . Which OS are you running?

windows. I think you need to add this to the to readme file or better add this to the install/setup.

whydee86 avatar Apr 18 '20 09:04 whydee86

@ThomasTJdev I didn't succeed in building the dll and I don't understand where I need to put him.

whydee86 avatar Apr 18 '20 11:04 whydee86

@ThomasTJdev I didn't succeed in building the dll and I don't understand where I need to put him.

I have only done it on Linux, so I cant help you with Windows. You should follow https://libxlsxwriter.github.io/getting_started.html#gsg_ming . If you have problems building it, you should look at libxlsxwriter repo here https://github.com/jmcnamara/libxlsxwriter/issues.

ThomasTJdev avatar Apr 18 '20 11:04 ThomasTJdev

@ThomasTJdev I didn't succeed in building the dll and I don't understand where I need to put him.

I have only done it on Linux, so I cant help you with Windows. You should follow https://libxlsxwriter.github.io/getting_started.html#gsg_ming . If you have problems building it, you should look at libxlsxwriter repo here https://github.com/jmcnamara/libxlsxwriter/issues.

I already tried to look at builds. I finally succeed in getting the zlib.dll and libxlsxwriter.dll. I placed them with the compiled nim(the exe output of the compile). Unfortunately, it's still not working I am getting the same error. if you can try it your self on windows or VM(windows), I will very appreciate that. thx.

whydee86 avatar Apr 18 '20 12:04 whydee86

Ping @KeepCoolWithCoolidge

ThomasTJdev avatar May 03 '20 17:05 ThomasTJdev

Hi @KeepCoolWithCoolidge

Are you interested in the PR? Otherwise I'll go making a production fork.

ThomasTJdev avatar Oct 18 '20 14:10 ThomasTJdev

Hi @KeepCoolWithCoolidge

I'll make my fork production ready, and I'll request changing the Nimble package file to point on my repo: https://github.com/ThomasTJdev/nimlibxlsxwriter

ThomasTJdev avatar Dec 13 '20 04:12 ThomasTJdev

@ThomasTJdev could you enable issues on your repo? I am trying to install it and it is failing:

$ nimble install
   Warning: Package 'nimlibxlsxwriter' has an incorrect structure. It should contain a single directory hierarchy for source files, named 'nimlibxlsxwriter', but file 'doc_custom_properties.nim' is in a directory named 'tests' instead. This will be an error in the future.
      Hint: If 'tests' contains source files for building 'nimlibxlsxwriter', rename it to 'nimlibxlsxwriter'. Otherwise, prevent its installation by adding `skipDirs = @["tests"]` to the .nimble file.
Setting up Git repo: https://github.com/jmcnamara/libxlsxwriter
Pulling repository
Command failed: 1
git pull --depth=1 origin master
fatal: no se puedo encontrar ref remota master

stack trace: (most recent call last)
/tmp/nimblecache-1023837959/nimscriptapi_3203592219.nim(199, 29)
/tmp/nimlibxlsxwriter/nimlibxlsxwriter.nimble(24, 14) installBefore
/tmp/nimlibxlsxwriter/nimlibxlsxwriter.nimble(21, 10) setupTask
/home/jose/.choosenim/toolchains/nim-#devel/lib/system/nimscript.nim(273, 7) exec
/home/jose/.choosenim/toolchains/nim-#devel/lib/system/nimscript.nim(273, 7) Error: unhandled exception: FAILED: nimgen nimlibxlsxwriter.cfg [OSError]
       Tip: 3 messages have been suppressed, use --verbose to show them.
     Error: Exception raised during nimble script execution
$ nim -version
Nim Compiler Version 1.5.1 [Linux: amd64]
Compiled at 2021-03-31
Copyright (c) 2006-2021 by Andreas Rumpf

git hash: 7c09e0c75773a2df6469a2acd94f3090aef83255
active boot switches: -d:release

mantielero avatar May 10 '21 19:05 mantielero

@mantielero, sorry - issues are now activated.

ThomasTJdev avatar May 10 '21 19:05 ThomasTJdev