probleme beim compilieren



  • betriebssystem: WinXPProf
    compiler: kostenloser Borland C++ Compiler

    ich habe mir den compiler runtergeladen und im verzeichnis C:\Borland\BCC55 installiert.
    die umgebungsvariablen habe ich umgeändert:
    name: path
    wert: %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32 \Wbem;C:\Borland\BCC55\Bin;

    dann noch die CFG dateien erstellt:
    bcc.cfg:
    -I"c:\Borland\Bcc55\Include"
    -L"c:\Borland\Bcc55\Lib"
    ilink32.cfg:
    -L"C:\Borland\Bcc55\Lib"

    folgendes Programm will ich compilieren:
    hallowelt.cpp: (speicherort c:\hallowelt.cpp)

    #include <iostream.h>
    void main (void)
    {
    cout<<"Hallo Welt!";
    }

    in der ms-dos eingabeaufforderung tippe ich ein
    c:\bcc32 hallowelt.cpp

    es erscheint:

    C:\>bcc32 hallowelt.cpp
    Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
    hallowelt.cpp:
    Error E2209 hallowelt.cpp 1: Unable to open include file 'iostream.h'
    Error E2451 hallowelt.cpp 4: Undefined symbol 'cout' in function main()
    *** 2 errors in Compile ***

    bitte um hilfe



  • versuchs mal mit

    #include <iostream>
    

    statt

    #include <iostream.h>
    


  • ich habe es probiert, aber es ändert sich nichts (die gleichen fehlermeldungen)



  • Schätze die Installation ist nicht ganz wie'se sollte. Irgendwelche Umgebungsvariablen nicht gesetzt.



  • 1. scheinst du den Compiler nicht richtig eingerichtet zu haben. Schau am besten mal ob die gegebenen Verzeichnisse korrekt sind

    2. ist dein Code falsch und muss so lauten

    #include <iostream>
    using namespace std;
    
    int main() {
      std::cout << "hello world!";
    }
    

    Erklärungen findest du dazu in der C++ FAQ

    3. benutz bitte Code-Tags



  • Vielen Dank für Eure Bemühungen.
    Ich habe den Compiler neu installiert und es funktioniert.
    Danke!!!
    (ps: die datei bcc.cfg soll bcc32.cfg heißen)


Anmelden zum Antworten