I am writing a operating system that needs to interface with some external assembler functions. I put the declaration in the header:
namespace Kernel
{
class DescriptorTables
{
public:
void init();
void gdt_set_gate(s32int,u32int,u32int,u8int,u8int);
private:
extern void gdt_flush(u32int);
struct gdt_entry_struct
{
//...
When the code is ran, it produces
DescriptorTables.h:10:31: error: storage class specified for ‘gdt_flush’
I have never seen this error before, Any ideas on how to fix this?
You can’t say
externlike that within a class.externis a storage class, which explains the message you’re seeing.