Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Sathorod

Pages: [1]
1
General / Re: Compiling SFML Android Application
« on: July 19, 2014, 05:34:49 pm »
Linking STL as shared fixes the DSO errors. Still getting undefined references though.

EDIT: I want to point out the sf::String undefined reference is on this line:

renderWindow = new sf::RenderWindow(sf::VideoMode::getDesktopMode(), "");

2
General / Compiling SFML Android Application
« on: July 19, 2014, 05:23:03 pm »
I successfully built SFML and the example application with no problems, but I've started to make a game with it and I'm getting a bunch of linker errors. Heres the output of ndk-build.

Code: [Select]
$ ndk-build
[armeabi-v7a] Compile++ thumb: game <= main.cpp
[armeabi-v7a] Compile++ thumb: game <= Game.cpp
[armeabi-v7a] Compile++ thumb: game <= GameState.cpp
[armeabi-v7a] Compile++ thumb: game <= ResourceManager.cpp
[armeabi-v7a] Prebuilt       : libsfml-graphics.so <= <NDK>/sources/sfml/lib/armeabi-v7a/
[armeabi-v7a] Prebuilt       : libsfml-audio.so <= <NDK>/sources/sfml/lib/armeabi-v7a/
[armeabi-v7a] Prebuilt       : libsfml-network.so <= <NDK>/sources/sfml/lib/armeabi-v7a/
[armeabi-v7a] Prebuilt       : libsfml-window.so <= <NDK>/sources/sfml/lib/armeabi-v7a/
[armeabi-v7a] Prebuilt       : libsfml-system.so <= <NDK>/sources/sfml/lib/armeabi-v7a/
[armeabi-v7a] SharedLibrary  : libgame.so
/Programming/Android/NDK/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld: warning: hidden symbol '__aeabi_atexit' in /Programming/Android/NDK/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi-v7a/libgnustl_static.a(atexit_arm.o) is referenced by DSO ./obj/local/armeabi-v7a/libsfml-graphics.so
/Programming/Android/NDK/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld: warning: hidden symbol '__aeabi_atexit' in /Programming/Android/NDK/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi-v7a/libgnustl_static.a(atexit_arm.o) is referenced by DSO ./obj/local/armeabi-v7a/libsfml-audio.so
/Programming/Android/NDK/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld: warning: hidden symbol '__aeabi_atexit' in /Programming/Android/NDK/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi-v7a/libgnustl_static.a(atexit_arm.o) is referenced by DSO ./obj/local/armeabi-v7a/libsfml-network.so
/Programming/Android/NDK/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld: warning: hidden symbol '__aeabi_atexit' in /Programming/Android/NDK/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi-v7a/libgnustl_static.a(atexit_arm.o) is referenced by DSO ./obj/local/armeabi-v7a/libsfml-window.so
/Programming/Android/NDK/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld: warning: hidden symbol '__aeabi_atexit' in /Programming/Android/NDK/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi-v7a/libgnustl_static.a(atexit_arm.o) is referenced by DSO ./obj/local/armeabi-v7a/libsfml-system.so
jni/Game.cpp:14: error: undefined reference to 'sf::String::String(char const*, std::locale const&)'
jni/ResourceManager.cpp:69: error: undefined reference to 'sf::Texture::loadFromFile(std::string const&, sf::Rect<int> const&)'
jni/ResourceManager.cpp:83: error: undefined reference to 'sf::Font::loadFromFile(std::string const&)'
jni/ResourceManager.cpp:108: error: undefined reference to 'sf::SoundBuffer::loadFromFile(std::string const&)'
jni/ResourceManager.cpp:137: error: undefined reference to 'sf::SoundBuffer::loadFromFile(std::string const&)'
jni/ResourceManager.cpp:153: error: undefined reference to 'sf::SoundBuffer::loadFromFile(std::string const&)'
jni/ResourceManager.cpp:170: error: undefined reference to 'sf::Music::openFromFile(std::string const&)'
jni/ResourceManager.cpp:198: error: undefined reference to 'sf::Music::openFromFile(std::string const&)'
jni/ResourceManager.cpp:213: error: undefined reference to 'sf::Music::openFromFile(std::string const&)'
collect2: error: ld returned 1 exit status
make: *** [obj/local/armeabi-v7a/libgame.so] Error 1

I've never seen those "is referenced by DSO" errors so I have no clue what they mean, and the undefined references don't make sense seeing as I'm not getting those errors with other files that use functions from graphics and audio sfml modules, so why would just the resource manager not find the symbols?

My Application.mk
Code: [Select]
NDK_TOOLCHAIN_VERSION := 4.8
APP_PLATFORM := android-9
APP_STL := gnustl_static
APP_CPPFLAGS := -std=c++0x
APP_ABI := armeabi-v7a

Android.mk
Code: [Select]
LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_MODULE    := game

LOCAL_SRC_FILES := main.cpp Game.cpp GameState.cpp ResourceManager.cpp

LOCAL_SHARED_LIBRARIES := sfml-system
LOCAL_SHARED_LIBRARIES += sfml-window
LOCAL_SHARED_LIBRARIES += sfml-graphics
LOCAL_SHARED_LIBRARIES += sfml-audio
LOCAL_SHARED_LIBRARIES += sfml-network
LOCAL_WHOLE_STATIC_LIBRARIES := sfml-main

include $(BUILD_SHARED_LIBRARY)

$(call import-module,sfml)

Could it have something to do with using c++11 in my project? I know sfml doesn't use c++11 at all yet, but I didn't think that would cause issues.

3
Graphics / Re: Moving Object with Mouse
« on: June 10, 2012, 07:02:24 am »
What's going on is you're limiting the frames per second (window.SetFramerateLimit(60); line 40) which means when you move your mouse too fast your program can't render that many frames in the period of time it took you to move your mouse. Remove that line and you should have no problem. You generally don't need to limit frame rate, there are specific instances where it's necessary but most of the time you shouldn't have that problem. What is necessary (and you may have read this and believed that what you should do is limit the frame rate), is setting a speed for your main loop so that your program will run at the same speed regardless of computer power. This is really only required in games though, but I would still recommend doing it, take a look at this link:

https://github.com/SFML/SFML/wiki/TutorialGQE-Engine#wiki-gameloop

For some more info about that.

4
Isn't the point of a library to have a small, basic, generic collection of tools that are supposed to be easily modifiable to a persons more specific needs? It's pretty much a given that in a large project you're going to have specific needs which means at some point you're going to be making modifications to satiate those needs.

5
Graphics / YAAC - Yet Another Animation Class
« on: June 10, 2012, 03:59:24 am »
I've been working on adding animations to my veryveryvery still-in-progress game engine these past few days. I've gotten it working to an extent, but for some reason the frames aren't updating. I put the source to the relevant classes and the test app attached. If someone could take a look at it I'd be very grateful.

[attachment deleted by admin]

Pages: [1]
anything