Try   HackMD

VC6 >vs2015 升級問題

error LNK2019: unresolved external symbol __imp____iob_func

  1. 新增下列代碼置標頭檔
//fix unresolved external symbol __imp__iob (C++)
#pragma comment(lib, "legacy_stdio_definitions.lib")
#ifdef __cplusplus
FILE iob[] = { *stdin, *stdout, *stderr };
extern "C" {
	FILE * __cdecl _iob(void) { return iob; }
}
#endif
  1. 不能的話用這個
//fix error LNK2001: unresolved external symbol ___iob_func
#define stdin  (__acrt_iob_func(0))
#define stdout (__acrt_iob_func(1))
#define stderr (__acrt_iob_func(2))

FILE _iob[] = { *stdin, *stdout, *stderr };
extern "C" FILE * __cdecl __iob_func(void) { return _iob; }
  1. c
FILE* __cdecl __iob_func(unsigned i) {
    return __acrt_iob_func(i);
}

error LNK2019: unresolved external symbol __imp__fprintf

  1. 新增legacy_stdio_definitions.lib置link->input
    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

error C1189: #error : MFC does not support WINVER less than 0x0501. Please change the definition of WINVER in your project properties or precompiled header.

  1. 修改stdafx

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

error LNK2026: module unsafe for SAFESEH image

  1. Linker -> advanced -> safeseh(NO)

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

ocx元件 error MSB3073: :VCEnd" exited with code 3

  1. 確認Project->Configuration Properties->General->Target Extension
  2. 確認Project->Configuration Properties->Linkerl->General ->Output File
  3. 用release 模式建置可能會過

error MSB3073: :VCEnd" exited with code 5

  1. 用管理員權限

D8016 '/ZI' and '/Gy-' command-line options are incompatible

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

X509Name 問題

  1. openssl 跟 wincrypt 打架
  2. 順序問題,先#include windows.h 再 include openssl
#include <windows.h>

...

#include <openssl/X509.h>

unresolved symbols _IID_IShellItem

  1. 去專案屬性-> vc++ -> 程式庫,複製某個版本的程式庫位置

  2. 去那個程式庫位置看有沒有uuid.lib

  3. 鏈結器加入這個lib


C:\Program Files (x86)\Windows Kits\8.1\Lib\winv6.3\um\x86\Uuid.Lib;


file not found "xxxx.tlb"

路徑跑掉