BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Getting the C++compiler version...

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Language C++)
View previous topic :: View next topic  
Author Message
Atmapuri
Guest





PostPosted: Mon Dec 26, 2005 6:20 pm    Post subject: Getting the C++compiler version... Reply with quote



Hi!

How do i determine with which BCB compiler is the
C++ code being compiled?

Thanks!
Atmapuri


Back to top
Jonathan Benedicto
Guest





PostPosted: Mon Dec 26, 2005 6:49 pm    Post subject: Re: Getting the C++compiler version... Reply with quote



Atmapuri wrote:
Quote:
Specifically I would like to differentiate between BCB6
and BDS2006

On the command line ?

Jonathan

http://jomitech.com/mtbcc32.shtml - Multi-threaded compilation for BCB
http://jomitech.com/forum - JomiTech Forums



Back to top
Atmapuri
Guest





PostPosted: Mon Dec 26, 2005 7:20 pm    Post subject: Re: Getting the C++compiler version... Reply with quote



Hi!

Quote:
Specifically I would like to differentiate between BCB6
and BDS2006

On the command line ?

When I use the command line, I know the compiler I am calling.
When a user compiles my code, I dont. There should be some
global compiler defines, but dont know their names...

Thanks!
Atmapuri



Back to top
Darko Miletic
Guest





PostPosted: Mon Dec 26, 2005 7:38 pm    Post subject: Re: Getting the C++compiler version... Reply with quote

Atmapuri wrote:
Quote:
Hi!

How do i determine with which BCB compiler is the
C++ code being compiled?

Using variable __BORLANDC__ . This variable holds version of compiler.
Here are some values:

BDS 2006 (__BORLANDC__ >= 0x0580) && (__BORLANDC__ < 0x0590)

Kylix (__BORLANDC__ >= 0x0570) && (__BORLANDC__ < 0x0580)

BCB 6 - (__BORLANDC__ >= 0x0560) && (__BORLANDC__ < 0x0570)

BCB 5/Free compiler -
(__BORLANDC__ >= 0x0550) && (__BORLANDC__ < 0x0560)

Back to top
Jonathan Benedicto
Guest





PostPosted: Mon Dec 26, 2005 7:40 pm    Post subject: Re: Getting the C++compiler version... Reply with quote

Atmapuri wrote:
Quote:
When I use the command line, I know the compiler I am calling.
When a user compiles my code, I dont. There should be some
global compiler defines, but dont know their names...

Try __BORLANDC__

Jonathan

http://jomitech.com/mtbcc32.shtml - Multi-threaded compilation for BCB
http://jomitech.com/forum - JomiTech Forums



Back to top
AlisdairM(TeamB)
Guest





PostPosted: Wed Dec 28, 2005 6:41 pm    Post subject: Re: Getting the C++compiler version... Reply with quote


"Jonathan Benedicto" <incorrect (AT) no (DOT) server> wrote:

Quote:
Try __BORLANDC__

Specifically, the __BORLANDC__ marco is predefined whenever you compile with a borland compiler. Its value gives you the compiler version.

Common values:
0x551 -> Free command line compiler / patched BCB5
0x560 -> Unpatched BCB6
0x564 -> Fully patched BCB6 (0x561 and 0x562 also observed)
0x570 -> Kylix
0x580 -> BDS 2006 preview compiler
0x581 -> BDS2006 Update 1
0x600 -> EDG preview compiler, with CBuilderX

AlisdairM(TeamB)


Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Language C++) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.