Ticket Name: Linux/TDA2: c66 alg_plugins structures contain each other compilation problem Query Text: Part Number: TDA2 Tool/software: Linux i add a new in vision_sdk\apps\src\rtos\alg_plugins ,but compil failed in linux ,follow is the log "framecopy/Arcsoft_AHD_Utils.h", line 172: warning: declaration is not visible outside of function "framecopy/Arcsoft_AHD_Layer.h", line 42: warning: typedef name has already been declared (with same type) "framecopy/Arcsoft_AHD_Net.c", line 157: error: argument of type "Network *" is incompatible with parameter of type "struct __tag_network *" "framecopy/Arcsoft_AHD_Net.c", line 157: error: argument of type "AHDGlobalHandle *" is incompatible with parameter of type "struct AHDGlobalHandle *" "framecopy/Arcsoft_AHD_Net.c", line 184: error: argument of type "Network *" is incompatible with parameter of type "struct __tag_network *" "framecopy/Arcsoft_AHD_Net.c", line 184: error: argument of type "AHDGlobalHandle *" is incompatible with parameter of type "struct AHDGlobalHandle *" "framecopy/Arcsoft_AHD_Net.c", line 220: error: argument of type "Network *" is incompatible with parameter of type "struct __tag_network *" "framecopy/Arcsoft_AHD_Net.c", line 220: error: argument of type "AHDGlobalHandle *" is incompatible with parameter of type "struct AHDGlobalHandle *" is calling MVoid forward_convolutional_layer(MCONV_LAYER *l,Network *net,AHDGlobalHandle *pHandle) structures contain each other typedef struct __tag_layer{ LAYER_TYPE type; ACTIVATION activation; COST_TYPE cost_type; MVoid(*forward) (struct __tag_layer *, struct __tag_network *, struct AHDGlobalHandle *); //MVoid(*forward) (struct __tag_layer *, Network *, AHDGlobalHandle *); MInt32 i32Batch_normalize; MInt32 i32Shortcut; MInt32 i32Batch; MInt32 i32Flipped; MInt32 i32Inputs; MInt32 i32Outputs; MInt32 i32Truths; MInt32 i32h, i32w, i32c; MInt32 i32out_h, i32out_w, i32out_c; MInt32 i32N; MInt32 i32Max_boxes; MInt32 i32Groups; MInt32 i32Size; MInt32 i32Stride; MInt32 i32Reverse; MInt32 i32Pad; MInt32 i32Sqrt; MInt32 i32Index; MFloat fDot; MFloat fJitter; MInt32 i32Softmax; MInt32 i32Classes; MInt32 i32Coords; MInt32 i32Background; MInt32 i32Rescore; MInt32 i32Log; //*** adam param MInt32 i32Adam; MFloat fB1; MFloat fB2; MFloat fEps; MFloat * pfm; MFloat * pfv; //*** normalization_layer param MFloat fAlpha; MFloat fBeta; MFloat fKappa; MFloat fCoord_scale; MFloat fObject_scale; MFloat fNoobject_scale; MFloat fClass_scale; MInt32 i32Bias_match; MInt32 i32Random; MFloat fThresh; MInt32 i32Classfix; MInt32 i32Absolute; MInt32 i32Dontload; MInt32 i32Dontloadscales; MFloat fTemperature; MInt32 * pi32Indexes; // max-pool param MInt16 * pi16Biases; MFloat * pfBiases; MFloat * pfScales; MInt16 * pi16Weights; MFloat * pfWeights; //*** local layer param MFloat * pfCol_image; MInt32 * pi32Input_layers; MInt32 * pi32Input_sizes; MInt16 * pi16Output; MFloat * pfOutput; MFloat * pfSquared; MFloat * pfNorms; //*** batch_norm param MFloat * pfSpatial_mean; MFloat * pfMean; MFloat * pfVariance; MFloat * pfRolling_mean; MFloat * pfRolling_variance; MFloat * pfX; MFloat * pfX_norm; MInt32 i32Workspace_size; //*** for dsp MInt16 *conv_buffer; }MLAYER,*PMLAYER; typedef struct __tag_network { MInt32 i32N; MInt32 i32Batch; MInt32 *pi32Seen; MInt32 i32Subdivisions; MFloat fMomentum; MFloat fDecay; MLAYER *psLayers; MInt32 i32Outputs; MFloat *pfOutput; LEARNING_RATE_POLICY ePolicy; MFloat fLearning_rate; MFloat fGamma; MFloat fScale; MFloat fPower; MInt32 i32Time_steps; MInt32 i32Step; MInt32 i32Max_batches; MFloat *pfScales; MInt32 *pi32Steps; MInt32 i32Num_steps; MInt32 i32Burn_in; MInt32 i32Adam; MFloat fB1; MFloat fB2; MFloat fEps; MInt32 i32Inputs; MInt32 i32h, i32w, i32c; MInt32 i32Max_crop; MInt32 i32Min_crop; MFloat fAngle; MFloat fAspect; MFloat fExposure; MFloat fSaturation; MFloat fHue; //*** net-net param MFloat *pfTruth; MInt16 *pi16Input; MFloat *pfInput; MFloat *pfWorkspace; MInt32 i32Index; }Network,*PNetwork; typedef struct AHDGlobalHandle { MHandle hMemMgr; // memory handle of global handle MUInt64 nFrameNum; MInt32 i32Width; // video width MInt32 i32Height; // video height MUInt32 u32PixelArrayFormat; // video pixel array format AHD_ENUM_MODEL eModel; MInt32 i32Roll; MInt32 i32SignMaxNum; // max number of hands to be detected MImageStore sImgStore; // skip frame Network sNet; MFloat fThresh; MBOX *psBoxes; MFloat **pfProbs; AHD_SIGNS *psHandsInner; // internal hands detected result MLong *plTmpBuf; // image resize buffer MUInt32 u32BufSize; // buffer size ASVLIMAGE sImgGray; MHandle hmcvParallelMonitor; // convolution multi thread MHandle hmcvParallelMonitor2; // detect multi thread MInt32 i32taskId; }AHDGlobalHandle; Responses: Hi Shuai, I am not sure that I completely understand the code, but in the declaration of "struct __tag_layer" there is: MVoid(*forward) (struct __tag_layer *, struct __tag_network *, struct AHDGlobalHandle *); //MVoid(*forward) (struct __tag_layer *, Network *, AHDGlobalHandle *); the commented function expects second argument of type "Network *" which matches the function "forward_convolutional_layer()" and also what is passed as paraeter on line 157. What is the result when you use the second definition of MVoid(*forward)() in the "struct __tag_layer"? Regards, Yoradn