Visual C++ 2008 Express Edition



  • Ich moechte mit der Visual C++ 2008 Express Edition das hello Beispiel compilieren.
    Ich bekomme aber laufend eine Fehlermeldung:

    ------ Erstellen übersprungen: Projekt: Hello ------

    ========== Build: 0 erfolgreich oder aktuell, Fehler bei 0, 1 übersprungen ==========

    Was kann ich tun?
    Braucht der Compiler einen zusaetzlichen Pfad? 😕



  • Du musst unter die Build Configurationen anpassen...
    Sollte zwar default mässig schon ok sein, scheint aber bei dir nicht so zu sein.



  • Meinst du den Konfigurations-Manager? 😕
    Was genau muss ich da aendern?



  • Hey theta! Besuchst du das C-plusplus Forum nicht mehr? 😞
    Ich brauche jemanden, der mir mit den richtigen Einstellungen hilft. 🙄 😮



  • eric falbe schrieb:

    Ich moechte mit der Visual C++ 2008 Express Edition das hello Beispiel compilieren.
    Ich bekomme aber laufend eine Fehlermeldung:

    ------ Erstellen übersprungen: Projekt: Hello ------

    ========== Build: 0 erfolgreich oder aktuell, Fehler bei 0, 1 übersprungen ==========

    Was kann ich tun?
    Braucht der Compiler einen zusaetzlichen Pfad? 😕

    Was für ein Projekt hast du den erstellt? -> Konsolenanwendung ?
    Zeig den Cpp Code.

    Gruss Sheldor



  • Ich habe das MFC Sample "hello.cpp" compiliert bzw. dieses versucht. 🙄
    Der Quellcode findet sich bei mir in diesem Veryeichniss:
    My Documents\Visual Studio Samples\1033\AllVCLanguageSamples\C++\MFC\general\hello

    // hello.cpp : Defines the class behaviors for the application.
    //           Hello is a simple program which consists of a main window
    //           and an "About" dialog which can be invoked by a menu choice.
    //           It is intended to serve as a starting-point for new
    //           applications.
    //
    // This is a part of the Microsoft Foundation Classes C++ library.
    // Copyright (c) Microsoft Corporation.  All rights reserved.
    //
    // This source code is only intended as a supplement to the
    // Microsoft Foundation Classes Reference and related
    // electronic documentation provided with the library.
    // See these sources for detailed information regarding the
    // Microsoft Foundation Classes product.
    
    #include "stdafx.h"
    #include "resource.h"
    
    #include "hello.h"
    
    /////////////////////////////////////////////////////////////////////////////
    
    // theApp:
    // Just creating this application object runs the whole application.
    //
    CTheApp NEAR theApp;
    
    /////////////////////////////////////////////////////////////////////////////
    
    // CMainWindow constructor:
    // Create the window with the appropriate style, size, menu, etc.
    //
    CMainWindow::CMainWindow()
    {
    	LoadFrame(IDR_MAINFRAME);
    }
    
    // OnPaint:
    // This routine draws the string "Hello, Windows!" in the center of the
    // client area.  It is called whenever Windows sends a WM_PAINT message.
    // Note that creating a CPaintDC automatically does a BeginPaint and
    // an EndPaint call is done when it is destroyed at the end of this
    // function.  CPaintDC's constructor needs the window (this).
    //
    void CMainWindow::OnPaint()
    {
    	CRect rect;
    	GetClientRect(rect);
    
    	CPaintDC dc(this);
    	dc.SetTextAlign(TA_BASELINE | TA_CENTER);
    	dc.SetTextColor(::GetSysColor(COLOR_WINDOWTEXT));
    	dc.SetBkMode(TRANSPARENT);
    	CString s;
    	s.LoadString(IDS_HELLO);
    	dc.TextOut((rect.right / 2), (rect.bottom / 2), s);
    }
    
    // OnAbout:
    // This member function is called when a WM_COMMAND message with an
    // ID_APP_ABOUT code is received by the CMainWindow class object.   The
    // message map below is responsible for this routing.
    //
    // We create a ClDialog object using the "AboutBox" resource (see
    // hello.rc), and invoke it.
    //
    void CMainWindow::OnAbout()
    {
    	CDialog about(IDD_ABOUTBOX);
    	about.DoModal();
    }
    
    // CMainWindow message map:
    // Associate messages with member functions.
    //
    // It is implied that the ON_WM_PAINT macro expects a member function
    // "void OnPaint()".
    //
    // It is implied that members connected with the ON_COMMAND macro
    // receive no arguments and are void of return type, e.g., "void OnAbout()".
    //
    BEGIN_MESSAGE_MAP( CMainWindow, CFrameWnd )
    	//{{AFX_MSG_MAP( CMainWindow )
    	ON_WM_PAINT()
    	ON_COMMAND(ID_APP_ABOUT, OnAbout)
    	//}}AFX_MSG_MAP
    END_MESSAGE_MAP()
    
    /////////////////////////////////////////////////////////////////////////////
    // CTheApp
    
    // InitInstance:
    // When any CTheApp object is created, this member function is automatically
    // called.  Any data may be set up at this point.
    //
    // Also, the main window of the application should be created and shown here.
    // Return TRUE if the initialization is successful.
    //
    BOOL CTheApp::InitInstance()
    {
    	TRACE0("CTheApp::InitInstance\n");
    
    	m_pMainWnd = new CMainWindow;
    	m_pMainWnd->ShowWindow(m_nCmdShow);
    	m_pMainWnd->UpdateWindow();
    
    	return TRUE;
    }
    


  • Die Express Edition kann kein MFC.


Log in to reply