gcc3

dynamic_cast failed when hiding symbol

南笙酒味 提交于 2020-01-02 08:25:43
问题 I have many static libraries. One is static_lib_a.a. I create a dynamic library, dynamic_lib.so to put them together. In static_lib_a.a, it uses xerces 3.1.1 to parse xml. The following is the code snippet in static_lib_a.a xerces::DOMElement *pElementNode = dynamic_cast<xerces::DOMElement *>(pNode); The type of pNode is xerces::DOMNode. It is assigned to an object of xerces::DOMElement. This line of code will do downcasting. In order to hide all symbols of static_lib_a.a in dynamic_lib.so, I

Why isn't the gcc 4.x.x series compilers installed by MinGW by default?

时光毁灭记忆、已成空白 提交于 2020-01-02 08:03:22
问题 Currently, MinGW's only installs the 3.x.x series of the gcc compiler by default. However, it looks like the 4.x.x series of compilers have been out for some time, and as others have mentioned, it seems to work just fine. Is there any reason why it hasn't moved to the 4.x.x versions yet, and any reason why I shouldn't use the newer versions of gcc? 回答1: GCC4's C++ ABI has changed from GCC3, and it includes a lot of new features (like its tree vectorization) that a lot of people still consider

Why isn't the gcc 4.x.x series compilers installed by MinGW by default?

戏子无情 提交于 2020-01-02 08:03:20
问题 Currently, MinGW's only installs the 3.x.x series of the gcc compiler by default. However, it looks like the 4.x.x series of compilers have been out for some time, and as others have mentioned, it seems to work just fine. Is there any reason why it hasn't moved to the 4.x.x versions yet, and any reason why I shouldn't use the newer versions of gcc? 回答1: GCC4's C++ ABI has changed from GCC3, and it includes a lot of new features (like its tree vectorization) that a lot of people still consider

Error compiling GCC 3.4.6 in Ubuntu 14.04

空扰寡人 提交于 2019-12-10 01:54:45
问题 I am trying to compile GCC 3.4.6 in Ubuntu 14.04 x64. It already has newer version of GCC-4.8.2. I ran ./configure --prefix=/usr/local/gcc-3.4 and make . I ended up in several errors for which I could find solutions on searching. Error 1 Error 2 Finally I ended up in this error, which I couldn't find any solution. ../../gcc/unwind-dw2.c: In function `uw_frame_state_for': ../../gcc/unwind-dw2.c:1031: error: field `info' has incomplete type make[2]: *** [libgcc/32/unwind-dw2.o] Error 1 make[2]:

Strange behavior when casting an int to float in C

霸气de小男生 提交于 2019-12-10 00:40:53
问题 I have a doubt concerning the output of the following C program. I tried to compile it using both Visual C++ 6.0 and MinGW32 (gcc 3.4.2). #include <stdio.h> int main() { int x = 2147483647; printf("%f\n", (float)2147483647); printf("%f\n", (float)x); return 0; } The output is: 2147483648.000000 2147483647.000000 My question is: why are both lines different? When you convert the integer value 2147483647 to the IEEE 754 floating-point format, it gets approximated to 2147483648.0. So, I expected

dynamic_cast failed when hiding symbol

ⅰ亾dé卋堺 提交于 2019-12-05 20:09:08
I have many static libraries. One is static_lib_a.a. I create a dynamic library, dynamic_lib.so to put them together. In static_lib_a.a, it uses xerces 3.1.1 to parse xml. The following is the code snippet in static_lib_a.a xerces::DOMElement *pElementNode = dynamic_cast<xerces::DOMElement *>(pNode); The type of pNode is xerces::DOMNode. It is assigned to an object of xerces::DOMElement. This line of code will do downcasting. In order to hide all symbols of static_lib_a.a in dynamic_lib.so, I use -fvisibility=hidden to build this static library. I found if I add - fvisibility=hidden ,

Strange behavior when casting an int to float in C

纵然是瞬间 提交于 2019-12-04 22:26:28
I have a doubt concerning the output of the following C program. I tried to compile it using both Visual C++ 6.0 and MinGW32 (gcc 3.4.2). #include <stdio.h> int main() { int x = 2147483647; printf("%f\n", (float)2147483647); printf("%f\n", (float)x); return 0; } The output is: 2147483648.000000 2147483647.000000 My question is: why are both lines different? When you convert the integer value 2147483647 to the IEEE 754 floating-point format, it gets approximated to 2147483648.0. So, I expected that both lines would be equal to 2147483648.000000. EDIT : The value "2147483647.000000" can't be a