[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
MinGW build of 3.2.0: shared libstdc++
From: |
Alexander Mamonov |
Subject: |
MinGW build of 3.2.0: shared libstdc++ |
Date: |
Fri, 5 Jun 2009 14:17:15 -0400 |
Hello Benjamin,
I still haven't lost the hope of building 3.2.0 with MinGW, and I've
been looking into the shared libraries problem that I had before. I
would like to ask your advice. Everybody else familiar with MinGW is
welcome to comment as well (Tatsuro?).
Consider a simple code (main.cxx):
#include <iostream>
void exthrow(void){
int exval = 1;
std::cout << "Exthrow: throwing exception:" << exval << std::endl;
throw exval;
}
int main(int argc, char* argv[]){
try{
exthrow();
}catch(int exval){
std::cout << "Caught exception from exthrow: " << exval <<
std::endl;
}
return 0;
}
Here is what happens:
>g++ -c main.cxx
>g++ -o extest_static.exe main.o
>./extest_static.exe
Exthrow: throwing exception:1
Caught exception from exthrow: 1
>g++ -c -D_DLL main.cxx
>g++ -o extest_shared.exe main.o -lstdc++_s
>./extest_shared.exe
Exthrow: throwing exception:1
terminate called after throwing an instance of 'int'
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
I tried this under GCC 4.3.0 TDM-2. I tried both SJLJ and DW2
versions. Which compiler did you use to compile your Windows release
of 3.0.5? Did you ever observe such problem?
Thank you,
Alex
- MinGW build of 3.2.0: shared libstdc++,
Alexander Mamonov <=