AnsweredAssumed Answered

BF527 Include Guard

Question asked by Smolny Employee on Jun 7, 2010
Latest reply on Jun 9, 2010 by CraigG

It's a repost from Blackfin thread.

Hi, people!

I have some problems working with 527 on it's EZ-Kit.

My project contains severall .cpp and one header file with all prototypes/defines/etc.

And I receive an [Error li1050]: Multiply defined symbol in processor 'p0' errors.

Neither #pragma once, neither any other methods of include guard have no effect (#ifndef ... #define .... #endif).

Tried different optimization settings, redefinitions take place independent of this option.

Any ideas?

 

ANY code results with error

Even if we take several cpp files, empty, only with #include. For example:

 

ADE_test.cpp (main)

#include "include.h"

 

ADE7878.cpp

#include "include.h"

 

DisplayPics.cpp

#include "include.h"

 

include.h

#pragma once

#ifndef FILE_H
#define FILE_H

section("sdram0") unsigned short TempFrame[640];

#endif

 

we get

[Error li1050]  '_TempFrame' ('TempFrame'): Multiply defined symbol in processor 'p0'.
        Initial definition:     '.\Debug\ADE7878.doj'
        Attempted redefinition: '.\Debug\ADE_test.doj'


[Error li1050]  '_TempFrame' ('TempFrame'): Multiply defined symbol in processor 'p0'.
        Initial definition:     '.\Debug\ADE7878.doj'
        Attempted redefinition: '.\Debug\DisplayPics.doj'

Outcomes