Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Using Linux toolchain to cross compile static library


While working toward adding Linux support to the SocketIO UE4 plugin, I have been trying to compile the static libs on linux, adding them to the plugin and cross compiling a project for linux. Unfortunately linking is not going well, which might come from the different compilers used.

So to avoid this issue I tried to use the UE4 toolchain to cross compile the SocketIO client static lib, which should avoid any issues. I have to admit that my knowledge of cross compilation is limited, and I could not find any information online.

Is there any information available on the topic? Does someone have an example of either 3rd party static library compilation on Linux, or better, directly using the UE4 toolchain through a CMake toolchain?

Here is the library: https://github.com/socketio/socket.io-client-cpp

Here is the plugin I tried to add linux compatibility for: https://github.com/getnamo/socketio-client-ue4

Product Version: Not Selected
more ▼

asked Nov 21 '16 at 09:19 PM in Linux

avatar image

56 3 4 13

avatar image Deams Nov 22 '16 at 12:54 PM

It seems others have been trying to use the toolchain but couldn't manage to use it directly through CMake: https://github.com/PjotrSvetachov/VRPNInput

It's still a good news as it means it is doable, just gotta figure out how now. ;)

avatar image Pjotr Nov 22 '16 at 03:44 PM

The build script I used for the compilation can be found here (note that the build script used an older version of the cross-compile toolchain, I don't know if it will work with the new one.): https://github.com/PjotrSvetachov/VRPNInput/blob/master/VRPNInput/Build/CrossCompile.bat

Basically I just hand-picked and compiled the files I needed for that project. I didn't use any of the build systems that came with the vrpn library.

This was done like a year ago so a lot has changed and this is also probably now the way to do it but it worked out for me then :)

avatar image sytelus Jul 18 '17 at 01:20 AM

May be you can set CC and CXX variables to point to Clang? Also see this file for example /UnrealEngine/Engine/Source/ThirdParty/PhysX/Externals/CMakeModules/Linux/LinuxCrossToolchain.multiarch.cmake

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question