1. DLLã®ä½ãæ¹ï¼VC++ç·¨ï¼ é¢æ°subãDLLã«ãããå ´åï¼æ¬¡ã®ããã«ã½ã¼ã¹ããã°ã©ã ãä½æããï¼ å¤é¨ããã°ã©ã ããå¼ã³åºãããé¢æ°ï¼ãã®å ´åsubï¼ã®åã« __declspec(dllexport)ã¨ãã ãã¾ããªããã¤ãã¦ããï¼ãã®ãã¾ããªããã¤ãã¦ããªãé¢æ°ã¯DLLå¤é¨ããã¯è¦ããªãã®ã§å®å¿ï¼ï¼ #include <stdio.h> __declspec(dllexport) int sub(int arg) { printf("sub %d\n", arg); return arg + 1; } sub.c é常ã®éçã«ãªã³ã¯ãã¦å©ç¨ããé¢æ°ãä½ãå ´åï¼*.objã¾ãã¯éçãªã³ã¯ ã©ã¤ãã©ãª*.libãä½ã£ã¦ãªã³ã¯ããå ´åï¼ã¨ã®éãã¯ï¼ DLLã®å¤ã«å ¬éãããé¢æ°ã®å®ç¾©ã®åã«__declspec(dllexport)ã¨ãããã¼ã¯ã¼ããã¤ãããã¨ã ãã«ãªã£ã¦ããï¼ ï¼»ããã«
{{#tags}}- {{label}}
{{/tags}}