Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/147.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/c/70.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ ARM Cortex M处理器的GNU科学库编译错误_C++_C_Gsl_Wavelet - Fatal编程技术网

C++ ARM Cortex M处理器的GNU科学库编译错误

C++ ARM Cortex M处理器的GNU科学库编译错误,c++,c,gsl,wavelet,C++,C,Gsl,Wavelet,我正在用C语言做小波变换,幸运地找到了GSL-2.1。我正在尝试为CodeComposer Studio中的ARM Cortex-M处理器以及Energia 15接口GSL-2.1。代码非常简单 #include <stdio.h> #include <math.h> #include <gsl/gsl_errno.h> #include <gsl/gsl_vector.h> #include <gsl/gsl_blas.h> #inc

我正在用C语言做小波变换,幸运地找到了GSL-2.1。我正在尝试为CodeComposer Studio中的ARM Cortex-M处理器以及Energia 15接口GSL-2.1。代码非常简单

#include <stdio.h>
#include <math.h>
#include <gsl/gsl_errno.h>
#include <gsl/gsl_vector.h>
#include <gsl/gsl_blas.h>
#include <gsl/gsl_test.h>
#include <gsl/gsl_wavelet.h>
#include <gsl/gsl_wavelet2d.h>


int i, n=256, nc=20;
double data[256];
double abscoeff[256];
gsl_wavelet *w;
gsl_wavelet_workspace *work;

int main(){
w = gsl_wavelet_alloc (gsl_wavelet_daubechies, 4);
work = gsl_wavelet_workspace_alloc(256);

}
代码生成器Studio显示以下错误

undefined                   first referenced
 symbol                         in file     
---------                   ----------------
gsl_wavelet_alloc           ./main.obj      
gsl_wavelet_daubechies      ./main.obj      
gsl_wavelet_workspace_alloc ./main.obj   

error #10234-D: unresolved symbols remain
我已经问过了,并试图在代码中做一些修改。我不得不添加近5个c文件以减少错误。现在我只得到一个错误

" RETURN_IF_NULL undef symbol first referenced in ./main.obj "
当然,我需要在这里添加一个或多个.c文件,但我丢失了。你能帮我在这里添加哪个文件吗。 任何帮助都会被请求的

阅读时,在我看来,缺少一个宏(
RETURN\u IF\u NULL(x)IF(!x){RETURN;}
),该宏 应使用
configure.ac
中的信息,通过autoconf工具创建,并添加到
config.h
文件中,如下所示

在源代码中,在文件
configure.ac
中有一条指令:

AH_BOTTOM([#define RETURN_IF_NULL(x) if (!x) { return ; }
])
它指示autoconf在运行
/configure
脚本后创建的config.h文件末尾添加宏(在我的OSX 10.10、gsl-2.1上进行了测试)

我猜在配置过程中出现了一些问题。如果您在gsl的include目录中已经有一个配置文件,那么您可以在末尾添加:

RETURN_IF_NULL(x) if (!x) { return ; }

或者您可以创建它,然后将其包含在源文件中。

如果NULL听起来像宏,则返回,\u,即存在一些标题问题。感谢您的快速回复。这是一个在GSL-2.1的近100个文件中调用的函数,用于释放内存或检查指针是否为空指针。下面给出了示例代码,如果为空,则返回(p);自由(p->range);自由(p->sum);自由基(p);但是我找不到源文件。我在gsl
config.h
的其他地方找到了一个
return\u if\u null
,但它的定义是:
\define return\u if\u null(x)if(!x){return;}
我也在'config.h'文件中搜索过,但我找不到它。你能在这里链接你的'config.h'文件吗?@terencehill谢谢,我已经在头文件中添加了这部分代码,现在它可以工作了。
RETURN_IF_NULL(x) if (!x) { return ; }