PDF file - users.etech.haw
Transcription
PDF file - users.etech.haw
Visual Studio 2010 Professional including Service Pack 1 Erste Schritte 1.) Um beim Anlegen eines Projektes im Homedirektory folgende Fehlermeldung zu vermeiden,- empfiehlt es sich folgende Einstellung als erstes vorzunehmen. Tools \ Options \ Text Editor \ C/C++ \ Advanced \ Fallback Location Set <Always Use Fallback Location> from <False> to <True> Set <Do Not Warn If Fallback Location Used> from <False> to <True> Set <Fallback Location> to <"%USERPROFILE%\Local Settings\Temp\VC++"> Erklärung: The message is safe to ignore, what that is saying is that for performance reasons it won't use the solution directory to store the intellisense database because it is on a network share. 2.) Folgende MessageBox erscheint beim Öffnen einer bestehenden Solution: Tipp: Den Haken bei der Checkbox entfernen! 3.) Der Button <Browse...> versteckt Netzwerklaufwerke: Beim Erstellen eines Projektes sollten Sie im Feld <Location> erst "H:\" eingeben, bevor Sie den Button <Browse...> benutzen. Dann wird auch das HomeDirektory sichtbar. Das ist der sicherste Platz für Projektdaten im Netz. Was auf C:\ liegt kann leicht verloren gehen. Erstellen eines leeren Projekts File \ New \ Project... Installed Templates \ Visual C++ \ Win32 \ Win32 Console Application Create directory for solution: Add to source control: Name: Location: Disable Disable <Ihr Projektname> <Projektpfad> Empfehlung: "H:\VC2010\PRP1" => OK Welcome to the Win32 Application Wizard => Application Settings Application type: Console application Additional options: Empty project: Precompiled header: Add common header files for: ATL: MFC: => Finish Enable Disable Disable Disable Einem bestehenden Projekt eine Quellcodedatei hinzufügen Project \ Add New Item... Installed Templates \ Visual C++ \ Code \ C++ File (.cpp) Name: <filename> => Add Enter: #include <stdio.h> #include <stdlib.h> int main(void) { printf("\n Hello World \n"); return 0; } Empfehlung: Sofort Speichern mit <Save> oder <Save All> Compilieren CTRL+F7 oder Rechts Klick auf <filenname.cpp> \ Compile Compilieren und Linken F7 oder Rechts Klick auf <projectname> \ Build Programm starten CTRL+F5 oder Debug \ Start Without Debugging F5 oder Debug \ Start Debugging Unnötige Warnungen ausblenden Beispiel: 'scanf': This function or variable may be unsafe. Im Projekt ist folgende Änderung durchzuführen: Project \ Properties (Alt+F7) Configuration Properties \ C/C++ \ Preprocessor Click on Preprocessor Definitions \ <Edit...> Add: _CRT_SECURE_NO_WARNINGS Von nun an ist diese Art Warnung Projektbezogen ausgeschaltet.