标签:des style blog http color io os 使用 ar
/* * We need to set a default MSVCRT_VERSION which describes the MSVCRT.DLL on * the users system. We are defaulting to XP but we recommend the user define * this in his config.h or Makefile file based on the minimum supported version * of OS for his program. * ME = 600 * XP = 710 * VISTA = 800 * WIN7 = 900 * WIN8 = 1010 */ #ifndef MSVCRT_VERSION #if _WIN32_WINNT >= _WIN32_WINNT_WIN8 #define MSVCRT_VERSION 1010 #elif _WIN32_WINNT >= _WIN32_WINNT_WIN7 #define MSVCRT_VERSION 900 #elif _WIN32_WINNT >= _WIN32_WINNT_VISTA #define MSVCRT_VERSION 800 #elif _WIN32_WINNT >= _WIN32_WINNT_WINXP #define MSVCRT_VERSION 710 #elif _WIN32_WINNT >= _WIN32_WINNT_WIN2K #define MSVCRT_VERSION 700 #elif _WIN32_WINNT >= _WIN32_WINNT_WINME #define MSVCRT_VERSION 600 #else #define MSVCRT_VERSION 700 #endif /* _WIN32_WINNT >= _WIN32_WINNT_WINME */ #endif /* ndef MSVCRT_VERSION */
gcc -dumpspecs > <mingw-root>/lib/gcc/mingw32/<gcc-version>/specs
*cpp:-DMSVCRT_VERSION=0x0710 %{posix:-D_POSIX_SOURCE} %{mthreads:-D_MT} %{pthread:-D_REENTRANT} %{!no-pthread: }*libgcc:%{mthreads:-lmingwthrd} -lmingw32 %{shared-libgcc:-lgcc_s} %{!shared-libgcc:-lgcc_eh} -lgcc -lmoldname71 -lmingwex -lmsvcr71
ALL_CFLAGS=$(CFLAGS) $(INCLUDES) -DNTDDI_VERSION=0x05010000 -DMSVCRT_VERSION=800
MinGW win32api 4.0.3-1 的头文件中关于 findfirst findnext 的定义不正确,需要修改替换 wchar.h 和 io.h,点此下载
./configuremake
*libgcc:%{mthreads:-lmingwthrd} -lmingw32 %{shared-libgcc:-lgcc_s} %{!shared-libgcc:-lgcc_eh} -lgcc -lmoldname80 -lmingwex80 -lmsvcr80
<?xml version=‘1.0‘ encoding=‘UTF-8‘ standalone=‘yes‘?><assembly xmlns=‘urn:schemas-microsoft-com:asm.v1‘ manifestVersion=‘1.0‘><trustInfo xmlns="urn:schemas-microsoft-com:asm.v3"><security><requestedPrivileges><requestedExecutionLevel level=‘asInvoker‘ uiAccess=‘false‘ /></requestedPrivileges></security></trustInfo><dependency><dependentAssembly><assemblyIdentity type=‘win32‘ name=‘Microsoft.VC90.CRT‘ version=‘9.0.21022.8‘ processorArchitecture=‘x86‘ publicKeyToken=‘1fc8b3b9a1e18e3b‘ /></dependentAssembly></dependency></assembly>
$ gcc a.c -nostdlib -lmsvcr80 -lgccd:/msys/mingw/bin/../lib/gcc/mingw32/4.8.1/libgcc.a(__main.o):(.text+0x5a): undefined reference to `atexit‘collect2.exe: error: ld returned 1 exit status
标签:des style blog http color io os 使用 ar
原文地址:http://www.cnblogs.com/JesseFang/p/3991832.html