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" : 这是怎么了,怎么才能弄好? : 谢谢
|