Issue
Note: Although question is duplicate, but current answers lacks details, so I wanted to post another one.
I'm using C++Builder developed by Embarcadero.
For Windows, it compiles fine.
For Android, it shows the following error:
Checking project dependencies...
Building Project3.cbproj (Debug, Android)
bccaarm command line for "Project3PCH1.h"
c:\program files\embarcadero\studio\20.0\bin\bccaarm.exe -cc1 -D _DEBUG -output-dir .\Android\Debug -isysroot
C:\Microsoft\AndroidNDK\android-ndk-r15c\sysroot -idirafter =\usr\include -idirafter =\usr\include\arm-linux-androideabi -idirafter
C:\Microsoft\AndroidNDK\android-ndk-r15c\sources\cxx-stl\gnu-libstdc++\4.9\include -idirafter
C:\Microsoft\AndroidNDK\android-ndk-r15c\sources\cxx-stl\gnu-libstdc++\4.9\libs\armeabi-v7a\include -idirafter
C:\Microsoft\AndroidNDK\android-ndk-r15c\sources\android\native_app_glue -I C:\Users\gray\Documents\Embarcadero\Studio\Projects -I "c:\program
files\embarcadero\studio\20.0\include\android\fmx" -isystem "c:\program files\embarcadero\studio\20.0\include" -isystem "c:\program
files\embarcadero\studio\20.0\include\android\rtl" -isystem "c:\program files\embarcadero\studio\20.0\include\android\fmx" -isystem "c:\program
files\embarcadero\studio\20.0\include\android\crtl" -isystem C:\Users\Public\Documents\Embarcadero\Studio\20.0\hpp\Android
-debug-info-kind=standalone -fborland-extensions -fborland-auto-refcount -nobuiltininc -nostdsysteminc -triple thumbv7-none-linux-androideabi
-emit-pch -mconstructor-aliases -masm-verbose -target-abi aapcs-linux -target-cpu cortex-a8 -nostdinc++ -fdeprecated-macro -fexceptions
-fcxx-exceptions -munwind-tables -mstackrealign -fno-spell-checking -x c++ -std=c++11 -O0 -fmath-errno -tU -o .\Android\Debug\Project3PCH1.pch
Project3PCH1.h
[bccaarm Error] string.h(664): functions that differ only in their return type cannot be overloaded
string.h(50): previous declaration is here
[bccaarm Error] string.h(680): functions that differ only in their return type cannot be overloaded
string.h(69): previous declaration is here
[bccaarm Error] string.h(697): functions that differ only in their return type cannot be overloaded
string.h(89): previous declaration is here
[bccaarm Error] string.h(711): functions that differ only in their return type cannot be overloaded
string.h(118): previous declaration is here
[bccaarm Error] string.h(729): functions that differ only in their return type cannot be overloaded
string.h(155): previous declaration is here
Failed
Elapsed time: 00:00:18.3
Solution
my bet is that you need to use "Preprocessor directives" in your code and indicate platforms
How do I check OS with a preprocessor directive?
https://www.cplusplus.com/doc/tutorial/preprocessor/
Answered By - NaturalDemon
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.