Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not load: iupcontrols.dll #13

Open
OxeStone opened this issue Sep 5, 2022 · 7 comments
Open

Could not load: iupcontrols.dll #13

OxeStone opened this issue Sep 5, 2022 · 7 comments

Comments

@OxeStone
Copy link

OxeStone commented Sep 5, 2022

I am able to compile the modules dependent on 'iupcontrols.dll', however, during execution, I get the message that the DLL could not be loaded. Any advice? Thank you.

@dariolah
Copy link
Owner

dariolah commented Sep 5, 2022

A guessing game:

  • iupcontrols.dll is in PATH, e.g. same directory as .exe?
  • iupcontrols.dll is same version, 32/64 bit, as .exe?
  • iupcontrols.dll is compiled with same compiler as .exe? GCC/Mingw or VCC
    $ file iupcontrols.dll
    iupcontrols.dll: PE32+ executable (DLL) (console) x86-64, for MS Windows

@OxeStone
Copy link
Author

OxeStone commented Sep 6, 2022

Thank you for the quick response. I omitted to mention the issue when I try to run 'matrix.nim' and 'plot.nim'. I had checked the above suggestions before posting. It turns IUP DLLs need other DLLs not included in the IUP zip file such as 'cd.dll', 'cdgl.dll' etc. Now I get the following message when running 'plot.nim'
could not import: cdCanvasFont
I am using MinGW compiler and libraries.
Cheers!

@OxeStone
Copy link
Author

OxeStone commented Sep 6, 2022

Update: I tried all 36 examples under NIUPC. All work except 'plot' and 'webbrowser'. Different errors.
plot: could not import: cdCanvasFont
webbrowser: (no errors warnings or messages).
Thank you!

@dariolah
Copy link
Owner

dariolah commented Sep 6, 2022

There are more libraries needed, see...
https://www.tecgraf.puc-rio.br/iup/en/download_tips.html

This is list of DLLs I'm using for testing ...

cdcontextplus.dll
cddirect2d.dll
cd.dll
cdgl.dll
cdim.dll
cdpdf.dll
freetype6.dll
ftgl.dll
iupcd.dll
iupcontrols.dll
iup.dll
iupglcontrols.dll
iupgl.dll
iupim.dll
iupimglib.dll
iup_mglplot.dll
iupole.dll
iup_plot.dll
iup_scintilla.dll
iuptuio.dll
pdflib.dll
zlib1.dll

Additional for mingw cross compiling, probably you don't need them

boehmgc64.dll
libgcc_s_seh-1.dll
libstdc++-6.dll
libwinpthread-1.dll

@OxeStone
Copy link
Author

OxeStone commented Sep 6, 2022

I have the same DLLs in the first list in my 'IUP' directory
I don't have 'boehmgc64.dll'
I have 'libgcc_s_sjlj-1.dll' instead of 'libgcc_s_seh-1.dll' (same)
I have 'libstdc++-6.dll' and 'libwinpthread-1.dll'

I use VS Code and the 'nim' extension. How do you compile and run 'plot.nim'?

@dariolah
Copy link
Owner

dariolah commented Sep 6, 2022

Same as all other examples, nothing special about it. See niupc\Makefile
It's been a while since I've run it, only tested compiling it.

I've tried now plot and I have broken install of IUP on Linux, libCD specifically :D

When I try windows build I get error about importing function:
could not import: cdCanvasFont

Add this option to compile command: -d:nimDebugDlOpen

Or you can try to run it with procmon, maybe it will show you why it fails.:
https://docs.microsoft.com/en-us/sysinternals/downloads/procmon

cd.dll has symbol cdCanvasFont no idea why it is not loading it. When I'll have more time I'll try with C example then work out Nim version.

@dariolah
Copy link
Owner

Small update, plot example works on Linux as is. Still no clue why Win version, cross compiled + wine, fails

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants