Jump to content
과거의 기술자료(읽기 전용): https://tech.devgear.co.kr ×
과거의 기술자료(읽기 전용): https://tech.devgear.co.kr

C++빌더 컴파일러, 11 알렉산드리아에서 사용 가능


Recommended Posts

 

이 글에서는 C++빌더 11 알렉산드리아 버전에 포함된 C++ 커맨드 라인 컴파일러에 대한 버전 출력 내용을 다룬다.

bcc32.exe --version
 
C:Program Files (x86)EmbarcaderoStudio22.0bin>bcc32.exe --version
Embarcadero C++ 7.60 for Win32 Copyright (c) 1993-2021 Embarcadero Technologies, Inc.
Revision 7.60.7880.37811
 
bcc32c.exe  --version
 
C:Program Files (x86)EmbarcaderoStudio22.0bin>bcc32c.exe  --version
Embarcadero C++ 7.60 for Win32 Copyright (c) 2012-2021 Embarcadero Technologies, Inc.
Embarcadero Technologies Inc. bcc32c version 5.0.2 (69de348c.c83071db.37689) (based on LLVM 5.0.2)
Target: i686-pc-windows-omf
Thread model: posix
InstalledDir: C:Program Files (x86)EmbarcaderoStudio22.0bin
 
bcc32x.exe  --version
 
C:Program Files (x86)EmbarcaderoStudio22.0bin>bcc32x.exe  --version
Embarcadero C++ 7.60 for Win32 Copyright (c) 2012-2021 Embarcadero Technologies, Inc.
Embarcadero Technologies Inc. bcc32x version 5.0.2 (69de348c.c83071db.37689) (based on LLVM 5.0.2)
Target: i686-pc-windows-omf
Thread model: posix
InstalledDir: C:Program Files (x86)EmbarcaderoStudio22.0bin
 
bcc64.exe  --version
 
Embarcadero C++ 7.60 for Win64 Copyright (c) 2012-2021 Embarcadero Technologies, Inc.
Embarcadero Technologies Inc. bcc64 version 5.0.2 (69de348c.c83071db.37689) (based on LLVM 5.0.2)
Target: x86_64-pc-windows-elf
Thread model: posix
InstalledDir: C:Program Files (x86)EmbarcaderoStudio22.0bin
 
bccaarm.exe  --version
 
Embarcadero C++ 7.60 for Android Copyright (c) 2012-2021 Embarcadero Technologies, Inc.
Embarcadero Technologies Inc. bccaarm version 3.3.1 (37761.ab293fa.1a350c1) (based on LLVM 3.3.1)
Target: thumbv7-none-linux-androideabi
Thread model: posix
 
bcciosarm64.exe  --version
 
Embarcadero C++ 7.60 for iOS 64-bit device Copyright (c) 2012-2021 Embarcadero Technologies, Inc.
Embarcadero Technologies Inc. bcciosarm64 version 3.3.1 (37761.ab293fa.1a350c1) (based on LLVM 3.3.1)
Target: arm64-apple-ios
Thread model: posix

 

특정 C++빌더 버전 테스트가 필요한 경우, 코드에 정의 범위(a range of defines)를 활용할 수 있다. 다음 코드 일부 예제를 참고해보기를 바란다.

// create a C++ Multi-Device Application.
// drop a TButton and TMemo on the form
// Here is the header file declaration:
 
//---------------------------------------------------------------------------
#ifndef MainUnitH
#define MainUnitH
//---------------------------------------------------------------------------
#include <System.Classes.hpp>
#include <FMX.Controls.hpp>
#include <FMX.Forms.hpp>
#include <FMX.Controls.Presentation.hpp>
#include <FMX.Memo.hpp>
#include <FMX.Memo.Types.hpp>
#include <FMX.ScrollBox.hpp>
#include <FMX.StdCtrls.hpp>
#include <FMX.Types.hpp>
//---------------------------------------------------------------------------
class TForm2 : public TForm
{
__published:	// IDE-managed Components
	TButton *Button1;
	TMemo *Memo1;
	void __fastcall Button1Click(TObject *Sender);
private:	// User declarations
public:		// User declarations
    String PlatformPath;
	__fastcall TForm2(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern PACKAGE TForm2 *Form2;
//---------------------------------------------------------------------------
#endif
 
Here is the TButton onClick event handler with code:
 
void __fastcall TForm2::Button1Click(TObject *Sender)
{
	switch (TOSVersion::Platform) {
		case TOSVersion::TPlatform::pfWindows:
			PlatformPath = "Windows";
			break;
		case TOSVersion::TPlatform::pfMacOS:
			PlatformPath = "macOS";
			break;
		case TOSVersion::TPlatform::pfiOS:
			PlatformPath = "iOS";
			break;
		case TOSVersion::TPlatform::pfAndroid:
			PlatformPath = "Android";
		case TOSVersion::TPlatform::pfWinRT:
			PlatformPath = "WinRT";
			break;
		case TOSVersion::TPlatform::pfLinux:
			PlatformPath = "Linux";
			break;
 
		default:
			PlatformPath = "Unexpected platform";
	}
 
	Memo1->Lines->Add("TPlatform: "+PlatformPath);
	Memo1->Lines->Add(TOSVersion::ToString());
	Memo1->Lines->Add("Name: "+TOSVersion::Name);
	Memo1->Lines->Add("Build: "+IntToStr(TOSVersion::Build));
	Memo1->Lines->Add("Major: "+IntToStr(TOSVersion::Major));
	Memo1->Lines->Add("Minor: "+IntToStr(TOSVersion::Minor));
	Memo1->Lines->Add("Service Pack Major: "+IntToStr(TOSVersion::ServicePackMajor));
	Memo1->Lines->Add("Service Pack Minor: "+IntToStr(TOSVersion::ServicePackMinor));
 
	Memo1->Lines->Add(
		"C++Builder Compiler Version: "
		+ IntToStr(__CODEGEARC__)
	);
 
	Memo1->Lines->Add(
		"C++Builder Compiler Version (hex): "
		+ Format("%x",__CODEGEARC__)
	);
 
	Memo1->Lines->Add(
		"C++Builder Compiler Version: "
		+ IntToStr(__CODEGEARC_VERSION__)
	);
 
	#ifdef _Windows
		Memo1->Lines->Add("Defined: _Windows");
	#endif
	#ifdef WIN32
		Memo1->Lines->Add("Defined: WIN32");
	#endif
	#ifdef __WIN32__
		Memo1->Lines->Add("Defined: __WIN32__");
	#endif
	#ifdef _WIN64
		Memo1->Lines->Add("Defined: _WIN64");
	#endif
 
	#ifdef __APPLE__
		Memo1->Lines->Add("Defined: __APPLE__");
	#endif
 
	#ifdef IOS
		Memo1->Lines->Add("Defined: IOS");
	#endif
	#ifdef IOS64
		Memo1->Lines->Add("Defined: IOS64");
	#endif
 
	#ifdef __ANDROID__
		Memo1->Lines->Add("Defined: __ANDROID__");
	#endif
 
	#ifdef ANDROID
		Memo1->Lines->Add("Defined: ANDROID");
	#endif
	#ifdef ANDROID32
		Memo1->Lines->Add("Defined: ANDROID32");
	#endif
	#ifdef ANDROID64
		Memo1->Lines->Add("Defined: ANDROID64");
	#endif
 
	#ifdef MACOS
		Memo1->Lines->Add("Defined: MACOS");
	#endif
	#ifdef MACOS64
		Memo1->Lines->Add("Defined: MACOS64");
	#endif
 
	#ifdef OSX
		Memo1->Lines->Add("Defined: OSX");
	#endif
	#ifdef OSX64
		Memo1->Lines->Add("Defined: OSX64");
	#endif
 
	#ifdef LINUX
		Memo1->Lines->Add("Defined: LINUX");
	#endif
	#ifdef LINUX32
		Memo1->Lines->Add("Defined: LINUX32");
	#endif
	#ifdef LINUX64
		Memo1->Lines->Add("Defined: LINUX64");
	#endif
 
	#ifdef POSIX
		Memo1->Lines->Add("Defined: POSIX");
	#endif
	#ifdef POSIX32
		Memo1->Lines->Add("Defined: POSIX32");
	#endif
	#ifdef POSIX64
		Memo1->Lines->Add("Defined: POSIX64");
	#endif
 
	#if defined(__CONSOLE__)
		Memo1->Lines->Add("Defined: __CONSOLE__");
	#endif
 
	#if defined(CPUX86)
		Memo1->Lines->Add("Defined: CPUX86");
	#endif
	#if defined(CPUX64)
		Memo1->Lines->Add("Defined: CPUX64");
	#endif
 
	#ifdef CPU32BITS
		Memo1->Lines->Add("Defined: CPU32BITS");
	#endif
	#ifdef CPU64BITS
		Memo1->Lines->Add("Defined: CPU64BITS");
	#endif
 
	#ifdef __arm__
		Memo1->Lines->Add("Defined: __arm__");
	#endif
	#ifdef __arm64__
		Memo1->Lines->Add("Defined: __arm64__");
	#endif
 
 
	#ifdef __cplusplus
		Memo1->Lines->Add("Defined: __cplusplus");
	#endif
	#ifdef __BORLANDC__
		Memo1->Lines->Add("Defined: __BORLANDC__");
	#endif
	#ifdef __BCPLUSPLUS__
		Memo1->Lines->Add("Defined: __BCPLUSPLUS__");
	#endif
 
	#if defined(__clang__)
	  Memo1->Lines->Add(
		"Clang Version: "
		+ IntToStr(__clang_major__)
		+ "."
		+ IntToStr(__clang_minor__)
		+ "."
		+ IntToStr(__clang_patchlevel__)
	  );
	  Memo1->Lines->Add(
		"Clang Marketing Version: "
		+ String(__clang_version__)
	  );
	#endif
}

 

Clang Win 32, Win 64, iOS 컴파일러를 사용한 샘플 화면은 다음과 같다.

Test-Defines-Win32-3191903.png  Test-Defines-Win64-7785856.png

TestDefinesCppiOS-9024587.png

 

이와 관련된 더 많은 정보를 정리한 다음의 링크들을 참고하면 도움이 될 것이다.

 

 

이 댓글 링크
다른 사이트에 공유하기

이 토의에 참여하세요

지금 바로 의견을 남길 수 있습니다. 그리고 나서 가입해도 됩니다. 이미 회원이라면, 지금 로그인하고 본인 계정으로 의견을 남기세요.

Guest
이 토픽(기고/질문)에 답하기

×   서식있는 텍스트로 붙여넣기.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   이전에 작성한 콘텐츠가 복원되었습니다..   편집창 비우기

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

중요한 정보

이용약관 개인정보보호정책 이용규칙 이 사이트가 더 잘 작동하기 위해 방문자의 컴퓨터에 쿠키가 배치됩니다. 쿠키 설정 변경에서 원하는 설정을 할 수 있습니다. 변경하지 않으면 쿠키를 허용하는 것으로 이해합니다.