Keil error:function definition is not allowed here

出现上述的一个原因是因为在函数定义内再定义了一个函数。

可能是上一个函数定义漏了“}”,补上即可。

阅读更多

definition of dllimport data not allowed error?

06-10

I am using VC6.0. I try to run a sample program when I met the above mentioned error. I don't know what's wrong. can anyone give me a hint?rncompiling results:rnrne:\research\program\testfeature\color_attrib.cxx(19) : warning C4273: 'is_ATTRIB_COL' : inconsistent dll linkage. dllexport assumed.rne:\research\program\testfeature\color_attrib.cxx(19) : error C2653: 'ATTRIB_NYG' : is not a class or namespace namerne:\research\program\testfeature\color_attrib.cxx(19) : error C2653: 'ATTRIB_NYG' : is not a class or namespace namerne:\research\program\testfeature\color_attrib.cxx(19) : error C2653: 'ATTRIB_NYG' : is not a class or namespace namerne:\research\program\testfeature\color_attrib.cxx(19) : error C2653: 'ATTRIB_NYG' : is not a class or namespace namerne:\research\program\testfeature\color_attrib.cxx(19) : error C2653: 'ATTRIB_NYG' : is not a class or namespace namerne:\research\program\testfeature\color_attrib.cxx(19) : error C2653: 'ATTRIB_NYG' : is not a class or namespace namerne:\research\program\testfeature\color_attrib.cxx(35) : error C2653: 'ATTRIB_NYG' : is not a class or namespace namerne:\research\program\testfeature\color_attrib.cxx(39) : error C2653: 'ATTRIB_NYG' : is not a class or namespace namerne:\research\program\testfeature\color_attrib.cxx(43) : error C2653: 'ATTRIB_NYG' : is not a class or namespace namerne:\research\program\testfeature\color_attrib.cxx(47) : error C2653: 'ATTRIB_NYG' : is not a class or namespace namerne:\research\program\testfeature\color_attrib.cxx(50) : error C2653: 'ATTRIB_NYG' : is not a class or namespace namerne:\research\program\testfeature\color_attrib.cxx(60) : error C2614: 'ATTRIB_COL' : illegal member initialization: 'ATTRIB_NYG' is not a base or memberrne:\research\program\testfeature\color_attrib.cxx(103) : error C2065: 'ATTRIB_NYG_TYPE' : undeclared identifierrnat_nyg.cxxrne:\research\program\testfeature\at_nyg.cxx(18) : warning C4273: 'ATTRIB_NYG_TYPE' : inconsistent dll linkage. dllexport assumed.rne:\research\program\testfeature\at_nyg.cxx(18) : warning C4273: 'is_ATTRIB_NYG' : inconsistent dll linkage. dllexport assumed.rne:\research\program\testfeature\at_nyg.cxx(18) : error C2491: 'ATTRIB_NYG_subclasses' : definition of dllimport data not allowedrne:\research\program\testfeature\at_nyg.cxx(18) : warning C4273: 'add_method' : inconsistent dll linkage. dllexport assumed.rne:\research\program\testfeature\at_nyg.cxx(18) : warning C4273: 'call_method' : inconsistent dll linkage. dllexport assumed.rne:\research\program\testfeature\at_nyg.cxx(18) : warning C4273: 'make_copy' : inconsistent dll linkage. dllexport assumed.rne:\research\program\testfeature\at_nyg.cxx(18) : warning C4273: 'identity' : inconsistent dll linkage. dllexport assumed.rne:\research\program\testfeature\at_nyg.cxx(18) : warning C4273: 'type_name' : inconsistent dll linkage. dllexport assumed.rne:\research\program\testfeature\at_nyg.cxx(18) : warning C4273: 'size' : inconsistent dll linkage. dllexport assumed.rne:\research\program\testfeature\at_nyg.cxx(18) : warning C4273: 'save' : inconsistent dll linkage. dllexport assumed.rne:\research\program\testfeature\at_nyg.cxx(18) : warning C4273: 'fix_pointers' : inconsistent dll linkage. dllexport assumed.rne:\research\program\testfeature\at_nyg.cxx(18) : warning C4273: 'copy_data' : inconsistent dll linkage. dllexport assumed.rne:\research\program\testfeature\at_nyg.cxx(18) : warning C4273: 'fixup_copy' : inconsistent dll linkage. dllexport assumed.rne:\research\program\testfeature\at_nyg.cxx(18) : warning C4273: 'lose' : inconsistent dll linkage. dllexport assumed.rne:\research\program\testfeature\at_nyg.cxx(18) : warning C4273: 'ATTRIB_NYG::~ATTRIB_NYG' : inconsistent dll linkage. dllexport assumed.rne:\research\program\testfeature\at_nyg.cxx(18) : warning C4273: 'debug_ent' : inconsistent dll linkage. dllexport assumed.rne:\research\program\testfeature\at_nyg.cxx(18) : warning C4273: 'save_common' : inconsistent dll linkage. dllexport assumed.rne:\research\program\testfeature\at_nyg.cxx(18) : warning C4273: 'restore_common' : inconsistent dll linkage. dllexport assumed.rne:\research\program\testfeature\at_nyg.cxx(18) : warning C4273: 'is_deepcopyable' : inconsistent dll linkage. dllexport assumed.rne:\research\program\testfeature\at_nyg.cxx(18) : warning C4273: 'copy_common' : inconsistent dll linkage. dllexport assumed.rne:\research\program\testfeature\at_nyg.cxx(18) : warning C4273: 'copy_scan' : inconsistent dll linkage. dllexport assumed.rne:\research\program\testfeature\at_nyg.cxx(18) : warning C4273: 'fix_common' : inconsistent dll linkage. dllexport assumed.rne:\research\program\testfeature\at_nyg.cxx(18) : warning C4273: 'ATTRIB_NYG::ATTRIB_NYG' : inconsistent dll linkage. dllexport assumed.rnError executing cl.exe.rnrntestfeature.exe - 14 error(s), 23 warning(s)

没有更多推荐了,返回首页