The comment can then be read by the linker when it processes object files. #pragmacomment(lib, libname) tells the linker to add the 'libname' library to the...
Here are a couple of examples: Linking with a Library ... This specifies the entry point for the executable. Linking with DLL: #pragmacomment(lib, "mydll.lib").
#pragmacomment(lib, "DLL1.lib"). has the same effect (as an alternative approach) of set DLL1.lib as implicit link library input in project link settings?
is a compiler directive which indicates Visual C++ to leave a comment in the generated object file. The comment can then be read by the linker when it processes object files.
#pragma comment(lib, libname)
tells the linker to add the 'libname' library to the list of library dependencies, as if you had added it in the project properties at
Linker->Input->Additional dependencies
See #pragma comment on microsoft.com
19 Ocak 2023
224 kişi değerlendirdi
2 yorum
{"2_gijw":{"state":{"logo":{"href":"//yandex.com.tr","isForeign":true},"form":{"action":"/search/","searchLabel":"Bul","hiddenInputs":[{"name":"lr","value":21206}]},"actions":{"advancedSearch":{"checked":false,"ariaLabel":"Gelişmiş arama"},"moreButtonProps":{"ariaLabel":"Daha fazla"},"cbir":{"name":"cbir","label":"Поиск по картинке","infoUrl":"//yandex.ru/promo/photosearch/index?source=landingdesk","isMacOS":false}},"userSection":{"loggedIn":false,"loginProps":{"loginUrl":"https://passport.yandex.com.tr/auth?retpath=%2F&origin=serp_desktop_auth_new","loginText":"Giriş yap","burgerAriaLabel":"Menü"}},"navigation":{"tabs":[{"id":"www","label":"Arama","url":"//yandex.com.tr","params":{"source":"tabbar"},"target":""},{"id":"images","label":"Görsel","url":"//yandex.com.tr/gorsel/search","params":{"text":"[$query]","noreask":"[$noreask]","nomisspell":"[$nomisspell]","parent-reqid":"[$reqid]","from":"tabbar"}},{"id":"video","label":"Video","url":"//yandex.com.tr/video/search","params":{"text":"[$query]","noreask":"[$noreask]","parent-reqid":"[$reqid]","from":"tabbar"}},{"id":"maps","label":"Haritalar","url":"//yandex.com.tr/harita","params":{"text":"[$query]","source":"serp_navig"}},{"id":"translate","label":"Çeviri","url":"//ceviri.yandex.com.tr","params":{"text":"[$query]","from":"tabbar"}}],"selectedTabId":"www"},"context":{"query":"pragma comment lib","reqid":"1722055504725236-844321101348841598-balancer-l7leveler-kubr-yp-vla-230-BAL","noreask":"1","lr":"21206","counters":{"type":"b","data":{"$header":"0_10l6z000","logo":"0_10l6z001","login":"0_10l6z003","usermenu":"0_10l6z004","market-cart":"0_10l6z006","more-button":"0_10l6z007","cbir":"0_10l6z008","$navigation":"0_10l6z009","item":"0_10l6z00i","tab-www":"0_10l6z00b","tab-images":"0_10l6z00d","tab-video":"0_10l6z00f","tab-maps":"0_10l6z00h","tab-translate":"0_10l6z00j"}}},"loggedIn":false,"baobab":{"parentNode":{"context":{"genInfo":{"prefix":"0_10l6w01-0-1"},"ui":"desktop","service":"web","reqid":"1722055504725236-844321101348841598-balancer-l7leveler-kubr-yp-vla-230-BAL","fast":{"name":"header-desktop"}}}}},"type":"header-desktop"},"2_10l60":{"state":{"queryUrl":"/gorsel/search?text=pragma%20comment%20lib&stype=image&lr=21206&noreask=1&parent-reqid=1722055504725236-844321101348841598-balancer-l7leveler-kubr-yp-vla-230-BAL&source=serp","extralinks":{"feedback":{"feature":"Тематический блок картинок","checkBoxLabels":[{"value":"Несоответствие запросу"},{"value":"Порнография"},{"value":"Шокирующая или неприятная информация"},{"value":"Недостоверная информация"},{"value":"Удалите мое фото"},{"value":"Другое"}],"customMetaFields":[{"name":"docId","value":"7"}]},"directions":["bottom-end"],"hidden":true,"headerProps":{"title":"Görsel"}},"favicon":{"index":6,"pageNumber":0,"size":"m"},"images":[{"src":"//avatars.mds.yandex.net/i?id=2ff7405a6c33233322af1199f2427f42d53f55a028eb5883-9852364-images-thumbs&n=13","width":480,"height":257,"url":"/gorsel/search?text=pragma+comment+lib&img_url=https%3A%2F%2Fotvet.imgsmail.ru%2Fdownload%2F179740033_1eac0cd7a33cc33adaecafe24a06281a_800.png&pos=0&rpt=simage&stype=image&lr=21206&noreask=1&parent-reqid=1722055504725236-844321101348841598-balancer-l7leveler-kubr-yp-vla-230-BAL&source=serp","globalId":"2ff7405a6c33233322af1199f2427f42d53f55a028eb5883-9852364-images-thumbs","docid":"ZC23B9B31DE2BC3F3","crc":"13898512964366238379","label":"Görsel: ","origWidth":633,"origHeight":339,"lazy":false},{"src":"//avatars.mds.yandex.net/i?id=66a1f12807fb987d349adc4048f16ad8b732bb91-8977890-images-thumbs&n=13","width":480,"height":255,"url":"/gorsel/search?text=pragma+comment+lib&img_url=https%3A%2F%2Fi.stack.imgur.com%2F5QVuP.png&pos=1&rpt=simage&stype=image&lr=21206&noreask=1&parent-reqid=1722055504725236-844321101348841598-balancer-l7leveler-kubr-yp-vla-230-BAL&source=serp","globalId":"66a1f12807fb987d349adc4048f16ad8b732bb91-8977890-images-thumbs","docid":"Z557CE655690FE4F5","crc":"8500903142259607402","label":"Görsel: Download Visual Studio Image Library 2013 Images and Photos","origWidth":1920,"origHeight":1018,"lazy":false},{"src":"//avatars.mds.yandex.net/i?id=59f038711aed6f98e7da1b2ae05f05744a300dd4-9820447-images-thumbs&n=13","width":414,"height":320,"url":"/gorsel/search?text=pragma+comment+lib&img_url=https%3A%2F%2F1.bp.blogspot.com%2F-MU8QEb9ucos%2FT5wF0x7o_OI%2FAAAAAAAAAO0%2FXvCAAlGxjIs%2Fs1600%2F1.jpg&pos=2&rpt=simage&stype=image&lr=21206&noreask=1&parent-reqid=1722055504725236-844321101348841598-balancer-l7leveler-kubr-yp-vla-230-BAL&source=serp","globalId":"59f038711aed6f98e7da1b2ae05f05744a300dd4-9820447-images-thumbs","docid":"ZC0383BE386A92A4B","crc":"3167909852062100448","label":"Görsel: GoLog Student's in ITB: Port Scanner Standar dengan c++","origWidth":442,"origHeight":342,"lazy":false},{"src":"//avatars.mds.yandex.net/i?id=2d0a06fc0c43ffa0042f407a4bd7a4e6d4a8f757-4461053-images-thumbs&n=13","width":480,"height":270,"url":"/gorsel/search?text=pragma+comment+lib&img_url=https%3A%2F%2Fimages.slideplayer.com%2F22%2F6380599%2Fslides%2Fslide_5.jpg&pos=3&rpt=simage&stype=image&lr=21206&noreask=1&parent-reqid=1722055504725236-844321101348841598-balancer-l7leveler-kubr-yp-vla-230-BAL&source=serp","globalId":"2d0a06fc0c43ffa0042f407a4bd7a4e6d4a8f757-4461053-images-thumbs","docid":"ZAF073566C472EAEC","crc":"6543787372130451374","label":"Görsel: GAM531 DPS931 - Week 9 OpenGL 4.3 and Direct X ppt download","origWidth":1024,"origHeight":576,"lazy":false},{"src":"//avatars.mds.yandex.net/i?id=6c4d513e12bcf7721ca8303f45f34b6e4262e4fbfbaafb74-5302022-images-thumbs&n=13","width":480,"height":270,"url":"/gorsel/search?text=pragma+comment+lib&img_url=https%3A%2F%2Fbenisnous.com%2Fwp-content%2Fuploads%2F2021%2F01%2FCreating-a-TCP-Server-in-C.jpg&pos=4&rpt=simage&stype=image&lr=21206&noreask=1&parent-reqid=1722055504725236-844321101348841598-balancer-l7leveler-kubr-yp-vla-230-BAL&source=serp","globalId":"6c4d513e12bcf7721ca8303f45f34b6e4262e4fbfbaafb74-5302022-images-thumbs","docid":"Z77D9F70978A57D23","crc":"166733666903409356","label":"Görsel: Creating a TCP Server in C++","origWidth":1280,"origHeight":720,"lazy":false},{"src":"//avatars.mds.yandex.net/i?id=6ebc54fa892a8aafa068439a6d99dc1b82f41d5c-5241954-images-thumbs&n=13","width":468,"height":320,"url":"/gorsel/search?text=pragma+comment+lib&img_url=https%3A%2F%2Fi.stack.imgur.com%2Fmhv64.png&pos=5&rpt=simage&stype=image&lr=21206&noreask=1&parent-reqid=1722055504725236-844321101348841598-balancer-l7leveler-kubr-yp-vla-230-BAL&source=serp","globalId":"6ebc54fa892a8aafa068439a6d99dc1b82f41d5c-5241954-images-thumbs","docid":"Z52368BDFA5ACB14F","crc":"14539432857074447307","label":"Görsel: Pragma comment","origWidth":820,"origHeight":561,"lazy":false},{"src":"//avatars.mds.yandex.net/i?id=9f4617c3f990084c6433cd31cf9b6cececf805a5-12421362-images-thumbs&n=13","width":480,"height":300,"url":"/gorsel/search?text=pragma+comment+lib&img_url=https%3A%2F%2Fi.stack.imgur.com%2FxM3Z2.png&pos=6&rpt=simage&stype=image&lr=21206&noreask=1&parent-reqid=1722055504725236-844321101348841598-balancer-l7leveler-kubr-yp-vla-230-BAL&source=serp","globalId":"9f4617c3f990084c6433cd31cf9b6cececf805a5-12421362-images-thumbs","docid":"ZFA21EAB17A25908E","crc":"5234055175034740092","label":"Görsel: Visual c++ unresolved external symbol Direct3DCreate9@4 -","origWidth":1680,"origHeight":1050,"lazy":false},{"src":"//avatars.mds.yandex.net/i?id=9d2bdc4f913d2f1421259ffae13602f00d18db05-8322579-images-thumbs&n=13","width":480,"height":270,"url":"/gorsel/search?text=pragma+comment+lib&img_url=https%3A%2F%2F1.bp.blogspot.com%2F-PtMImp4Iz64%2FUFPeAxhAY3I%2FAAAAAAAAAJQ%2FyAdXEmQs0VA%2Fs1600%2Fvs2012.jpg&pos=7&rpt=simage&stype=image&lr=21206&noreask=1&parent-reqid=1722055504725236-844321101348841598-balancer-l7leveler-kubr-yp-vla-230-BAL&source=serp","globalId":"9d2bdc4f913d2f1421259ffae13602f00d18db05-8322579-images-thumbs","docid":"Z44A437B4ED2ED772","crc":"12894383268664111683","label":"Görsel: ","origWidth":1366,"origHeight":768,"lazy":false},{"src":"//avatars.mds.yandex.net/i?id=8289530fbf402a45d254e932adec5b1af558dd8f-8316909-images-thumbs&n=13","width":445,"height":320,"url":"/gorsel/search?text=pragma+comment+lib&img_url=https%3A%2F%2Fimages2015.cnblogs.com%2Fblog%2F359739%2F201604%2F359739-20160426174939720-1200106955.png&pos=8&rpt=simage&stype=image&lr=21206&noreask=1&parent-reqid=1722055504725236-844321101348841598-balancer-l7leveler-kubr-yp-vla-230-BAL&source=serp","globalId":"8289530fbf402a45d254e932adec5b1af558dd8f-8316909-images-thumbs","docid":"Z1BB5A362E9AF1611","crc":"6027297356144973484","label":"Görsel: window 安 装 Protobuf - 走 看 看","origWidth":928,"origHeight":667,"lazy":false},{"src":"//avatars.mds.yandex.net/i?id=973ad3b91741d9888443e216dc11f85c89e010a0-5232644-images-thumbs&n=13","width":457,"height":320,"url":"/gorsel/search?text=pragma+comment+lib&img_url=https%3A%2F%2Fweb-answers.ru%2Fwp-content%2Fuploads%2F2019%2F01%2FwK2EL.png&pos=9&rpt=simage&stype=image&lr=21206&noreask=1&parent-reqid=1722055504725236-844321101348841598-balancer-l7leveler-kubr-yp-vla-230-BAL&source=serp","globalId":"973ad3b91741d9888443e216dc11f85c89e010a0-5232644-images-thumbs","docid":"ZE2835835DDAF255F","crc":"1599449633609142085","label":"Görsel: c++ - What is stored in this 26KB executable? - Stack","origWidth":916,"origHeight":641,"lazy":false},{"src":"//avatars.mds.yandex.net/i?id=69bb9294857fd08f925dd3a1a908a2e440458f04-12416107-images-thumbs&n=13","width":422,"height":320,"url":"/gorsel/search?text=pragma+comment+lib&img_url=https%3A%2F%2Fs.getwinpcsoft.com%2Fscreenshots%2F1761%2F1761583_4.jpg&pos=10&rpt=simage&stype=image&lr=21206&noreask=1&parent-reqid=1722055504725236-844321101348841598-balancer-l7leveler-kubr-yp-vla-230-BAL&source=serp","globalId":"69bb9294857fd08f925dd3a1a908a2e440458f04-12416107-images-thumbs","docid":"Z8379C41774590100","crc":"5467047492134042889","label":"Görsel: Pragma latest version - Get best Windows software","origWidth":545,"origHeight":413,"lazy":false},{"src":"//avatars.mds.yandex.net/i?id=3dd3909dc3488d0f9a096b5e55b4ce35a728faca-5161097-images-thumbs&n=13","width":480,"height":270,"url":"/gorsel/search?text=pragma+comment+lib&img_url=https%3A%2F%2Fi.ytimg.com%2Fvi%2FPmtHtQGEQVM%2Fmaxresdefault.jpg&pos=11&rpt=simage&stype=image&lr=21206&noreask=1&parent-reqid=1722055504725236-844321101348841598-balancer-l7leveler-kubr-yp-vla-230-BAL&source=serp","globalId":"3dd3909dc3488d0f9a096b5e55b4ce35a728faca-5161097-images-thumbs","docid":"ZB574CF4F10FBE4C9","crc":"6576727675549251858","label":"Görsel: OpenCV(VC++)プ ロ グ ラ ミ ン グ(11/13) 照 度 差 ス テ レ オ 法 の 実 装 例 -","origWidth":1280,"origHeight":720,"lazy":false},{"src":"//avatars.mds.yandex.net/i?id=92a7db45f2f5c7a9aeecefc92934c9a156a57ea3623ba1c2-5287653-images-thumbs&n=13","width":457,"height":320,"url":"/gorsel/search?text=pragma+comment+lib&img_url=https%3A%2F%2Fi.stack.imgur.com%2FCi3tk.png&pos=12&rpt=simage&stype=image&lr=21206&noreask=1&parent-reqid=1722055504725236-844321101348841598-balancer-l7leveler-kubr-yp-vla-230-BAL&source=serp","globalId":"92a7db45f2f5c7a9aeecefc92934c9a156a57ea3623ba1c2-5287653-images-thumbs","docid":"Z906C2C9A1BB5F947","crc":"8461735426548351308","label":"Görsel: c++ - What is stored in this 26KB executable? - Stack","origWidth":916,"origHeight":641,"lazy":false},{"src":"//avatars.mds.yandex.net/i?id=01dab18d7825a180f72ed6189c3d21c6768dab6ac4859003-9217732-images-thumbs&n=13","width":480,"height":270,"url":"/gorsel/search?text=pragma+comment+lib&img_url=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fw51pftzS1_8%2Fmaxresdefault.jpg%3F7857057827&pos=13&rpt=simage&stype=image&lr=21206&noreask=1&parent-reqid=1722055504725236-844321101348841598-balancer-l7leveler-kubr-yp-vla-230-BAL&source=serp","globalId":"01dab18d7825a180f72ed6189c3d21c6768dab6ac4859003-9217732-images-thumbs","docid":"Z63272089CE7C5DCE","crc":"10307741272359230887","label":"Görsel: Scripts Lua - NBKomputer","origWidth":1280,"origHeight":720,"lazy":false},{"src":"//avatars.mds.yandex.net/i?id=7642a3fd8f91be4600575e2d1aa6dbab299a1297-12569757-images-thumbs&n=13","width":480,"height":270,"url":"/gorsel/search?text=pragma+comment+lib&img_url=https%3A%2F%2Faskdev.ru%2Fimages%2Fcontent%2F4052940%2F2572d702e5bb737688ee1d9f45bc4d9f.png&pos=14&rpt=simage&stype=image&lr=21206&noreask=1&parent-reqid=1722055504725236-844321101348841598-balancer-l7leveler-kubr-yp-vla-230-BAL&source=serp","globalId":"7642a3fd8f91be4600575e2d1aa6dbab299a1297-12569757-images-thumbs","docid":"Z9E5066C99408F874","crc":"14512375490745469076","label":"Görsel: c - How to make an OpenGL rendering context with transparent","origWidth":1917,"origHeight":1077,"lazy":false},{"src":"//avatars.mds.yandex.net/i?id=edda761b22ae328f000420a384e8d18789c681e5-8498375-images-thumbs&n=13","width":480,"height":312,"url":"/gorsel/search?text=pragma+comment+lib&img_url=https%3A%2F%2Fimages2017.cnblogs.com%2Fblog%2F106620%2F201802%2F106620-20180205233753873-12004415.png&pos=15&rpt=simage&stype=image&lr=21206&noreask=1&parent-reqid=1722055504725236-844321101348841598-balancer-l7leveler-kubr-yp-vla-230-BAL&source=serp","globalId":"edda761b22ae328f000420a384e8d18789c681e5-8498375-images-thumbs","docid":"Z1A7BD325AB206B1F","crc":"7841255951267258462","label":"Görsel: tensorrtx/tutorials/run_on_windows.md at master -","origWidth":1066,"origHeight":693,"lazy":false},{"src":"//avatars.mds.yandex.net/i?id=4e2ad42c58a6bb3d4721e880750db7f7-4012669-images-thumbs&n=13","width":480,"height":226,"url":"/gorsel/search?text=pragma+comment+lib&img_url=https%3A%2F%2Fimages2018.cnblogs.com%2Fblog%2F1183125%2F201807%2F1183125-20180717170505244-1568954229.png&pos=16&rpt=simage&stype=image&lr=21206&noreask=1&parent-reqid=1722055504725236-844321101348841598-balancer-l7leveler-kubr-yp-vla-230-BAL&source=serp","globalId":"4e2ad42c58a6bb3d4721e880750db7f7-4012669-images-thumbs","docid":"Z0315C0983229BE6A","crc":"12910264229672357880","label":"Görsel: socket 编 程 python+c-CSDN 博 客","origWidth":899,"origHeight":424,"lazy":false},{"src":"//avatars.mds.yandex.net/i?id=5b0e220a7c38392e9104c8a9bb2c67807b319be5-8340026-images-thumbs&n=13","width":480,"height":270,"url":"/gorsel/search?text=pragma+comment+lib&img_url=https%3A%2F%2F2.bp.blogspot.com%2F-P6YM0JlSZTQ%2FXD1KGO8zQ0I%2FAAAAAAAAAQQ%2Fq7cITxitXjUtLZQv8HSBrEfvf7wadZ6UgCPcBGAYYCw%2Fs1600%2Fbandicam%252B2019-01-15%252B09-48-16-942.jpg&pos=17&rpt=simage&stype=image&lr=21206&noreask=1&parent-reqid=1722055504725236-844321101348841598-balancer-l7leveler-kubr-yp-vla-230-BAL&source=serp","globalId":"5b0e220a7c38392e9104c8a9bb2c67807b319be5-8340026-images-thumbs","docid":"Z7B3311343ED31049","crc":"10346762558680892764","label":"Görsel: Pengertian Compiler, Interpreter, Assambler & Linker","origWidth":1366,"origHeight":768,"lazy":false},{"src":"//avatars.mds.yandex.net/i?id=8c4259825343ca14414eea8f64cbcc0cfb226191b16e1cf1-5221522-images-thumbs&n=13","width":400,"height":320,"url":"/gorsel/search?text=pragma+comment+lib&img_url=https%3A%2F%2Fotvet.imgsmail.ru%2Fdownload%2F177705130_a5bbfd0e9f278b2bdf4f79373ea9ddd0.png&pos=18&rpt=simage&stype=image&lr=21206&noreask=1&parent-reqid=1722055504725236-844321101348841598-balancer-l7leveler-kubr-yp-vla-230-BAL&source=serp","globalId":"8c4259825343ca14414eea8f64cbcc0cfb226191b16e1cf1-5221522-images-thumbs","docid":"Z3A342675CC6918F3","crc":"17524504480653198011","label":"Görsel: ","origWidth":1280,"origHeight":1024,"lazy":false},{"src":"//avatars.mds.yandex.net/i?id=0999b89217ace0567181b8f1b2c94ad1f37c8cca-4937453-images-thumbs&n=13","width":480,"height":270,"url":"/gorsel/search?text=pragma+comment+lib&img_url=https%3A%2F%2Fi.sstatic.net%2F0h5x9.png&pos=19&rpt=simage&stype=image&lr=21206&noreask=1&parent-reqid=1722055504725236-844321101348841598-balancer-l7leveler-kubr-yp-vla-230-BAL&source=serp","globalId":"0999b89217ace0567181b8f1b2c94ad1f37c8cca-4937453-images-thumbs","docid":"Z3DCD97C7C65C0D80","crc":"4784440230064681799","label":"Görsel: c++ - visual studio 2012 adding new header file - Stack","origWidth":1365,"origHeight":767,"lazy":false}],"justifierConfig":{"marginH":4,"marginV":4,"minImageWidth":65,"rowHeights":[200,100],"allowStretch":40,"serverWidth":536,"lazy":true},"context":{"queryText":"pragma comment lib"},"ajaxContext":{"subtype":"intent_grid","viewType":{"view":"grid","h":"200-100"}},"title":"Görsel","isInRightColumn":false,"baobab":{"parentNode":{"context":{"genInfo":{"prefix":"2_10l6w02-0-1"},"ui":"desktop","service":"web","reqid":"1722055504725236-844321101348841598-balancer-l7leveler-kubr-yp-vla-230-BAL","fast":{"name":"images","subtype":"bigpic"}}}}},"type":"images","subtype":"intent_grid"},"2_10l61":{"state":{"answersUrl":"https://stackoverflow.com/questions/3484434/what-does-pragma-comment-mean#answers","type":"fact","tabsOptions":[{"id":"question","text":"Soru"},{"id":"bestAnswer","text":"En iyi yanıt"},{"id":"moreAnswers","text":"4 yanıt daha","shortText":"Daha fazla"}],"tabContents":{"question":{"construct":[{"type":"paragraph","content":[{"type":"text","content":"What does "},{"type":"code","content":[{"type":"text","content":"#pragma comment"}],"isInline":true},{"type":"text","content":" mean in the following?"}]},{"type":"code","content":[{"type":"text","content":[{"type":"text","color":"comment","content":"#pragma comment(lib, \"kernel32\")"}]},{"type":"text","content":[{"type":"text","color":"comment","content":"#pragma comment(lib, \"user32\")"}]}]}],"footerProps":{"date":1530107830,"numLiked":197,"numCommented":0}},"bestAnswer":{"construct":[{"type":"paragraph","content":[{"type":"code","content":[{"type":"text","content":"#pragma comment"}],"isInline":true},{"type":"text","content":" is a compiler directive which indicates Visual C++ to leave a comment in the generated object file. The comment can then be read by the linker when it processes object files."}]},{"type":"paragraph","content":[{"type":"code","content":[{"type":"text","content":"#pragma comment(lib, libname)"}],"isInline":true},{"type":"text","content":" tells the linker to add the 'libname' library to the list of library dependencies, as if you had added it in the project properties at "},{"type":"code","content":[{"type":"text","content":"Linker->Input->Additional dependencies"}],"isInline":true}]},{"type":"paragraph","content":[{"type":"text","content":"See "},{"type":"text","content":"#pragma comment"},{"type":"text","content":" on microsoft.com"}]}],"footerProps":{"date":1674153901,"numLiked":224,"numCommented":2}},"moreAnswers":[{"construct":[{"type":"paragraph","content":[{"type":"text","content":"I've always called them \"compiler directives.\" They direct the compiler to do things, branching, including libs like shown above, disabling specific errors etc., during the compilation phase."}]},{"type":"paragraph","content":[{"type":"text","content":"Compiler companies usually create their own extensions to facilitate their features. For example, (I believe) Microsoft started the \"#pragma once\" deal and it was only in MS products, now I'm not so sure."}]},{"type":"paragraph","content":[{"type":"text","content":"Pragma Directives"},{"type":"text","content":" It includes \"#pragma comment\" in the table you'll see."}]},{"type":"paragraph","content":[{"type":"text","content":"HTH"}]},{"type":"paragraph","content":[{"type":"text","content":"I suspect GCC, for example, has their own set of #pragma's."}]}],"footerProps":{"date":1531791602,"numLiked":7,"numCommented":5}},{"construct":[{"type":"paragraph","content":[{"type":"text","content":"The answers and the documentation provided by MSDN is the best, but I would like to add one typical case that I use a lot which requires the use of "},{"type":"code","content":[{"type":"text","content":"#pragma comment"}],"isInline":true},{"type":"text","content":" to send a command to the linker at link time for example "}]},{"type":"code","content":[{"type":"text","content":[{"type":"text","color":"comment","content":"#pragma comment(linker,\"/ENTRY:Entry\")"}]}]},{"type":"paragraph","content":[{"type":"text","content":"tell the linker to change the entry point form "},{"type":"code","content":[{"type":"text","content":"WinMain()"}],"isInline":true},{"type":"text","content":" to "},{"type":"code","content":[{"type":"text","content":"Entry()"}],"isInline":true},{"type":"text","content":" after that the "},{"type":"code","content":[{"type":"text","content":"CRTStartup"}],"isInline":true},{"type":"text","content":" going to transfer controll to "},{"type":"code","content":[{"type":"text","content":"Entry()"}],"isInline":true}]}],"footerProps":{"date":1567519911,"numLiked":4,"numCommented":0}}]},"organic":{"faviconProps":{"src":"https://favicon.yandex.net/favicon/v2/https://stackoverflow.com","size":"m","pageNumber":0,"index":0},"title":"What does \"#\u0007[pragma\u0007] \u0007[comment\u0007]\" mean?","pathProps":{"items":[{"url":"https://stackoverflow.com/questions/3484434/what-does-pragma-comment-mean","text":"stackoverflow.com"},{"url":"https://stackoverflow.com/questions/3484434/what-does-pragma-comment-mean","text":"what-does-pragma-comment-mean"}]},"faviconPosition":0,"subtitlePosition":1,"linkProps":{"url":"https://stackoverflow.com/questions/3484434/what-does-pragma-comment-mean"},"hostTitle":"stackoverflow.com","description":""},"extralinksProps":{"hidden":true,"directions":["bottom-end"],"items":[{"variant":"reportFeedback","reportFeedback":{"feature":"Блок ответов для разработчиков","title":"Bu yanıtta yanlış olan nedir?","checkBoxLabels":[{"value":"Yanıt sorguya uygun değil"},{"value":"Yanıt hatalı"},{"value":"Yanıttaki bilgiler eksik"},{"value":"Diğer"}]}}]},"baobab":{"parentNode":{"context":{"genInfo":{"prefix":"2_10l6w0c-0-1"},"ui":"desktop","service":"web","reqid":"1722055504725236-844321101348841598-balancer-l7leveler-kubr-yp-vla-230-BAL","fast":{"name":"article"}}}}},"type":"article"},"2_10l62":{"state":{"linksGroups":[{"type":"geo","links":[{"label":"Columbus","title":"Columbus","url":"//yandex.com.tr/tune/geo","logNode":{"name":"region"},"target":"_self","a11yLabel":"Bölgeniz Columbus","needRetpath":true}]},{"type":"feedback","links":[{"label":"Hata bildir","logNode":{"name":"feedback","attrs":{"behaviour":{"type":"dynamic"}}}}]},{"type":"settings","links":[{"label":"Ayarlar","url":"//yandex.com.tr/tune/search","logNode":{"name":"settings"},"target":"_self","needRetpath":true}]},{"type":"company","links":[{"label":"Hakkımızda","url":"https://company.yandex.com.tr","logNode":{"name":"about"},"target":"_blank"},{"label":"Ticari teklifler","url":"/search/direct?text=pragma%20comment%20lib&filters_docs=direct_cm","logNode":{"name":"commercial"},"target":"_blank"},{"label":"Kariyer","url":"//yandex.com.tr/jobs/?utm_source=serp_turkie&utm_medium=footerlink&utm_content=career","logNode":{"name":"vacancy"},"target":"_blank"},{"label":"Kullanım lisansı","url":"//yandex.com.tr/legal/termsofuse/","logNode":{"name":"license"},"target":"_blank"},{"label":"Gizlilik Politikası","url":"//yandex.com.tr/legal/confidential/","logNode":{"name":"confidential"},"target":"_blank"}],"a11yHidden":true}],"reportFeedbackProps":{"feature":"Подвал","title":"Hata bildir","checkBoxLabels":[]},"isSearchApp":false,"hasExtralinks":true,"limitingSelector":".AliceFabButton","baobab":{"parentNode":{"context":{"genInfo":{"prefix":"2_10l6w0d-0-1"},"ui":"desktop","service":"web","reqid":"1722055504725236-844321101348841598-balancer-l7leveler-kubr-yp-vla-230-BAL"}}}},"type":"serp-footer"},"2_10l63":{"state":{"conditionLoadList":{"marketCart":false,"highchartsHighstock":false,"advProductGallery":false,"musicPlayer":false,"ecomRates":false,"photoViewer":false,"easterEggModal":false,"darkmodeChangeDrawer":true},"reportFeedbackBaseProps":{"initEmail":"","metaFields":{"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","userTestids":"186144,66181,1047185,1062604,1000277,1053380,1067185,1064253,1066378,1010217,1069177,1048634,1059626,1070090,1066031,1064768,1031193,936724,1071373,1062941,132354,1066718,1066184,127805,1071631,1073685,1072824,1045121,1070926,1073300,1069925,1047413,1030846,1056357,132360,1060129,1070802,1046554,1037488,1070915,1063818,1069589,1071408,1005025,19996,1071337,124069,1065202,1064230,151171,1069580,13963,287509,1071024,338390,1067743,790823,1071106,1048648,1017495,1073311,1054351,1046873,1074181","yandexuid":"1122014671722055502","uid":"0","queryText":"pragma comment lib","reqid":"1722055504725236-844321101348841598-balancer-l7leveler-kubr-yp-vla-230-BAL","searchSlices":["drawer_search_slice_english","drawer_search_slice_cs"],"userRegionName":"Columbus","userRegionId":"20815"}},"extralinksPopupProps":{"abuseLink":"https://twitter.yandex.com.tr/search/abuse?sign=011c579c5778cdf0416ea4b9114a008a&keyno=0"},"isLoggedIn":false,"userMenuDialogProps":{"flag":"skin,feedback","host":"yandex.com.tr","lang":"tr","project":"serp","queryParams":{"utm_source":"search"},"retpath":"https%3A%2F%2Ftwitter.yandex.com.tr%2Fsearch%2F%3Fes_context%3D0oYl8Q____________ARpLMTcxOTY2ODQ2OTg3NTY0My0xMjI1ODgwNjI2NzMyNjAzODc0Ni1iYWxhbmNlci1sN2xldmVsZXIta3Vici15cC1zYXMtODEtQkFMMgVhc3NvY-26GJ4%26lr%3D21206%26noreask%3D1%26rq%3D1%26serp-reload-from%3Drec_bottom%26text%3Dpragma%2Bcomment%2Blib%26ncrnd%3D18780","tld":"com.tr"},"baobab":{"parentNode":{"context":{"genInfo":{"prefix":"2_10l6w0e-0-1"},"ui":"desktop","service":"web","reqid":"1722055504725236-844321101348841598-balancer-l7leveler-kubr-yp-vla-230-BAL","fast":{"name":"lazy-load"}}}}},"type":"lazy-load"}}