Compiling with g++ via linking .so file built by android ndk
<p>I have a huge c++ code base with many library dependencies and there are Android.mk configuration files for building one single libGame.so by chaining all together. I am using this libGame.so on an android project successfully.</p>

<p>I am using Visual Studio 2015 as IDE for this c++ code base and successfully integrated GoogleTest and able to run unit tests on windows. Now, I want to run my unit tests on MAC-OS-X and it seems troublesome to create make files for compiling whole project with g++ compiler in addition to ndk-build process. I know hat g++ compiler can link ".so" files also as library. Is it possible to link any ".so" file that built by android ndk to g++ compiler?</p>

<p>I have tried to run the following command for one of my unit test classes called "LineSplitterTest".</p>

<pre><code>g++ -I/Users/fuat/GoogleTest/googletest/include \
-I/Users/fuat/Development/Game/Sources/App/PlusGame \
-I/Users/fuat/Development/Game/Sources/AndroidNativeLib \
-I/Users/fuat/Development/Game/Sources/AndroidNativeLib/Libs/jsoncpp/include \
testmain.cpp \
/Users/fuat/Development/Game/Sources/App/UnitTest/LineSplitterTest.cpp \
libgtest.a libgtest_main.a \
-L /Users/fuat/Development/Game/Sources/App/UnitTest \
-lGame \
-o LineSplitterTest
</code></pre>

<p>But the compiler ignores my .so file with the following warning message :</p>

<pre><code>ld: warning: ignoring file 
/Users/fuat/Development/Game/Sources/App/UnitTest/libGame.so, file 
was built for unsupported file format ( 0x7F 0x45 0x4C 0x46 0x01 0x01 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ) 
which is not the architecture being linked (x86_64)
</code></pre>

<p>I have changed my APP_ABI option as "x86" and built another libGame.so but nothing has been changed. I can not set "APP_ABI" option to "x86_64" because my google_breakpad dependency only supports "x86" and "armeabi".</p>

<p>In brief, I want to use ".so" file generated by ndk-build process as library on g++ compiler. I really appreciate if you guys have any suggestions.</p>