Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Berlin 10.1 Platform Variable


This question is answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 6 - Last Post: Dec 29, 2016 1:39 AM Last Post By: Chaabna Radouane
Richard Williams

Posts: 23
Registered: 6/4/05
Berlin 10.1 Platform Variable  
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 31, 2016 2:12 AM
I have just upgraded from a much loved & heavily used C++ Builder 4 to the rather more complex CX 10.1 Starter. It is limited to Win32.

The target platform is set to Win32 everywhere I can find - in the 'Project Manager Tree', and in the ribbon.
However, I still get the error "Invalid PLATFORM variable "$(Platform)". PLATFORM must be one of the following: "Win32", "Win64", "Android", "iOSSimulator", "iOSDevice32" "iOSDevice64", or "OSX32". If PLATFORM is defined by your system's environment, it must be overridden in the RAD Studio IDE or passed explicitly on the command line to MSBuild; e.g., /p:Platform=Win32"

I have to confess I'm feeling somewhat out of my depth at the moment, and feel it's something simple I have missed. Can anyone help me with this so I can get my first 'Hello World' type program to compile? Why is it trying to use MSBuild? I thought bcc was the compiler.

Regards,

Richard.
Richard Williams

Posts: 23
Registered: 6/4/05
Re: Berlin 10.1 Platform Variable  
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 31, 2016 6:00 AM   in response to: Richard Williams in response to: Richard Williams
As an update, I have been able to get compilation via MSBuild direct in the RAD Studio Command line using with the case sensitive "/p:platform=Win32" switch.
Using menu option Run| Parameters| Environment Block and adding a user override for the default 'Platform=BWS' as 'Platform=Win32' makes no difference whatsoever.
To say doing it this way is unbelievably inconvenient is an understatement.

I would really appreciate it if anyone could indicate what I'm missing in the RAD Studio IDE.
If it's any help, the platform I'm using it on is Win7, 64bit.

Regards,

Richard.
Richard Williams

Posts: 23
Registered: 6/4/05
Re: Berlin 10.1 Platform Variable  
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 31, 2016 7:09 AM   in response to: Richard Williams in response to: Richard Williams
Think I got there with menu option
Tools| Options| Environment options and putting in an override on Platform.

Very very different from what I've used up to now & it will take just a wee while to get used to it.

Regards,

Richard.
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: Berlin 10.1 Platform Variable  
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 31, 2016 10:42 AM   in response to: Richard Williams in response to: Richard Williams
Richard wrote:

However, I still get the error "Invalid PLATFORM variable
"$(Platform)". PLATFORM must be one of the following: "Win32",
"Win64", "Android", "iOSSimulator", "iOSDevice32" "iOSDevice64",
or "OSX32".

Long-standing issue with the IDE. Your Windows environment likely has its
own PLATFORM variable defined by your PC manufacturer. If so, that variable
interfers with the IDE's use of the $(Platform) variable and should be removed
from the Windows environment.

Why is it trying to use MSBuild?

Because that is the build system that the IDE uses, and has for many years
now.

I thought bcc was the compiler.

It is. But that is ALL it is. MSBuild is a whole build chain that invokes
multiple tools, including the compiler and linker. Think of MSBuild as a
scriptable replacement for the old makefiles.

--
Remy Lebeau (TeamB)
Richard Williams

Posts: 23
Registered: 6/4/05
Re: Berlin 10.1 Platform Variable  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 1, 2016 1:09 AM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
Remy, thanks for clarifying.

I have been using BCB4Pro for a good few years (err, possibly 16) and have got very used to the way it does things.
One of my main reasons for staying with it was the problems I had with porting code from BCB1 to BCB3 and then BCB3 to BCB4. Having got a system that was stable and workable, I was very reluctant to move on. What convinced me was looking at the online help for the current version, and seeing stuff I'd had to code myself being built in to the VCL components I was using - so in all probability I'll get a speed increase when I use the new components instead of my code.

Thus far, the only niggle I've had is the 'Platform' variable, otherwise things have ported better than I expected, and almost as well as I had hoped. Definitely a happy bunny.

Regards,

Richard.
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: Berlin 10.1 Platform Variable  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 1, 2016 12:27 PM   in response to: Richard Williams in response to: Richard Williams
Richard wrote:

I have been using BCB4Pro for a good few years (err, possibly 16)
and have got very used to the way it does things.

That predates the IDE's switch to MSBuild in RADStudio 2007.

And FWIW, I still use BCB6 myself.

--
Remy Lebeau (TeamB)
Chaabna Radouane

Posts: 1
Registered: 1/20/17
Re: Berlin 10.1 Platform Variable  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 29, 2016 1:39 AM   in response to: Richard Williams in response to: Richard Williams
try this

start / Control Panel | System / Advanced system settings / Environment Variables/ System Variables...

Scroll down list, highlight "Platform", Click Delete or replace BPC by Win32 or ....

Problem solved.
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02