Closed Ron2014 closed 4 years ago
wait, I found your fips-lua project and mgerhardy's, let me learn it first...
Hi, I usually add the 'm' lib to the project dependencies on Linux as needed, for instance:
(fips_libs() and fips_deps() are equivalent, so fips_deps(m) should work too, for system libraries, fips_libs() is preferred though).
PS: the automatic handling of 'rt' and 'atomic' are artefacts from the past, I don't want to add any "magic dependencies" like this in the future.
Hi, master.
When I use fips to manage lua source code I get a problem when building in Ubuntu 18.04.2.
./fips build
tell me a lot of "undefined reference to 'xxx' " and I find that all the reference come from same place: math library for C standard.
so I try to add some code to solve this problem.
which will add -lm option when linking. But, what I'm exterested in is "Why fips don't add -lm for linux project automatically", so I read the cmake-toolchain/linux.cmake and found this:
Does it meant that I should add -llibrary when I found the library function in the project? So I imitated the code and add more check in the linux.cmake:
But it didn't work and I'm stucked and I'm really confused about that: need I check and add linking library one by one in linux.cmake?