Trying to study MPEG Layer-III encoder - getting “expected '=', ',', ';', 'asm' or '__attribute__' before” errors

StackOverflow https://stackoverflow.com/questions/3959224

  •  08-10-2019
  •  | 
  •  

Question

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?

Was it helpful?

Solution

Looks like bool is not defined. Include stdbool.h

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top