Link to home
Start Free TrialLog in
Avatar of KwH
KwHFlag for Netherlands

asked on

__NULL_IMPORT_DESCRIPTOR already defined

I rearranged my projects and now I get the warning "LNK4006: __NULL_IMPORT_DESCRIPTOR already defined in comctl32.lib(COMCTL32.dll); second definition ignored" several times. How can I get rid of it?
Avatar of sunnycoder
sunnycoder
Flag of India image

Either you are redefining __NULL_IMPORT_DESCRIPTOR  or it is defined once in a header file which is included in several places.

As a good practice, you should protect your header files with

#ifndef IDENTIFIER
#define IDENTIFIER
//contents of header file
...
#endif /*IDENTIFIER*/

If your __NULL_IMPORT_DESCRIPTOR  is a data structure or variable, declare it in one c/cc file and link from others by declaring it an extern variable.

If this does not solve your problem, give us more details ...

Where in project is __NULL_IMPORT_DESCRIPTOR  found .... what do the declarations look like ... etc.

Cheers!
sunnycoder
More details about the error and possible reasons can be found here
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/LNK4006.asp

Cheers!
sunnycoder
ASKER CERTIFIED SOLUTION
Avatar of cwwkie
cwwkie

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial