开发者

boost library names + android ndk + osx and windows builds

I have built boost for the android on both windows and osx and am running into an issue with boost library names. On windows boost adds a number of specifiers to the library names, such as libboost_filesystem-gcc-mt-s-1_46.a however on osx it omits all the additional information and is just: libboost_filesystem.a.

The problem now is in my Android.mk file I need to link to the lib yet the names are different for each platform. I am looking for one of two solutions the first: is there a way to tell boost to drop the additional specifiers and just use the format you are seeing here for osx (regardless of what platform the libs were built on) or two: is there a way to determine in my Android.mk if the build environment is windows? I would prefer a solution to #1 however either one would get me going开发者_如何转开发 at this point.

Thanks!


From the bjam --help listing:

--layout=<layout>

Determines whether to choose library names and header locations such that multiple versions of Boost or multiple compilers can be used on the same system.

  • versioned - Names of boost binaries include the Boost version number, name and version of the compiler and encoded build properties. Boost headers are installed in a subdirectory of <HDRDIR> whose name contains the Boost version number.
  • tagged -- Names of boost binaries include the encoded build properties such as variant and threading, but do not including compiler name and version, or Boost version. This option is useful if you build several variants of Boost, using the same compiler.
  • system - Binaries names do not include the Boost version number or the name and version number of the compiler. Boost headers are installed directly into <HDRDIR>. This option is intended for system integrators who are building distribution packages.

The default value is 'versioned' on Windows, and 'system' on Unix.

It sounds like you want to build with either --layout=tagged or --layout=system on both platforms, so the resulting filenames are consistent.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜