我正在尝试让 linux (Ubuntu) 上的 eclipse 链接数学模块.通常我会与 gcc -lm 链接.如何让 eclipse 添加这个?它是否在 Project->Properties 下的库路径中?数学模块位于 linux Ubuntu 系统的什么位置?
I am trying to have eclipse on linux (Ubuntu) link the math module. Normally I would link with gcc -lm. How do I get eclipse to add this? Is it in library paths under Project->Properties? Where does the math module reside on a linux Ubuntu system?
沿着这个路径:Project->Properties->C/C++ Build->Settings,然后在 Tools 选项卡下:GCC Linker->Libraries
Somewhere along this path: Project->Properties->C/C++ Build->Settings, then under the Tools tab: GCC Linker->Libraries
至于在系统的哪个位置,一般是/usr/lib/libm.so.
As for where it is in the system, usually /usr/lib/libm.so.
仅供参考,这对我的系统来说都是正确的,但由于多种原因,您的系统可能会略有不同.如果需要,应该不难调整.
FYI, this is all true of my system, but may differ slightly on yours for any number of reasons. Shouldn't be hard to adjust if needed.
这篇关于Eclipse C/C++ (CDT) 添加 -l 选项(链接数学模块) gcc -lm的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!
解析 ISO 8601 字符串本地日期时间,就像在 UTC 中Parsing an ISO 8601 string local date-time as if in UTC(解析 ISO 8601 字符串本地日期时间,就像在 UTC 中一样)
如何将公历字符串转换为公历?How to convert Gregorian string to Gregorian Calendar?(如何将公历字符串转换为公历?)
Java:GregorianCalendar 的最大值和最小值是什么/在哪Java: What/where are the maximum and minimum values of a GregorianCalendar?(Java:GregorianCalendar 的最大值和最小值是什么/在哪里?)
1582 年 10 月 15 日之前日期的日历到日期转换.公历Calendar to Date conversion for dates before 15 Oct 1582. Gregorian to Julian calendar switch(1582 年 10 月 15 日之前日期的日历到日期转换
java日历setFirstDayOfWeek不起作用java Calendar setFirstDayOfWeek not working(java日历setFirstDayOfWeek不起作用)
Java:获取当前星期几的值Java: getting current Day of the Week value(Java:获取当前星期几的值)