eclipse juno und C++11



  • Hi,
    ich habe eclipse juno für CPP und cygwin für windows installiert.
    Nun habe ich ein neues C++-Projekt erstellt:

    #include <iostream>
    #include <array>
    int main () {
      std::array<int,6> myarray;
      myarray.fill(5);
      std::cout << "my array contains:";
      for ( int& x : myarray) { std::cout << ' ' << x; }
      std::cout << '\n';
      return 0;
    }
    

    Das Problem ist dass der Compiler mir die folgende Meldung zeigt "Symbol array could not be resolved".
    ich habe Folgendes gemacht:

    - Make a new C++ project Default options for everything. Once created, right-click the project and go to "Properties"
    - C/C++ Build -> Settings -> Tool Settings -> GCC C++ Compiler -> Miscellaneous -> Other Flags. Put -std=c++0x at the end . ... instead of GCC C++ Compiler I have also Cygwin compiler
    - C/C++ General -> Paths and Symbols -> Symbols -> GNU C++. Click "Add..." and paste __GXX_EXPERIMENTAL_CXX0X__ (ensure to append and prepend two underscores) into "Name" and leave "Value" blank.
    - Hit Apply, do whatever it asks you to do, then hit OK.

    und trotzdem das Problem ist immer noch vorhanden 😕
    Wenn ich ein Build vom Projekt mache bekomme ich folgendes in der Konsole gezeigt:

    17:44:25 **** Incremental Build of configuration Debug for project testing ****
    make all
    Building file: ../src/testing.cpp
    Invoking: Cygwin C++ Compiler
    g++ -D__GXX_EXPERIMENTAL_CXX0X__ -O0 -g3 -Wall -c -fmessage-length=0 -std=c++0x -MMD -MP -MF"src/testing.d" -MT"src/testing.d" -o "src/testing.o" "../src/testing.cpp"
    cygwin warning:
    MS-DOS style path detected: E:\ECLIPSE\eclipse-cpp-juno\workspace\testing\Debug
    Preferred POSIX equivalent is: /cygdrive/e/ECLIPSE/eclipse-cpp-juno/workspace/testing/Debug
    CYGWIN environment variable option "nodosfilewarning" turns off this warning.
    Consult the user's guide for more details about POSIX paths:
    http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
    cc1plus: error: unrecognized command line option "-std=c++0x"
    src/subdir.mk:18: recipe for target `src/testing.o' failed
    make: *** [src/testing.o] Error 1

    17:44:25 Build Finished (took 391ms)

    Hat Jmd ne Idee wie ich das Problem lösen kann 🙄

    Für jede Hilfe bin ich sehr dankbar 😉
    Schöne Grüße
    Aha



  • Dieser Thread wurde von Moderator/in SeppJ aus dem Forum C++ (auch C++0x und C++11) in das Forum Compiler- und IDE-Forum verschoben.

    Im Zweifelsfall bitte auch folgende Hinweise beachten:
    C/C++ Forum :: FAQ - Sonstiges :: Wohin mit meiner Frage?

    Dieses Posting wurde automatisch erzeugt.



  • Ich habe noch keine Lösung für das Problemchen gefunden 😮
    Kennt jmd ne Entwicklungsumgebung für C++ wo der Compiler C++11 erkennt (freeware natürlich 😋 )?

    Grüße
    Aha


Anmelden zum Antworten