Closed super-tomcat closed 5 years ago
Sorry about that, haven't tested it on Windows. Error is from Linux specific code for dlopen workaround in 'niup'. Try with latest 'niup' code: 3.27.3. I've committed fix but haven't tested it.
Or you can manually remove block of code from beginning of niup.nim, between lines:
# BEGIN workaround ...
...
# END workaround
Hello, I made the suggestions you said in that i removed the code between
...
And this did allow most of the examples to compile and work, however i got these errors.....
All examples 4_1 to 4_4 do not work because there is no niupext ?
simple_notepad.nim does not work because it looks for libiupimglib.dll ?
scintilla_notepad.nim does not compile because it says:
(28,15) Error: type mismatch: got
'niupext' is part of 'niup' package. In same folder where you removed code should be file niupext.nim. If it is missing please upgrade/install 'niup' with nimble.
Name of dll is wrong, prefix 'lib' should be removed. You can modify niup.nim and change references from 'lib.dll' to '.dll'. In this case it should be 'iupimglib.dll'.
For scintilla_notepad you'll need to rename 'libiup_scintilla.dll' to 'iup_scintilla.dll' in niup.nim.
From first error report I see that you are using nim 0.19.2. Please upgrade to 0.20.2 and try again.
If problem persists I'll install windows dev environment and try it.
Hi, first of all thanks for all the help... I am going through your last message but here are some answers for now...
ignore where it says I am using Nim 0.19.2, that is just a folder name from when I first installed Nim… I always update that folder with the current Nim so I am actually using the latest version which for me is version...0.20.2
You say that the latest version of niup is version 3.27.3, yet when ever I install it with Nimble (tried a few times now) I only get version 3.27.2 ?
Also each time I install niup with Nimble I look in the package folder and there is:
nimblemeta.json niup.nim niup.nimble
But no niupext.nim file ?
After more tests i edited these to get rid of the lib prefix on the dll's....
when defined(windows): const libiupSONAME = "iup.dll" libiupcdSONAME = "iupcd.dll" libiupcontrolsSONAME = "iupcontrols.dll" libiupglcontrolsSONAME = "iupglcontrols.dll" libiupglSONAME = "iupgl.dll" libiupimglibSONAME = "iupimglib.dll" libiupimSONAME = "iupim.dll" libiup_mglplotSONAME = "iup_mglplot.dll" libiup_plotSONAME = "iup_plot.dll" libiup_scintillaSONAME = "iup_scintilla.dll" libiuptuioSONAME = "iuptuio.dll" libiupwebSONAME = "iupweb.dll"
So its just scintilla_notepad.nim that i cannot get to compile, it stops on line 28 saying:
(28, 15) Error: type mismatch: got <int> but expected 'clong = int32'
I've commited fix in scinetilla_notepad.nim This whole proc setMarkerMask looks redundant. Probably planned for future usage but in this case is overhead. Problem is probably in how windows and linux C compilers define long type (32 or 64 bit).
Regarding 'niup' upgrade to latest version I don't know exactly how nimble works. Manual options are:
scinetilla_notepad.nim is in github, update it same sa niup package.
I've tested it by cross compiling on Linux with Mingw and running it with wine:
PS although examples are rewrites of official tutorial in C, code is not 100% same. I've made small changes possibly some bugs. This proc setMarkerMask is example, result of quick-n-dirty copy-paste, without analyzing it.
Hello, I still only get version 3.72.2 when I install with Nimble? And that's after doing Nimble refresh and also deleting the niup folder and reinstalling.
I tried your new version scintilla_notepad.nim, which does compile but pops up a message box saying:
Error could not load: iup_scintilla.dll
This is strange because the iup_scintilla.dll is in the same folder as scintilla_notepad.nim, so why it cannot find it I don't know??
I forgot to push git tag. Try now with nimble.
I had to copy dll-s from _/usr/lib/gcc/x8664-w64-mingw32/7.3-win32/ to local folder, where iup dll-s are:
These are part of mingw compiler and iup_scintilla.dll sepends on them.
https://stackoverflow.com/questions/6404636/libstdc-6-dll-not-found/6404637#6404637
That's it, now updated to 3.72.4 via Nimble.
You still need to change:
when defined(Windows): const libiupSONAME = "iup.dll" libiupcdSONAME = "libiupcd.dll" libiupcontrolsSONAME = "libiupcontrols.dll" libiupglcontrolsSONAME = "libiupglcontrols.dll" libiupglSONAME = "libiupgl.dll" libiupimglibSONAME = "libiupimglib.dll" libiupimSONAME = "libiupim.dll" libiup_mglplotSONAME = "libiup_mglplot.dll" libiup_plotSONAME = "libiup_plot.dll" libiup_scintillaSONAME = "libiup_scintilla.dll" libiuptuioSONAME = "libiuptuio.dll" libiupwebSONAME = "libiupweb.dll"
to
when defined(Windows): const libiupSONAME = "iup.dll" libiupcdSONAME = "iupcd.dll" libiupcontrolsSONAME = "iupcontrols.dll" libiupglcontrolsSONAME = "iupglcontrols.dll" libiupglSONAME = "iupgl.dll" libiupimglibSONAME = "iupimglib.dll" libiupimSONAME = "iupim.dll" libiup_mglplotSONAME = "iup_mglplot.dll" libiup_plotSONAME = "iup_plot.dll" libiup_scintillaSONAME = "iup_scintilla.dll" libiuptuioSONAME = "iuptuio.dll" libiupwebSONAME = "iupweb.dll"
I then copied the .dlls you said to the folder with the iup dlls and scintilla_notepad.nim
And it compiles and runs 👍
Ok, last commit should be final for this issue, 3.27.5. Had it fixed and lost it :/
Thank you :)
hello, I tried to compile the first example in Emacs but it failed with the following message:
C:\Users\Neil\nimcache\example2_1_d_7_7_7_7_7_7C87Users7Neil7.nimble7pkgs7niup-3.277.27niup.nim.c:38:10: fatal error: dlfcn.h: No such file or directory
include
compilation terminated.