尝试研究 MPEG Layer-III 编码器 - 得到“expected '=', ',', ';', 'asm” ;或“__属性__”之前”错误

发布于 2024-09-27 18:20:32 字数 1178 浏览 3 评论 0原文

问候。

我正在为即将到来的项目研究 mpeg 第三层编码的工作方式。我下载了 Shine 编码器,因为据说它是最简单的。 http://www.mp3-tech.org/programmer/sources/shine.zip 是链接。

我当前失败的步骤是编译我下载的源代码。

我以前从未从事过较低级别的编程或编译工作,也就是说,我主要在 GUI 中工作,只是制作项目、设计表单、编写代码...我基本上理解编译和链接的工作原理,但我从未通过命令进行过操作线或任何东西。另外,我不能说我对 C/C++ 非常熟练,因为我是为 Borland Delphi 开发的,然后直接使用 C# 转向 .NET。我假设由于文件名为 .h 和 .c,因此它们是 C 文件,而不是 C++ 文件。

我被告知使用 QT Creator,因为即将到来的项目也必须在 Linux 上运行,而我们公司使用 QT 来制作 Linux 应用程序。

我确实创建了一个空白的 QT 创建者控制台应用程序项目,但与 c 不同,此控制台应用程序包含事件循环(???)。无论如何,我所做的是删除 main.cpp 并添加所有 Shine 项目文件。我将 main.c 文件设置为 SOURCES 列表中的第一个文件,因此编译从它开始。

现在,编译器告诉我这个常见错误

"expected '=', ',', ';', 'asm' or '__attribute__' before"

,例如,在以下行:

bool  wave_open(); 

在 wave.h

static bool parse_command(int argc, char** argv) 

main.c

中,我没有找到此错误的任何描述,网上讨论的所有情况都会导致人们在另一个文件中发现拼写错误,导致错误(忘记前一个头文件中 endif 之前的字母或 #)。 我不明白这个错误是什么,例如,

int i;

在错误之前添加仍然会使编译器再次吐出相同的错误。

有人可以建议我需要做什么才能在 QT Creator 下实际编译代码吗?

Greetings.

I am studying the way mpeg layer-III encoding works for an upcoming project. I downloaded the shine encoder as it is said to be the simpliest of all. http://www.mp3-tech.org/programmer/sources/shine.zip is the link.

My current step that i FAIL at is to compile the source codes i downloaded.

I never before worked on a lower levels of programming or compiling, to say, i mostly worked in GUI's and just made projects, designed forms, written code... I do understand basically how compiling and linking works but i never did it from command line or anything. Also i cannot say i am very skilled with c/c++ as i developed for Borland Delphi and then went straight to .NET with C#. I assume that since files are called .h and .c they are C, not C++ files.

I was told to use QT Creator since the upcoming project will have to run on Linux as well, and our company uses QT for making Linux apps.

I did create a blank QT creator console application project, but unlike c, this console appicaton contains event loop (???). Anyways, what i did is removed main.cpp and added all shine project files. I made main.c file the first one in SOURCES list so compiling starts with it.

Now, the compiler tells me this common error

"expected '=', ',', ';', 'asm' or '__attribute__' before"

for example, at lines:

bool  wave_open(); 

at wave.h

and

static bool parse_command(int argc, char** argv) 

at main.c

I didnt find any description of this error, all cases of its discussion on the webs lead to persons finding typos in another files that leads to the error (forgetting a letter or # before endif in previous header file).
I dont understand what is this error about as for example, adding

int i;

before the error still makes compiler spit this same error again.

Could someone please suggest what do i need to do to actually compile the code under QT Creator?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

丢了幸福的猪 2024-10-04 18:20:32

看起来 bool 没有定义。包含stdbool.h

Looks like bool is not defined. Include stdbool.h

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文