El Jueves 30 Julio 2009ES 17:15:56 Robert Millan escribió:
> Now that I check, the mingw32 package doesn't include any DLL either, only
> static objects like libgcc.a.  Why is this not an issue there?

Yes, good question. I reinstalled the mingw32 4.2.1.dfsg-1 package and made 
some tests. It seems that either that mingw version (4.2.1) or the package 
are setting implicitly a static linking of libgcc:

$ i586-mingw32msvc-g++ testcpp.cpp -o testcpp.exe -shared-libgcc
/usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/bin/ld: 
cannot find -lgcc_s
collect2: ld returned 1 exit status

while

$ i586-mingw32msvc-g++ testcpp.cpp -o testcpp.exe -static-libgcc

or

$ i586-mingw32msvc-g++ testcpp.cpp -o testcpp.exe
$ wine testcpp.exe
testing
$

Nevertheless, I couldn't be able to discover from the rules file which switch 
could be the one needed to do it.

> > Reading the release notes I have found that one can use the
> > switch "-static-libgcc" at linking stage in order to get rid of that
> > dependency "for all languages other than C". I have tested this with a
> > C++ example and it works.
>
> Can you provide a test case?

Yes,

--------------8<-------------------

#include <iostream>

int main()
{
  std::cout << "testing\n";
  return 0;
}

--------------8<-------------------

$ i586-mingw32msvc-g++ testcpp.cpp -o testcpp.exe
$ wine testcpp.exe
err:module:import_dll Library libgcc_s_sjlj-1.dll (which is needed by L"Z:
\\home\\alberto\\blas32\\BLAS\\cmakemingw\\testcpp.exe") not found
err:module:LdrInitializeThunk Main exe initialization for L"Z:
\\home\\alberto\\blas32\\BLAS\\cmakemingw\\testcpp.exe" failed, status 
c0000135

$ i586-mingw32msvc-g++ testcpp.cpp -o testcpp.exe -static-libgcc
$ wine testcpp.exe
testing
$



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to