yglukhov / nimx

GUI library
MIT License
1.08k stars 76 forks source link

Static Linking Issues #493

Closed wwderw closed 2 years ago

wwderw commented 2 years ago

I have tried using this command that I gleaned from another user's issue with static linking here(#185 ):

nim c -d:release --dynlibOverride:SDL2 --passL:-lSDL2 main.nim

and it appears not be statically linking. It compiles without issue, but it is the same file size as a regular release compilation and when I move it to a different computer it says that it can't find the lib.

I am using Linux with the 1.4.8 Nim release, using sdl2-dev from apt. I even pointed directly to where the SDL so file is and it compiled without issue, just wouldn't statically link.

Is my compiler command wrong or is it something else?

CardealRusso commented 6 months ago

did you solved this? 1.2mb for a hello world dont seems right

wwderw commented 6 months ago

No, it never did and I had kept trying with each new dev release of Nim up until 2.1.1.