ladislav-zezula / StormLib

Official GitHub repository of the StormLib library created by Ladislav Zezula (author)
http://www.zezula.net/mpq.html
MIT License
561 stars 213 forks source link

_ltc_mp symbol not being properly defined #70

Closed PsychicNoodles closed 8 years ago

PsychicNoodles commented 8 years ago

With the current Makefile.linux compilation stops with the _ltc_mp symbol, defined in src/libtomcrypt/src/misc/crypt_ltc_mp_descriptor.c and used in a variety of files, being undefined. This can be solved by adjusting the use of ar rcs to ar rcS and adding in a ranlib -c libStorm.a command, as was suggested in this rather old mailing list archive. I made the slight change in this commit. I am fairly new to C, so I apologize if this is an isolated error on my own part.

Here's the info on my setup in case it's just a versioning problem.

Command

clang -Wall -lc++ -lbz2 -lz -stdlib=libc++ [path to libStorm.a] [main file with StormLib include] -o [output file]

clang -v

Apple LLVM version 7.0.2 (clang-700.1.81)
Target: x86_64-apple-darwin15.3.0
Thread model: posix

ld -v

@(#)PROGRAM:ld  PROJECT:ld64-253.9
configured to support archs: armv6 armv7 armv7s arm64 i386 x86_64 x86_64h armv6m armv7k armv7m armv7em (tvOS)
LTO support using: Apple LLVM 7.0.2 (clang-700.1.81)

Happy to supply any more info that's needed.

ladislav-zezula commented 8 years ago

Since makefile.linux was created by someone else than me and probably no one used it for years, I can as well take yours and put it in the main code base. Commit: f764c5a96294514559b17c3561be08cf1d304522

jleclanche commented 8 years ago

@ladislav-zezula I don't know why you have all those makefiles, they're unnecessary since you have the cmake file.