View Full Version : Compiling the OpenML programs

11-18-2004, 08:32 AM
Hello dear Fabrice
For compiling all the programs, i use from VC++6.0.I use from the "win32 consol application" projects for running the ML programs.
when i attempt to compile the project "memtoaudio.dsw", i see many compile-time errors for fprintf. As an example for the line fprintf( fp, "%" FORMAT_LLD, ust );
I see the following error:
...audioutils.c(68) : error C2146: syntax error : missing ')' before identifier 'FORMAT_LLD'
How can i solve my problems about the FORMAT_LLD?
Nothe that i have added these files to my project:
audiotomem.c, audioUtils.c, utils.c, audioUtils.h, utils.h.
I only added the ml10.lib and mlu10.ilb to my project.

11-18-2004, 10:33 AM
Hello Ehsan,

I don't have the code at hand right here, and I don't remember the details, but I thought we provided "dsp" project files as well as the "dsw" workspace file. Are you using our project file?

In any case, 'FORMAT_LLD' is a macro that we use to hide the platform-specific details of supplying a 64-bit value to 'printf' (the actual syntax varies depending on the platform/compiler). It looks like in your case, you are not seeing the macro definition.

This is likely caused by 1 of 2 things:
1) you are not including the appropriate header file. Check which file defines the macro (search through all header files), and make sure you are including it. If you have not modified the example program that you are attempting to compile, then this is not the problem.
2) you are not specifying the appropriate compile-time macro definitions. The 'FORMAT_LLD' macro is defined within '#ifdef' blocks -- so that the appropriate definition is used depending on the platform. These '#ifdef' pre-processor directives rely on other macros, which need to be defined on the command-line (using the '/D<macro>' syntax). Check your project settings to make sure you have the right macro definitions (the makefile, or our own project files, should tell you the necessary macros).

11-20-2004, 10:53 AM
Hi Fabrice
Your guess was true. the FORMAT_LLD types are defined in mltypes.h . i included it to my project and i compiled this program. :)
Thank yo very much