mardi 19 janvier 2021

error: declaration does not declare anything [-fpermissive]

I am trying to compile a cpp code and will create shared object from it. It gave me an error where I define headers.

#ifndef SETTING_H
#define SETTING_H
#define INT long    //producing error here...is this because of version of g++ or something else?
#define REAL float
#include <cstring>
#include <cstdio>
#include <string>

This code produce error at the header.

Setting.h:3:13: error: declaration does not declare anything [-fpermissive]
    3 | #define INT long

Can anyone point out why this is happening? is it because of version of g++ or anything else?

Aucun commentaire:

Enregistrer un commentaire