Sysprogs forums › Forums › VisualGDB › regarding prev issue :compiler and library support for the ISO C++ 2011 standard
- This topic has 3 replies, 2 voices, and was last updated 8 years, 2 months ago by support.
-
AuthorPosts
-
September 14, 2016 at 14:50 #9058akhilavitParticipant
adding “-std=c++11” to the CXXFLAGS field in VisualGDB Project Properties,
works and resolves error of compiler version
But it raised many new errors
C:\Users\akhils\AppData\Local\VisualGDB\RemoteSourceCache\192.168.0.54\0001\include\mm_malloc.h(34,64): error : declaration of C function `int posix_memalign(void**, int, int)’ conflicts with
1> extern “C” int posix_memalign (void **, size_t, size_t) throw ();Firstly, please confirm that I had to add -std=c++11 only, in project -> visualGDB project properties -> make file setting -> CXXFLAGS?
If NO, then please tell me how to add
September 15, 2016 at 01:48 #9062supportKeymasterHi,
Looks like your system headers may be too old and don’t support C++11 properly. Please examine the build output and try to understand why they have 2 different definitions of posix_memalign(). Once you locate both definitions, you can try modifying them to ensure they both match.
September 16, 2016 at 10:49 #9072akhilavitParticipant1>—— Build started: Project: RevLib, Configuration: LinuxConfig x64 ——
1>Build started 16-09-2016 15:11:06.
1>Build:
1> VisualGDB: Sending 2 updated source files to build machine…
1> VisualGDB: Run “make CONFIG=LinuxConfig” in directory “/tmp/VisualGDB/d/User/Akhil/Ubuntu/RevLib/wrk” on ubuntu@192.168.0.54 (SSH)
1> g++ -std=gnu++11 -I/tmp/VisualGDB/d/User/Akhil/Ubuntu/RevLib/src/Data -I/tmp/VisualGDB/d/User/Akhil/Ubuntu/RevLib/src/Math -I/tmp/VisualGDB/d/User/Akhil/Ubuntu/RevLib/API -I/tmp/VisualGDB/d/User/Akhil/Ubuntu/RevLib/src/Algo -I/tmp/VisualGDB/d/User/Akhil/Ubuntu/RevLib/src/Topo -I/tmp/VisualGDB/d/User/Akhil/Ubuntu/RevLib/src/Util -DDEBUG=1 -DBUILDING_FOR_LINUX -c ../src/Algo/DataProcessor.cpp -o LinuxConfig/DataProcessor.o -MD -MF LinuxConfig/DataProcessor.dep
1> In file included from /usr/lib/gcc/x86_64-linux-gnu/4.8/include/xmmintrin.h:38:0,
1> from /usr/lib/gcc/x86_64-linux-gnu/4.8/include/x86intrin.h:34,
1> from /usr/include/x86_64-linux-gnu/c++/4.8/bits/opt_random.h:33,
1> from /usr/include/c++/4.8/random:51,
1> from /usr/include/c++/4.8/bits/stl_algo.h:65,
1> from /usr/include/c++/4.8/algorithm:62,
1> from /tmp/VisualGDB/d/User/Akhil/Ubuntu/RevLib/src/Topo/vertex.h:15,
1> from /tmp/VisualGDB/d/User/Akhil/Ubuntu/RevLib/src/Topo/mesh.h:22,
1> from ../src/Algo/DataProcessor.cpp:7:
1>C:\Users\akhils\AppData\Local\VisualGDB\RemoteSourceCache\192.168.0.54\0001\include\mm_malloc.h(34,64): error : declaration of C function `int posix_memalign(void**, int, int)’ conflicts with
1> extern “C” int posix_memalign (void **, size_t, size_t) throw ();
1> ^
1> In file included from /usr/include/c++/4.8/cstdlib:72:0,
1> from /usr/include/c++/4.8/ext/string_conversions.h:41,
1> from /usr/include/c++/4.8/bits/basic_string.h:2815,
1> from /usr/include/c++/4.8/string:52,
1> from ../src/Algo/DataProcessor.h:9,
1> from ../src/Algo/DataProcessor.cpp:2:
1>C:\Users\akhils\AppData\Local\VisualGDB\RemoteSourceCache\192.168.0.54\0000\include\stdlib.h(503,12): error : previous declaration `int posix_memalign(void**, size_t, size_t)’ here
1> extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size).
.
.
.
This is my output. Now what do you mean by a modification in a function? should I change system function?
September 16, 2016 at 18:22 #9076supportKeymasterHi,
According to your log, there are 2 definitions of the
posix_memalign
() function:- C:\Users\akhils\AppData\Local\VisualGDB\RemoteSourceCache\192.168.0.54\0001\include\mm_malloc.h(34,64)
- C:\Users\akhils\AppData\Local\VisualGDB\RemoteSourceCache\192.168.0.54\0000\include\stdlib.h(503,12)
This normally means that your system is too old and does not support C++11 properly. You can try patching the headers to have matching definitions at your own risk, but you may encounter further problems with C++11 on that system.
-
AuthorPosts
- You must be logged in to reply to this topic.