c++ - Defined in discarded section error -


i have struct type defined in header file mystruct.h struct mystruct {...};.

then have declared 1 struct object in main as:

mystruct s; 

and once in class header in same way.

this doesn't work, giving error:

`_zn10mystructc2ev' referenced in section `...myclass...'  of.../module.pre.o: defined in discarded section  `.text._zn10mystructc2ev[_zn10mystructc5ev]' of .../module.pre.o 

if have struct in class works, need in main. how can solve?

define :

extern mystruct s; 

in header file.


Comments

Popular posts from this blog

wireshark - USB mapping with python -

c++ - nodejs socket.io closes connection before upgrading to websocket -

Deploying Qt Application on Android is really slow? -