"Incongruous" <[email protected]> writes: > OooooKay? > > Code Snip > ~~~~~~~~ > #include <memory> //share_ptr > std::shared_ptr<abc::someClass> apx; //<--Does not work > > Error > ~~~~ > g++ -c -g -I/c/abc -I/c/abc/gui/msg/ -MMD -MP -MF > build/Debug/MinGW64-Windows/_ext/348948719/MyClass.o.d -o > build/Debug/MinGW64-Windows/_ext/348948719/MyClass.o > /C/abc/MyClass/MyClass.cpp > In file included from c:/abc/MyClass/MyClass.cpp:1:0: > c:/abc/MyClass/MyClass.hpp:92:5: error: 'shared_ptr' in namespace 'std' does > not name a type > std::shared_ptr<abc::someClass> apx; //! All purpose exception > > What do I want? > ~~~~~~~~~~~~~~~ > I would like to know if MinGW is able to compile the line above or if C++11 > compliant. I know that VS2010+ has not problem compiling the code above. > > I hope this information is enough.
Yes, that's precisely how an effective call for help should look like. C++11 support needs to be explicitly enabled on g++. Try putting -std=gnu++0x as one of the first options on the command line (just after g++, for instance). The -std option has several possible values, the one I mentioned should work on relatively old g++ versions and on programs that use GNU extensions too. There are variants for strict C++11 support. See the g++ documentation for further details. MSVC++ has C++11 support enabled by default. ------------------------------------------------------------------------------ Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more! Discover the easy way to master current and previous Microsoft technologies and advance your career. Get an incredible 1,500+ hours of step-by-step tutorial videos with LearnDevNow. Subscribe today and save! http://pubads.g.doubleclick.net/gampad/clk?id=58041391&iu=/4140/ostg.clktrk _______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
