Tons of Undefined struct-union type and of incomplete type is not allowed
I'm pretty new to C++ and C, and I just integrated a source into a Windows
Phone Runtime Component. When compiling the library it self, everything is
fine, but when trying to instantiate some of the structures and objects,
it stats to display several errors like these one:
13 IntelliSense: incomplete type is not allowed
c:\Users\mouss_000\Documents\Visual Studio
2012\Projects\melo\melo\DecoderTest.c 131 33 melo
16 IntelliSense: argument of type "MLO_FrameData *" is incompatible with
parameter of type "const MLO_Byte *" c:\Users\mouss_000\Documents\Visual
Studio 2012\Projects\melo\melo\DecoderTest.c 141 49 melo
11 IntelliSense: argument of type "MLO_Decoder **" is incompatible with
parameter of type "const MLO_DecoderConfig *"
c:\Users\mouss_000\Documents\Visual Studio
2012\Projects\melo\melo\DecoderTest.c 87 33 melo
This test is based on the library that compiles fine, but it seems I can'
use any of the classes, structs or member without getting these errors. Is
this type of error linked with a common scenario and/or a newbie_C++_coder
pattern?
[Edit]
Code:
#include <stdio.h>
#include <errno.h>
#include <string.h>
#include "Melo.h"
#include "MloUtils.h"
/*----------------------------------------------------------------------
| Macros
+---------------------------------------------------------------------*/
/* Keeps all the frames from the stream */
#define MLO_DECODER_TEST_CONTINUOUS_STREAM
/* Do not display or save anything to get a rough idea of the speed */
#undef MLO_DECODER_TEST_FAST
/*----------------------------------------------------------------------
| ShowFrame
+---------------------------------------------------------------------*/
static void
ShowFrame(MLO_FrameData* frame)
{
#if ! defined (MLO_DECODER_TEST_FAST)
printf("Frame: sf=%lu, ch=%u, len=%u, s=%s, p=%s\n",
frame->info.sampling_frequency,
frame->info.channel_configuration,
frame->info.frame_length,
frame->info.standard == MLO_AAC_STANDARD_MPEG2 ? "MPEG2" : "MPEG4",
frame->info.profile == MLO_AAC_PROFILE_MAIN ? "MAIN" :
frame->info.profile == MLO_AAC_PROFILE_LC ? "LC" :
frame->info.profile == MLO_AAC_PROFILE_SSR ? "SSR" : "?");
No comments:
Post a Comment