V
V
Volodya Zagornyak2014-10-22 14:16:22
C++ / C#
Volodya Zagornyak, 2014-10-22 14:16:22

Why doesn't a clean Windows Forms project compile on vs2013?

#pragma once

namespace proj2 {

  using namespace System;
  using namespace System::Windows::Forms;
  using namespace System::ComponentModel;
  using namespace System::Collections;
  using namespace System::Data;
  using namespace System::Drawing;

  /// <summary>
  /// Сводка для MyForm
  /// </summary>
  public ref class MyForm : public System::Windows::Forms::Form
  {
  public:
    MyForm(void)
    {
      InitializeComponent();
      //
      //TODO: добавьте код конструктора
      //
    }

  protected:
    /// <summary>
    /// Освободить все используемые ресурсы.
    /// </summary>
    ~MyForm()
    {
      if (components)
      {
        delete components;
      }
    }

  private:
    /// <summary>
    /// Требуется переменная конструктора.
    /// </summary>
    System::ComponentModel::Container ^components;

#pragma region Windows Form Designer generated code
    /// <summary>
    /// Обязательный метод для поддержки конструктора - не изменяйте
    /// содержимое данного метода при помощи редактора кода.
    /// </summary>
    void InitializeComponent(void)
    {
      this->components = gcnew System::ComponentModel::Container();
      this->Size = System::Drawing::Size(300,300);
      this->Text = L"MyForm";
      this->Padding = System::Windows::Forms::Padding(0);
      this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
    }
#pragma endregion
  };
}

vs throws error LNK1561

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
DancingOnWater, 2014-10-22
@vall_gorr

Linker error, missing entry point, read main.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question