Hi,
just trying to use IUP in Nim and please forgive my ignorance on the subject ... !
I have downloaded the static IUP files: iup-3.30_Win64_mingw6_lib.zip and I extracted it in some folder X.
How can I tell the compiler to use the libraries in folder X?
TIA
My .cfg file for a static linking IUP in my program using MSVC++ compiler:
app = gui
cc = vcc
vcc.exe = "cl.exe"
vcc.linkerexe = "cl.exe"
--cincludes:"D:\\...\\iup" #<-- This is where my iup.h and iup.lib are!
--passL: "iup.lib iupcore.lib user32.lib Advapi32.lib Shell32.lib gdi32.lib comdlg32.lib comctl32.lib uuid.lib oleaut32.lib ole32.lib"
hints = on
This goes in a file next to the main program .nim file, e.g.: myapp.nim.cfg.
The compile command I use is:
nim c --gc:arc myapp.nim
Hope it helps.Hi,
the compilation works, but linking does not work.
My config file:
app = gui
cc = gcc
gcc.exe = "gcc.exe"
gcc.linkerexe = "ld.exe"
--cincludes:"C:\\ProgramFiles\\IUP\\include"
--passL:"iup.lib iupcore.lib user32.lib Advapi32.lib Shell32.lib gdi32.lib comdlg32.lib comctl32.lib uuid.lib oleaut32.lib ole32.lib"
hints = on
I get this error when linking:
ld.exe -mwindows -o E:\MENU\ProgLang\Nim\Src\showenv\showenv.exe C:\Users\HP\nimcache\showenv_d\stdlib_io.nim.c.o C:\Users\HP\nimcache\showenv_d\stdlib_system.nim.c.o C:\Users\HP\nimcache\showenv_d\stdlib_iup.nim.c.o C:\Users\HP\nimcache\showenv_d\@mshowenv.nim.c.o iup.lib iupcore.lib user32.lib Advapi32.lib Shell32.lib gdi32.lib comdlg32.lib comctl32.lib uuid.lib oleaut32.lib ole32.lib
ld.exe: unrecognised emulation mode: windows
Supported emulations: i386pep i386pe
Any ideas?? I know about nothing about gcc et al, but Google told me to use 'ld.exe' as linker ...
Tried that, but gives error:
could not load: iup(|30|27|26|25|24|).dll Error: execution of an external program failed: name-of-my-program>
But still, many thanks for trying to help! I appreciate that very much!
@hotcore
Which Nim IUP library are you using? The libraries available on Nimble, niup and iup, both seem to use dynamic linking (I might be wrong on this, ask the repository maintainers to be sure).
The error you are getting indicates that you are trying to load a dynamic iup.dll library. This should not happen if you are statically linking the iup.a library.
Do you care if the library is statically or dynamically linked? I assumed you wanted to statically link it, as you said: I have downloaded the static IUP files: ...