The International Simutrans Forum

Development => Technical Documentation => Topic started by: Frank on August 27, 2017, 08:13:15 AM

Title: static libbz2
Post by: Frank 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.
Title: Re: static libbz2
Post by: Ters 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).
Title: Re: static libbz2
Post by: Frank on August 31, 2017, 04:39:03 PM
add config.default
STD_LIBS += /usr/lib/x86_64-linux-gnu/libbz2.a


thanks
Title: Re: static libbz2
Post by: Ters 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.