What’s the differences between .dll , .lib, .h files?

.h: header file, its a source file containing declarations (as opposed to .cpp, .cxx, etc. containing implementations), .lib: static library may contain code or just links to a dynamic library. Either way it’s compiled code that you link with your program. The static library is included in your .exe at link time. .dll: dynamic library. … Read more

How do header and source files in C work?

Converting C source code files to an executable program is normally done in two steps: compiling and linking. First, the compiler converts the source code to object files (*.o). Then, the linker takes these object files, together with statically-linked libraries and creates an executable program. In the first step, the compiler takes a compilation unit, … Read more

Why aren’t my include guards preventing recursive inclusion and multiple symbol definitions?

FIRST QUESTION: Why aren’t include guards protecting my header files from mutual, recursive inclusion? They are. What they are not helping with is dependencies between the definitions of data structures in mutually-including headers. To see what this means, let’s start with a basic scenario and see why include guards do help with mutual inclusions. Suppose … Read more

Difference between @interface definition in .h and .m file

It’s common to put an additional @interface that defines a category containing private methods: Person.h: @interface Person { NSString *_name; } @property(readwrite, copy) NSString *name; -(NSString*)makeSmallTalkWith:(Person*)person; @end Person.m: @interface Person () //Not specifying a name for the category makes compiler checks that these methods are implemented. -(void)startThinkOfWhatToHaveForDinner; @end @implementation Person @synthesize name = _name; -(NSString*)makeSmallTalkWith:(Person*)person … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)