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

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -