VS 2015 외부 기호 해석 불가imp__fprintf
1266 단어 [프로젝트 기록]
#define stdin (__acrt_iob_func(0))
#define stdout (__acrt_iob_func(1))
#define stderr (__acrt_iob_func(2))
#define stdin (&__iob_func()[0])
#define stdout (&__iob_func()[1])
#define stderr (&__iob_func()[2])
So now __iob_func is not defined anymore which leads to a link error when using a .lib file compiled with previous versions of visual studio. To solve the issue, you can try defining __iob_func() yourself which should return an array containing {*stdin,*stdout,*stderr}. Regarding the other link errors about stdio functions (in my case it was sprintf()), you can add legacy_stdio_definitions. lib to your linker options.
해결 방법 은 {* stdin, * stdout, * stderr} 배열 자체 정의iob_func()
extern "C" { FILE __iob_func[3] = { *stdin,*stdout,*stderr }; }
그리고imp__fprintf 의 해결 방법 은 링크 기 입력 lib 에 legacy 를 추가 하 는 것 입 니 다.stdio_definitions. lib 이거 LIB.