Author Topic: static libbz2  (Read 241 times)

0 Members and 1 Guest are viewing this topic.

Offline Frank

static libbz2
« on: August 27, 2017, 08:13:15 AM »
What do I need to change the libbz2 statically in the program file?

I would also like to change the user directory. Where can I find the corresponding entry.
« Last Edit: August 27, 2017, 08:36:55 AM by Frank »

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 4733
  • Total likes: 180
  • Helpful: 108
  • Languages: EN, NO
Re: static libbz2
« Reply #1 on: August 27, 2017, 08:40:33 AM »
First of all, you need to have the static library file for libbz2 installed in your compiler's/system's lib directory. Then you need to set up config.default to build Simutrans with static linkage. That will statically link everything (except pthread on some mingws).

Offline Frank

Re: static libbz2
« Reply #2 on: August 31, 2017, 04:39:03 PM »
add config.default
Code: [Select]
STD_LIBS += /usr/lib/x86_64-linux-gnu/libbz2.a

thanks

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 4733
  • Total likes: 180
  • Helpful: 108
  • Languages: EN, NO
Re: static libbz2
« Reply #3 on: August 31, 2017, 06:56:13 PM »
No. Just uncomment the line with the static flag. Just adding what you did means that it will try and link with bzip2 twice, probably once statically and once dynamically. Some macros might also be wrong, causing you to still end up with dynamic linking.