.| Autor | Beitrag |
|---|---|
|
000 13.11.2001, 20:13 thinktank |
Wofür ist eigentlich __declspec und so weiter gedacht ? Einige werden vielleicht in Tränen ausbrechen ( ;-) ), weil ich diese Frage stellen, aber wofür braucht man das .lib - Format genau ? -- |
|
Profil || Suche |
|
001 13.11.2001, 21:56 TheTinySteini |
Gegenfrage: Wofür ist die MSDN gedacht? .lib: Braucht man nicht, is bloß "inkompatible Scheiße" (kA von wem dieses Zitat ist =) --TheTinySteini |
|
Profil || Suche |
|
002 13.11.2001, 22:02 Kriz |
__declspec: Extended attribute syntax simplifies and standardizes the Microsoft-specific extensions to the C language. The storage-class attributes that use extended attribute syntax include thread, naked, dllimport, and dllexport. The extended attribute syntax for specifying storage-class information uses the __declspec keyword, which specifies that an instance of a given type is to be stored with a Microsoft-specific storage-class attribute (thread, naked, dllimport, or dllexport). Examples of other storage-class modifiers include the static and extern keywords. However, these keywords are part of the ANSI C standard and as such are not covered by extended attribute syntax. Auf deutsch: Microsoft meint, man müsse mal wieder eigene Schlüsselwörter erfinden... .lib Dateien sind Librarys (Bibliotheken). Damit kann man seinen Code über mehrere .h- und .c/.cpp-Dateien hinweg bündeln und als Library in andere Programme einbinden (allerdings nur statisch, nicht so wie DLL's oder SO's): a.h werden in meinelib.lib kompiliert. Im Projekt c.cpp wird dann meinelib.lib eingebunden und man hat (sunsichtbar) den kompletten Zugriff auf a.cpp und b.cpp in c.cpp. Voraussetzung ist allerdings, daß man a.h und b.h explizit in das Projekt von c.cpp einfügt, d.h. ALLE Headerdateien aus einer Library müssen nochmals in einem Projekt erscheinen. Das finde ich persönlich zwar äußerst bescheuert, aber so ist das nun mal: a.h Cu --K:R-I)Z++ |
|
Profil || Suche |
|
003 13.11.2001, 22:07 thinktank |
Hmm , und was ist der Vorteil gegenüber normalen Headern ? -- |
|
Profil || Suche |
|
004 13.11.2001, 22:25 Another1 |
1. das man nich neu compilieren muss Another1 ...relaxing..atm =) |
|
Profil || Suche |

