thx, that helps a lot!
With Nsight Tegra i compiled the SFML-libs!
Next, i created a test-project (New Project > Nsight Tegra > Android Native Application).
I've deleted the "glue"-Files, add the include and lib paths to the project and put following code to the main.cpp:
#include <SFML/System.hpp>
#include <SFML/Window.hpp>
#include <SFML/Graphics.hpp>
int main( int argc , char *argv[] )
{
sf::RenderWindow window{ sf::VideoMode::getDesktopMode() , "" };
sf::RectangleShape shape;
shape.setSize( { 100.f,100.f } );
shape.setFillColor( sf::Color::Red );
shape.setPosition( 10.f , 10.f );
sf::View view = window.getDefaultView();
while( window.isOpen() )
{
sf::Event event;
while( window.pollEvent( event ) )
{
if( event.type == sf::Event::Closed )
{
window.close();
}
if( event.type == sf::Event::Resized )
{
view.setSize( event.size.width , event.size.height );
view.setCenter( event.size.width / 2 , event.size.height / 2 );
window.setView( view );
}
}
window.clear( sf::Color::White );
window.draw( shape );
window.display();
}
}
Last, i edited the AndroidManifest.xml:
- add this line: <uses-feature android:glEsVersion="0x00010001" />
- change <uses-sdk android:minSdkVersion="9" android:targetSdkVersion="21" /> to <uses-sdk android:minSdkVersion="16" android:targetSdkVersion="21" />
- add this line: <meta-data android:name="android.app.lib_name" android:value="sfml-activity" />, by removing the old one
After compiling i got 3 Files:
"libSFML_Android_Test.so"
"SFML_Android_Test.apk"
"stripped_libSFML_Android_Test.so"
I copiedthis 3 files to my mobile-device and installed the .apk-file.
When i try to start the application i got the message, that the program has terminated.
I guess i need to copy the .so-files (including the sfml-libs) to a special place, but i don't know where :-S
On the other hand, .apk's i've already installed in my life never needn't to copy a shared-lib to a special place