-
Hi guys,
i'd like to use SFML Network module with my router which runs under openwrt.
I have a very limited knowledge of cross compiling, anyone would care to help me to cross compile the network module for this operating system ? (maybe on irc)
So far i've an error with CMake : "mips-openwrt-linux-uclibc-gcc is not able to compile a simple test program".
thanks.
-
You should first make sure that your toolchain works fine instead of trying to compile SFML directly:
1. compile a hello world with a direct call to gcc
2. compile a hello world with CMake
3. compile sfml-network
Other than this very general advice, I don't know if someone will be able to help you, since this is very specific and not related to SFML at all. Maybe you should search an OpenWRT forum instead?
-
Thanks for the answer, i'll do that and come back later if i have more SFML specific errors coming out.
-
Hi again,
i've sucessfully compiled an helloWorld example with CMake and made it run on my router.
Now i'm back with SFML.
CMake Error at CMakeLists.txt:54 (sfml_add_library):
Unknown CMake command "sfml_add_library".
-
Are you trying to compile a sub-directory of the SFML tree? You can't, you must run CMake on the root directory.
-
EDIT :
Ok i had some cache problems, here is the message when i try to configure from SFML root directory :
CMake Error at /usr/share/cmake-2.8/Modules/FindX11.cmake:427 (message):
Could not find X11
which makes sense ... but i do not need X11 for the Network module right ?
-
Right, but unfortunately you cannot choose which SFML modules to configure, it's everything or nothing. I guess we could add an option for that.
-
Is there an easy way i could do it myself ?
Even an ugly way...
-
The easy ugly way: in src/SFML/CMakeLists.txt, remove all the calls to add_subdirectory (on the bottom) except the ones for Network and System.
-
Ok ... i modified CMakeLists.txt in src/SFML
# add the modules subdirectories
add_subdirectory(System)
if(SFML_OS_WINDOWS OR SFML_OS_ANDROID OR SFML_OS_IOS)
add_subdirectory(Main)
endif()
#add_subdirectory(Window)
add_subdirectory(Network)
#add_subdirectory(Graphics)
if(NOT SFML_OS_IOS)
# add_subdirectory(Audio)
endif()
Looks like you posted the answer while i was typing ;)
then make sfml-network.
It seems to be working.
-
Should i fill in a request to make it configurable ?
-
Yes :)
-
done.
http://en.sfml-dev.org/forums/index.php?topic=17492
Thank you again Laurent, my program is working like a charm, although it is not a classic "multimedia" project i'll probably make a topic in the project section to show how versatile sfml can be.
-
Yes, thanks. That will be very interesting.