由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - 求问C++问题
相关主题
别见笑:一个初级问题:如何把开源open-source的源程序导入Visual studio遇到 Qt 下undefined reference to "func" 错误
Help: how to use Eclipse as C++ IDE in XP?请教一个makefile 小问题
关于用 Eclipse 开发C++ 程序Linux Makefile: How to include cpp files in subfolder for (转载)
用eclipse的看过来C Library (一个统计方面的) 安装一问
Eclipse JNI问题, 拜谢[合集] 请问-fno-implicit-templates的用处
哪位高人给个Kdevelop的小例子 (转载)One question in C programming
问一个MinGW + CMake 的问题如果一个程序的makefile里-c改成-g就链接出错
makefile 里面那个-D flags的问题eclipse的autotools插件不工作
相关话题的讨论汇总
话题: mingw话题: c++话题: gsl话题: eclipse话题: found
进入Programming版参与讨论
1 (共1页)
m****e
发帖数: 488
1
在windows下用C++,已经安装了MinGW和Eclipse。我需要用2个library,一个是gsl 另
外一个是armadillo 我把这些library的头文件已经拷到MinGW的include 目录下。然后
要运行我的C++ code用eclipse,但是出现如下错误信息
undefined reference to `gsl_ran_chisq'" and "launch failed binary not found"
这是怎么了,怎么才能弄好?
谢谢
d****i
发帖数: 4809
2
你需要把lib file拷贝到某个目录,然后在IDE里面指定lib的路径。或者直接在
Makefile里面用-L/path/to/lib

found"

【在 m****e 的大作中提到】
: 在windows下用C++,已经安装了MinGW和Eclipse。我需要用2个library,一个是gsl 另
: 外一个是armadillo 我把这些library的头文件已经拷到MinGW的include 目录下。然后
: 要运行我的C++ code用eclipse,但是出现如下错误信息
: undefined reference to `gsl_ran_chisq'" and "launch failed binary not found"
: 这是怎么了,怎么才能弄好?
: 谢谢

m****e
发帖数: 488
3
不行,wuwu
怎么办

【在 d****i 的大作中提到】
: 你需要把lib file拷贝到某个目录,然后在IDE里面指定lib的路径。或者直接在
: Makefile里面用-L/path/to/lib
:
: found"

d****i
发帖数: 4809
4
什么错误信息?

【在 m****e 的大作中提到】
: 不行,wuwu
: 怎么办

L****8
发帖数: 3938
5
MinGW 就是个joke
windows 不用vs 就是行为艺术

found"

【在 m****e 的大作中提到】
: 在windows下用C++,已经安装了MinGW和Eclipse。我需要用2个library,一个是gsl 另
: 外一个是armadillo 我把这些library的头文件已经拷到MinGW的include 目录下。然后
: 要运行我的C++ code用eclipse,但是出现如下错误信息
: undefined reference to `gsl_ran_chisq'" and "launch failed binary not found"
: 这是怎么了,怎么才能弄好?
: 谢谢

p******g
发帖数: 347
6
but for simple projects it is ok.

【在 L****8 的大作中提到】
: MinGW 就是个joke
: windows 不用vs 就是行为艺术
:
: found"

p******g
发帖数: 347
7
-Lfull/dirname/that/contains/the/lib/file -llib_file_name_without_leading_
lib_and_extension
你要知道是用的什么版本的库(是不是有debug symbols, 32bit or 64 bit, etc) 一
定要链接到正确的版本然后你自己的编译也使用同样的设置才行
然后需要把full/dirname/that/contains/the/lib/file 加入到环境变量路径里或者把
库文件放到你的要运行程序相同的路径下。
看来楼主估计基本的gcc都不太会用还是先编译运行一个简单的helloworld和知道创建
和链接库文件再说吧

【在 d****i 的大作中提到】
: 你需要把lib file拷贝到某个目录,然后在IDE里面指定lib的路径。或者直接在
: Makefile里面用-L/path/to/lib
:
: found"

E*H
发帖数: 1207
8
光安装header 有什么用啊? compile 能过,运行时候找不着这些symbol.
你得按楼上说的真正link against 这俩libraries.

found"

【在 m****e 的大作中提到】
: 在windows下用C++,已经安装了MinGW和Eclipse。我需要用2个library,一个是gsl 另
: 外一个是armadillo 我把这些library的头文件已经拷到MinGW的include 目录下。然后
: 要运行我的C++ code用eclipse,但是出现如下错误信息
: undefined reference to `gsl_ran_chisq'" and "launch failed binary not found"
: 这是怎么了,怎么才能弄好?
: 谢谢

c*******g
发帖数: 93
9
My DEV env on windows is currently: MinGW + msys2 + Eclipse, and it works
great. At least for my app dev I don't have any issues so far. But again,
the learning curve is there.

【在 L****8 的大作中提到】
: MinGW 就是个joke
: windows 不用vs 就是行为艺术
:
: found"

c*******g
发帖数: 93
10
Most likely you would need to download the source codes for these two libs
and compile them by yourself, in which situation you most likely need to use
msys to simulate Linux env.
GSL: http://www.gnu.org/software/gsl/
Armadillo: http://arma.sourceforge.net/download.html
For details you can refer to: https://downloads.haskell.org/~ghc/6.4/docs/
html/building/winbuild.html

found"

【在 m****e 的大作中提到】
: 在windows下用C++,已经安装了MinGW和Eclipse。我需要用2个library,一个是gsl 另
: 外一个是armadillo 我把这些library的头文件已经拷到MinGW的include 目录下。然后
: 要运行我的C++ code用eclipse,但是出现如下错误信息
: undefined reference to `gsl_ran_chisq'" and "launch failed binary not found"
: 这是怎么了,怎么才能弄好?
: 谢谢

1 (共1页)
进入Programming版参与讨论
相关主题
eclipse的autotools插件不工作Eclipse JNI问题, 拜谢
eclipse cdt怎么改变makefile哪位高人给个Kdevelop的小例子 (转载)
大家在linux下面用什么C++的IDE呢?问一个MinGW + CMake 的问题
打算安装mingw,我应该下哪些文件呢,makefile 里面那个-D flags的问题
别见笑:一个初级问题:如何把开源open-source的源程序导入Visual studio遇到 Qt 下undefined reference to "func" 错误
Help: how to use Eclipse as C++ IDE in XP?请教一个makefile 小问题
关于用 Eclipse 开发C++ 程序Linux Makefile: How to include cpp files in subfolder for (转载)
用eclipse的看过来C Library (一个统计方面的) 安装一问
相关话题的讨论汇总
话题: mingw话题: c++话题: gsl话题: eclipse话题: found