に私は私のアプリのコードを書いていたし、今私は私が作った混乱を修正することはできませんし、私は正確にIDE 再定義C++ Builderの10.1
に何が起こっているのか分からない:C + +ビルダー10.1ベルリン(FMX)
ERROR1:
[bccaarm Error] texts.cpp(12): redefinition of 'Form4'
texts.cpp(12): previous definition is here
ERROR2:
[bccaarm Error] texts.cpp(14): redefinition of 'TForm4'
texts.cpp(14): previous definition is here
texts.cpp:
//---------------------------------------------------------------------------
#include <fmx.h>
#pragma hdrstop
#include "texts.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.fmx"
TForm4 *Form4;
//---------------------------------------------------------------------------
__fastcall TForm4::TForm4(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
texts.h:
//---------------------------------------------------------------------------
#ifndef textsH
#define textsH
//---------------------------------------------------------------------------
#include <System.Classes.hpp>
#include <FMX.Controls.hpp>
#include <FMX.Forms.hpp>
#include <FMX.Controls.Presentation.hpp>
#include <FMX.StdCtrls.hpp>
#include <FMX.Types.hpp>
//---------------------------------------------------------------------------
class TForm4 : public TForm
{
__published: // IDE-managed Components
TLabel *erremptb;
TLabel *errnofloat;
TLabel *errjustpos;
TLabel *errnoneg;
TLabel *errinp2;
TLabel *errinp1;
private: // User declarations
public: // User declarations
__fastcall TForm4(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern PACKAGE TForm4 *Form4;
//---------------------------------------------------------------------------
#endif
あなたはより多くの情報が必要な場合はちょうど私にそれを伝え、あなたがテキストで
私はあなたが示しているコードに間違いはありません。再定義は発生しません。 –
私はあなたが 'texts.cpp'をどこかに2回入れていると思います。これをチェックするには '#ifndef textsCPP #define textsCPP ... endif'文を(' texts.h'のように)追加します。コンパイルされた場合はそのようになります。私の賭けはあなたがどこかで別のフォームにそれを含めることです... – Spektre