[英]How can I compile Gnu C in windows
Too those who know how, this may be a stupid question, but I'll be asking it anyway because I need some pointers. 对那些知道如何的人来说,这可能是一个愚蠢的问题,但是无论如何我都会问这个问题,因为我需要一些指针。
The library I'm trying to compile is the SPro toolkit for speech signal processing which is written in (for lack of a better description) Gnu C++ 我正在尝试编译的库是用于语音信号处理的SPro工具包,它是用Gnu C ++编写的(出于缺乏更好的描述)
It's a library written for unix and I want to compile it in windows. 这是为Unix编写的库,我想在Windows中进行编译。 As much as an object exercise in porting code from, as anything. 尽可能多地利用对象来移植代码。
Toward that end I have installed code::blocks and a MinGW compiler. 为此,我安装了code :: blocks和MinGW编译器。 I read that I could also use cgywn and that this would be introducing a layer interpreting the gnu c before executing it natively, but let me leave that to the side for the moment. 我读到我也可以使用cgywn,这将在本地执行gnu c之前引入一个解释gnu c的层,但现在让我将其放在一边。
The first issue I ran into was that the #includes need a little love - ok no problem with that. 我遇到的第一个问题是#include需要一点爱-没关系。
But now I find that 但是现在我发现
scopy.c|462|error: 'SIZEOF_SHORT' undeclared (first use in this function)|
I also installed visual Studio C++ and get the same. 我还安装了Visual Studio C ++并获得了相同的结果。
I gather that SIZEOF_CHAR, SIZEOF_SHORT, SIZEOF_LONG, SIZEOF_FLOAT and SIZEOF_DOUBLE would be declared, in a header or somewhere. 我收集到将在标头或某处声明SIZEOF_CHAR,SIZEOF_SHORT,SIZEOF_LONG,SIZEOF_FLOAT和SIZEOF_DOUBLE。
Unfortunalty I don't have any idea where, so have no idea what to include to have access to the definitions. 不幸的是,我不知道在哪里,所以也不知道要包含哪些内容才能访问这些定义。
What should I include? 我应该包括什么?
Do I need to define these constants myself as I am in a different environment? 我是否在其他环境中需要自己定义这些常量?
Also I may be barking up the wrong tree, any help is appreciated. 另外,我可能在错误的树上吠叫,我们将不胜感激。
#define SIZEOF_SHORT sizeof(short)
#define SIZEOF_CHAR sizeof(char)
Repeat for all other types. 对所有其他类型重复此操作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.