Score:-1

lubuntu - math library in code::blocks - sqrt()

no flag

I have recently installed Lubuntu (not sure which one - the last LTS) with LXQT 0.14.1. I'm using code::blocks to code in c. When I wrote sqrt(15), everything was ok. But when I wrote sqrt(a) (a is a double), the compiler gave me an error - "undefined reference to 'sqrt'". Someone told me to go to Project--> Build options --> Linker setting and to add libm.so. But when I did this, I got a new error: "cannot find -lm.so"

How can I solve this?

hr flag
I don't really know anything about code::blocks, but I would expect the correct linker option on a Linux system to be `-lm` rather than `libm.so`
Superot avatar
no flag
Its' the first thing I did, but it didn't work. I got the same message. But thanks!
guiverc avatar
cn flag
I'd check what you actually installed, as the *latest* or *last* LTS released contained LXQt 0.17 (refer https://lubuntu.me/jammy-released/) but could be upgraded to LXQt 1.1 using the [Lubuntu backports PPA](https://lubuntu.me/jammy-backports-22-04-1/). My guess is you installed 20.04, the version that whilst is still supported, no longer has a manual available in published form (*22.04 is now the LTS manual*) being in its last months of supported life.
Score:0
no flag

Well, it was easier than I thought. I simply changed the libm.so to libm, and it solved the problem.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.