2013/8/22 Tony Richardson <[email protected]>
> I installed mingw-64 via the cygwin (cygwin64) package manager. I am
> running Windows 8.
>
> I compiled an example C++ program using the x86_64-w64-mingw32-c++
> compiler. When I run the program I receive the error:
>
> error while loading shared libraries: libgcc_s_seh-1.dll: cannot open
> shared object file: No such file or directory
>
> This dll is actually present in directory
> /usr/x86_64-w64-mingw32/sys-root/mingw/bin/libgcc_s_seh-1.dll.
>
> If I include the directory /usr/x86_64-w64-mingw32/sys-root/mingw/bin/ in
> my PATH environment variable the program runs fine, but I haven't seen
> anything that says that I am supposed to do this, so I think something in
> my environment is not properly configured. Does anyone have any idea why I
> am getting this error or is including this directory in my PATH the right
> thing to do?
>
If you want to redistribute the application, you'll need to put the GCC
runtime DLLs ou use (libgcc, libstdc++, libgfortran, etc.) alongside the
.exe.
If this is solely for your development purposes, adding the directory
containing these files to PATH is perfectly fine.
>
> Note 1: I am compiling an example program from the CImg library (an image
> processing library). The full compilation command is:
>
> x86_64-w64-mingw32-c++ tetris.cpp -mwindows -D cimg_OS=2 -lgdi32
>
> Note 2: As you might expect, if I add the compilation option "-static" I
> no longer get the error.
>
This prevents linking of the DLL, instead using the static library
versions, so no DLL is needed.
You are aware that you do not need Cygwin for MinGW-w64? There are native
toolchains that can be used on Windows.
Ruben
>
> Thanks
> Tony Richardson
>
>
> ------------------------------------------------------------------------------
> Introducing Performance Central, a new site from SourceForge and
> AppDynamics. Performance Central is your source for news, insights,
> analysis and resources for efficient Application Performance Management.
> Visit us today!
> http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
> _______________________________________________
> Mingw-w64-public mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
>
>
------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and
AppDynamics. Performance Central is your source for news, insights,
analysis and resources for efficient Application Performance Management.
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public