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"

linking static library for android

How would I go about the same linking as in


if I want my game to work on more platforms, like Android?

I want to link a third party library that has .lib, .dll files for windows, but also has .a, .so files (unix32, unix64 versions), and the headers. The lib and the headers were needed for Win, so I tried to load the .so instead of the .lib for android (Target.Platform == UnrealTargetPlatform.Android) in the Build.cs file, but it didn't work. I guess it's more complicated than just having another if, as in the tutorial for win. When compiling, the output says for the .so: incompatible target and then a lot of undefined references for functions I used successfully on Win.

Any ideas?

Product Version: UE 4.7
more ▼

asked Jun 17 '15 at 08:58 PM in C++ Programming

avatar image

116 6 7 11

avatar image ocramot Sep 20 '16 at 03:08 PM

Hi, did you ever find a solution to this problem?

avatar image balazon Sep 20 '16 at 04:00 PM

I'm not sure, it was a long time ago. I think I actually wanted to bundle some of my own classes into a library and link that (to avoid recompiling and seeing unnecessary classes in the project), and so to work around the problem I just copied my classes with source inside the project. This can be done as well with third party libraries if the source is available. When the source is not available, I don't know if this is still an issue in the latest UE version, or if it was some error on my part

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

1 answer: sort voted first

You want to use a .a with Android, not a .so. I wouldn't go messing with dynamic libs on Android if you have a static version right there :)

more ▼

answered Jun 17 '15 at 09:46 PM

avatar image

joshbadams STAFF
1.3k 19 7 46

avatar image balazon Jun 18 '15 at 08:45 AM

I get the same errors when I try the .a file (incompatible target, and the undefined references). For android I think 32 bit version is needed, but I tried both versions (32 and 64 bit), and neither worked

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
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