error "causes a section type conflict"

OP #1172906
I'm receiveing the error "error: PBCInterface::sPBCInitTablecauses
causes a section type conflict"

// .hpp file
struct sPBCInitEntry
{
.
.
.
}
class PBCInterface
{
.
.
.
private:
static  const sPBCInitEntry sPBCInitTable[]  TSECT_Data_32;
.
}

//.cpp file
const sPBCInitEntry     PBCInterface::sPBCInitTable[] =
{
    {     0x0000,0x0000  },     // 0x00
    {     0x0001,0x0000  },     // 0x01
    {     0x01a9,0x0000  },     // 0x02
    {     0x01aa,0x0000  },     // 0x03
    {     0x01ab,0x0000  },     // 0x04
    {     0x01ac,0x0000  },     // 0x05
    {     0x01ad,0x0000  },     // 0x06
    {     0x0002,0x023e  },     // 0x07
    {     0x0003,0x8000  },     // 0x08
    {     0x0007,0x8555  },
    {     0x0008,0x0555  },
    {     0x0009,0x5555  },
    {     0x000a,0x00bf  },
    {     0x0199,0x0000  },
    {     0x019b,0x01ff  },
    {     0x019c,0x01ff  },
    {     0x01e8,0x0000  },
    {     0x01e9,0x0000  },

    {     0x01eB,0x0800  },
    {     0x01ec,0x0000  },
    {     0x01ef,0x0000  },
    {     0x01f0,0x0000  },

    {     0x0020,0x0038  },
    {     0x019b,0x01fd  },
    {     0x000e,0x0003  },
    {     0x000f,0x0020  },
    {     0x0199,0x0002  },
    {     0x0002,0x423e  },
    {     0x0002,0x023e  },
    {     0x000d,0x0001  },
    {     0x0000,0x0000  }
};

I'm doing similar stuff in other source that compiles fine, but I can't
figurout why this one doesn't work.  Any help/thoughts?

Thanks,
Dustin
OP #1172908
Dustin Sr wrote:
> I'm also getting the error "error: braces around scalar initializer for
> type 'const CmdEntry' "
> for some other code that is trying to do basicly the same thing.
>
> D

Also If I change TSECT_Data_32 to TSECT_Data_16 then the error goes
away, both are under *(.data) and *(.bss) in Sections{ in my sections
map. Is this a Linker or memory mapping problem?

Reply

A question of your own? This thread is over 19 years old. Ask it in a thread of its own – more people read along there, and it gets answered more often and sooner.

Start a new thread

A fix, an addition or feedback on this thread? Then reply here.

Formatting
  • [c]C-Code[/c]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.