A stubborn linker problem

CodeLite installation/troubleshooting forum
Gary B
CodeLite Curious
Posts: 1
Joined: Mon Jun 16, 2025 1:47 am
Genuine User: Yes
IDE Question: c++
Contact:

A stubborn linker problem

Post by Gary B »

Hi All,

A rank beginner with CodeLite, I have spent quite a bit of time trying to get math library linked on c++ program. CodeLite is version 14.0.0 running on Mint 21.2. The build error I am getting is: error: 'DBL_MAX' was not declared in this scope. Here is what I have done:

  1. Under Settings > Build_Settings > gnu g++ > Linker_Options I have added the switch -libm.a
  2. Under Settings > Build_Settings > gnu g++ > Switches > Library I have added -libm.a
  3. Under Settings > Build_Settings > gnu g++ > Advanced > Libraries_Path I have added /usr/lib/x86_64-linux-gnu/libm.a
  4. I checked the inserted path and verified that the math library is actually there.
  5. I added #include <math.h> at the top of the file that has the error declared against it.

It almost seems like I have done too much. In any case, it still doesn't work. Can anyone inform me about the magic I am missing?

thanks
Gary B