מה זה קובץ DLL?

sneaker

New member
Dynamic link library

When u do #iclude<stdio.h> u are linking to a static library. A dynamic library is like a static but the linking is done at runtime and not compilation time,
 

vinney

Well-known member
איזה בולשיט

כשאתה עושה include אתה מכיל קובץ טקסט אחר בתוך הקובץ שלך, אין שום קשר בין הפעולה הזאת לבין הקישור.
 

® רן

New member
צודק

include הוא הוראה ל pre-processor (שלב אחד לפני קומפילציה), לא ללינקר (שבא שלב אחד אחרי הקומפילציה). גם כשמשתמשים בספריות סטטיות וגם ב DLL צריך לעשות include ל header file המתאים.
 
../images/Emo45.gif עדיף להגיד :

"אילו גללי שור!"
או סתם "לא נכון ולא נכון! נה נה בננה
!"
 

stcpsneaker

New member
lib

When u do an include to a standrad file like stdio.h the liniking to the stdio.lib file is done for u but the linikage must happen no matter what. if u create your on static library when u include the header the linking must also be specifed. In general is it best to do the linking command inside the header file(#pragma comment(lib, "libname")) and then when u include the header file u also link the static library also. Therefor the diffrent between static and dynamic library is that when u compile with a static library u take all the code u need from the *.lib file at compilation time but when u compile a dynamic library u need the library also at runtime because u don't take the code in compilation time. And correct me if I'm wrong Vinney
 

gmorphus

New member
צודק חלקית

ואין קשר בין מה שאמרת עכשיו למה שאמרת קודם. ב import library נעשה בכל מקרה, לא משנה איפה ואין קשר ל include או לכל דבר אחר. כשאתה עושה include ל stdio הלינקוג' לא "נעשה עבורך" באופן אוטומטי. במקום כשלהו בקוד או בהגדרות של הפרוייקט מצוינת הספרייה אליה צריך להתלנקג'.
 

vinney

Well-known member
אין כזה דבר stdio.lib

ובבקשה, אם אתה כותב באנגלית, לפחות תכתוב כך שאפשר יהיה להבין אותך. אין מילה כזאת U באנגלית, כמו שאין מילה linikage, וכמו בכל שפה, גם באנגלית מקובל לשים פסיקים מדי פעם. לידיעתך (בUNIX שאתה עובד עליו) יש ספריה libc שכוללת את כל הספריה הסטנדרטית של C, המחולקת כידוע ליותר מ10 קבצי header, כך שהקשר בין include לבין הספריה בlinkage הוא מקרי בהחלט.
 
למעלה