Watch, Follow, &
Connect with Us

Please visit our new home
community.embarcadero.com.


Welcome, Guest
Guest Settings
Help

Thread: Cannot compile any C++ app


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


Permlink Replies: 6 - Last Post: Jul 10, 2017 12:30 PM Last Post By: Sam Firouz Threads: [ Previous | Next ]
Sam Firouz


Posts: 166
Registered: 2/18/01
Cannot compile any C++ app  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 29, 2017 8:40 AM
Hi:

Maybe I am doing something wrong but starting with Tokyo. I can only compile for Windows. If I try to compile any app for OSX or Android or iOS, I get all sort of errors inside the platform header files.
Here are the steps that I took:
- Started with a fresh install of Windows 10 (x64)
- Installed .Net 3.5
- Installed "Android Studio" and updated the SDK to the latest version and installed NDK.
- Installed Tokyo
- Installed boost from Getit Package manager (this took few tries)
- Set the Android SDK with the following values (I'm sure paths are correct):
- SDK Base path: "C:\Android\sdk"
- ZipAlign Location: "C:\Android\sdk\build-tools\26.0.0\zipalign.exe"
- Android Location: "C:\Android\sdk\tools\Android.bat"
- adb Location: "C:\Android\sdk\platform-tools\Adb.exe"
- Aapt Location: "C:\Android\sdk\build-tools\26.0.0\aapt.exe"
- SDK API-Level location: "C:\Android\sdk\platforms\android-26"
- NDK base path: "C:\Android\sdk\ndk-bundle"
- arm-linux-androideabi-ld.exe location: "C:\Android\sdk\ndk-bundle\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64\bin\arm-linux-androideabi-ld.exe"
- arm-linux-androideabi-strip.exe location: "C:\Android\sdk\ndk-bundle\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64\bin\arm-linux-androideabi-strip.exe"
- gdbserver location: "C:\Android\sdk\ndk-bundle\prebuilt\android-arm\gdbserver\gdbserver"
- NDK API location: "C:\Android\sdk\ndk-bundle\platforms\android-26"
- C++ Builder NDK Library path: "C:\Android\sdk\ndk-bundle\platforms\android-26\arch-arm\usr\lib"
- Delphi NDK Library path: "C:\Android\sdk\ndk-bundle\platforms\android-26\arch-arm\usr\lib;C:\Android\sdk\ndk-bundle\sources\cxx-stl\gnu-libstdc++\4.9\libs\armeabi-v7a"
- KeyTool location: "C:\Program Files\Java\jdk1.8.0_131\bin\KeyTool.exe"
- Jarsigner location: "C:\Program Files\Java\jdk1.8.0_131\bin\JarSigner.exe"
- Created a connection profile to MAC
- Using connection profile created above added:
- iPhoneOS 10.3 (64 bit)
- iPhoneOS 8.1 (32 bit)
- MacOSX 10.12.4
- iPhoneSimulator 10.3
- Started a new C++ Multi Device (Blank) project.
- Compile and run for Win32 (Everything works just fine)
- Compile and run for Win64 (Everything works just fine)
- Compile for Android and we get "[bccaarm Fatal Error] yvals.h(19): '_defs.h' file not found" (searched for '_defs.h' in the include directory, there is one for OSX and one for Windows, but nothing for Android)
- Compile for iOS 32 bit and we get "[bcciosarm Fatal Error] CoreFoundation.h(12): 'stdarg.h' file not found" (searched for 'stdarg.h' in the include directory, There is one for Android, one OSX, and one for Windows, but nothing for iOS)
- Compile for iOS 64 bit and we get "[bcciosarm64 Fatal Error] yvals.h(105): '_defs.h' file not found"
- Compile for OSX and we get 51 errors in 'SecBase.h', 'SecCertificate.h', ... all of which are OSX platform header files in "$(BDSPLATFORMSDKSDIR)\MacOSX10.12.4.sdk\System\Library\Frameworks\Security.framework\Headers"

Anyone knows what is going on? This did NOT happen in Seattle or Berlin, but Tokyo has been useless for FMX C++ apps.
Remy Lebeau (Te...


Posts: 8,950
Registered: 12/23/01
Re: Cannot compile any C++ app [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 29, 2017 5:21 PM   in response to: Sam Firouz in response to: Sam Firouz
Sam Firouz wrote:

Maybe I am doing something wrong but starting with Tokyo. I can only
compile for Windows. If I try to compile any app for OSX or Android
or iOS, I get all sort of errors inside the platform header files.

Did you install the SDK support for those platforms to begin with?

- Installed Tokyo

Which installer did you use? The ISO (offline) installer, or the
GetIt-based (online) installer? Did you choose to install the
platforms you want to develop for?

Anyone knows what is going on? This did NOT happen in Seattle or
Berlin, but Tokyo has been useless for FMX C++ apps.

Tokyo has been pretty useless - PERIOD. Too many things broke it in.
Obviously adequate QA was not done on it before release.

Have you installed the available hotfixes for Tokyo yet?

--
Remy Lebeau (TeamB)
Sam Firouz


Posts: 166
Registered: 2/18/01
Re: Cannot compile any C++ app [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 30, 2017 7:32 AM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
Remy Lebeau (TeamB) wrote:

Did you install the SDK support for those platforms to begin with?
Yes I did.

Which installer did you use? The ISO (offline) installer, or the
GetIt-based (online) installer? Did you choose to install the
platforms you want to develop for?
I used the ISO installer. I knew the Getit installer does not work. Yes I think I did install all the supported platforms. I believe, ISO installer does not ask which platform you want to install and installs all of them.

Tokyo has been pretty useless - PERIOD. Too many things broke it in.
Obviously adequate QA was not done on it before release.
Yes I agree. I even voiced my opinion during the beta testing period, but they wanted the UNIX support ASAP. I was hoping the C++ support for UNIX would fix all of these, but obviously I was naive. I am thinking of going back to Berlin. What do you think?

Have you installed the available hotfixes for Tokyo yet?
There was only one Hotfix that I saw and yes, I did install it. Is there more than one Hotfix?

Thank you
Sam
Remy Lebeau (Te...


Posts: 8,950
Registered: 12/23/01
Re: Cannot compile any C++ app [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 30, 2017 9:43 AM   in response to: Sam Firouz in response to: Sam Firouz
Sam Firouz wrote:

I was hoping the C++ support for UNIX would fix all of these,
but obviously I was naive

C++ support for Linux hasn't even been released yet. That is coming in
10.2 Tokyo Update 1.

I am thinking of going back to Berlin. What do you think?

No idea. The last version I have installed is Seattle, and I haven't
even used it yet.

There was only one Hotfix that I saw, and yes, I did install it.
Is there more than one Hotfix?

There has been a few hotfixes and patches, actually.

https://cc.embarcadero.com/item/30764

https://cc.embarcadero.com/item/30765

https://cc.embarcadero.com/item/30781

https://cc.embarcadero.com/item/30782

--
Remy Lebeau (TeamB)
GAI CHEW KAI

Posts: 53
Registered: 7/29/04
Re: Cannot compile any C++ app  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jul 3, 2017 6:38 PM   in response to: Sam Firouz in response to: Sam Firouz
Embarcadero® C++Builder 10.2 Version 25.0.26309.314, Windows 10 x64 Pro and Mac OSX Sierra

Hi, recently I installed C++Builder 10.2 Tokyo Pro using .ISO and found information to ensure it can compile C++ in Mac OSX.

> - Using connection profile created above added:
> - iPhoneOS 10.3 (64 bit)
> - iPhoneOS 8.1 (32 bit)
> - MacOSX 10.12.4
> - iPhoneSimulator 10.3
> - Compile for OSX and we get 51 errors in 'SecBase.h', 'SecCertificate.h', ... all of which are OSX platform header files in

1. I came across the link at https://forums.embarcadero.com/message.jspa?messageID=889782 it mentioned XCode 8.2.1 you can compile C++ for Mac OSX. Personally, I have tried XCode 8.2.1, it does works for both Mac OSX and iOS as well. The downloaded and installed files are:

Xcode_8.2.1.xip
Font_Tools_for_Xcode_8.2.dmg
Additional_Tools_for_Xcode_8.2.dmg
Command_Line_Tools_macOS_10.12_for_Xcode_8.2.dmg
Kernel_Debug_Kit_10.12.2_build_16C67.dmg

All files above are dated December 2016.

2. I also tried XCode 8.3 and above but I cannot compile as according to the roadmap, the support for XCode 8.3 is not there yet.

3. For Android, it seems after the first .ISO installation completed, there is missing file such as AAPT.EXE under SDK Manager. However, I created an empty Android FMX form, then saved it, the next re-load of this project, triggered the ANDROID NDK install automatically, I am not sure why it downloads again, but later the AAPT.EXE and other missing files resolved with the following path.

C:\Users\Public\Documents\Embarcadero\Studio\19.0\CatalogRepository\AndroidSDK-2433_19.0.26309.314\build-tools\22.0.1\Aapt.exe

Hopes, this helps.

Regards,
Ricky Gai

Sam Firouz


Posts: 166
Registered: 2/18/01
Re: Cannot compile any C++ app  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jul 7, 2017 7:17 AM   in response to: GAI CHEW KAI in response to: GAI CHEW KAI
GAI:

You are correct. The C++ Builder is not ready for OSX 10.12. I created a new connection profile to another mac that is running an older version of OSX (10.8) and therefore older version of xCode (5.1.1) and created the SDK for OSX 10.10 and iOS 8.1 and that made things work. This confirms what Remy said. Tokyo is not ready for the latest Apple OSs.
I even looked at the IDE's install process and realized the installer tries to install Android NDK 9c. The current Android NDK version is 15. That makes our tools compatible with the NDK that is 6 version old. and even then I still have not been ably to compile an app for Android because the compiler complains that _defs.h is missing.

I understand and even support the desire to support more and more environments, but that dos not mean the existing stuff should suffer or a product that is clearly not ready should be released. Just my 2 cents.

Thank you
Sam
Sam Firouz


Posts: 166
Registered: 2/18/01
Re: Cannot compile any C++ app  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jul 10, 2017 12:30 PM   in response to: Sam Firouz in response to: Sam Firouz
HI:

This is just a FYI. I was finally able to fix the issues. With the help of "GAI CHEW KAI", I found out the OSX and iOS only works with older versions of SDK. For OSX I did not have access to 10.11. But I was able to make it work with 10.10. This makes C++ Builder at least one or two version behind.
For iOS, The best that I could get the compiler to work was 8.1.
Then there was Android. This wane had me stumped for a while. No matter what I did, there was at least one compile error. So I started going back on the SDK/NDK bundle and I went as far back as version 9c. But the problem would not go away. The dinkumware that ships with IDE is NOT compatible with android NDK. I even tried the dinkumware64 with no result. Then I experimented with disabling dinkumware all together. So I removed the dinkumware path from the list and WOLA, it compiled. But this was NOT an acceptable solution because I heavily depend on STL and specially the containers. after a lot of digging I realized some of the header files that the compiler complains about also exists in NDK. To make the long story short, The solution is to add "[NDK Path]\sources\cxx-stl\gnu-libstdc++\4.8\include" into "System Include path" in Tools->options->C++ Options->Paths and Directories".

Hope this helps anyone else whom might run into this problem. And hopefully Embarcadero starts addressing these issues.

Thank you
Sam
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02