0

I'm trying to build with the LAME files but I'm getting these errors on the machine.h file

What's going on?

enter image description here

enter image description here

enter image description here

Donald Duck
  • 8,409
  • 22
  • 75
  • 99
Dave
  • 477
  • 2
  • 5
  • 18

1 Answers1

1

Short answer : your defines are not what they are supposed to be. The BB10 SDK provides stdlib.h and string.h so you should either :

  • add a #define STDC_HEADERS 1 somewhere in the include path (inside version.h maybe, because it's seems to be included by everyone else)
  • add DEFINES += STDC_HEADERS to your .pro file.

You are trying to build your library inside Momentics.

That's usually the fastest way to go.

The issue is that you are skipping the whole configure part of Lame compilation, which was supposed to gather insight about the system you're trying to compile on by trial and error.

I haven't looked at Lame specificaly, but usually configure either creates an header file with all the right defines or add them in the Makefile it creates as arguments to the compiler.

Momentics, on the other way, compiles all .c|.cpp file and link them all together using qmake to handle all Qt specific bits. Momentics sets the right environment, and then there is a lot of scripts to handle all the BB10 processes (package, sign, ..).

So you'll have to provide the missing parts. Usually it's faster to create a new config.h from scratch, but sometimes you may want to use a console with the BB10 SDK environment and do a ./configure manually. Don't forget that the simulator is x86 and the real thing is ARM, so you will have take care of that too (Endianness/optimization issues).

Jean
  • 329
  • 1
  • 7
  • Thanks. I got it to compile by commenting out the four errored lines starting with #ifndef... I actually got LAME to work but it is giving me a strange output where the audio is a very deep pitch. My code for encoding looks good and it makes me wonder it my LAME build has problems possibly for the reasons you mention above. As a programmer I'm somewhere between novice and medium-low...makefiles, defines, configuring are something I'm almost totally ignorant about...so I have to learn. – Dave May 03 '13 at 13:35
  • I added DEFINES += STDC_HEADERS in the pro file and removed the commenting out those lines. It built fine. Thanks. Still my MP3's have a low deep pitch. Must research more. Thanks for the answer. – Dave May 03 '13 at 13:52
  • As an update to this: The low-pitch rate was due to me not matching sample rates in my code. Thanks again for the help. – Dave May 27 '13 at 18:00