虽然我的静态库工作正常,但我注意到默认设置带有以下文件:
- 标准数据文件
- stdafx.cpp
- targetver.h
我不希望这个库很大。我希望尽可能地最小化。是否需要 stdafx.h/.cpp?
它们如何出现在我的项目中:
标准数据文件
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//
#pragma once
#include "targetver.h"
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
// TODO: reference additional headers your program requires here
#include "mathlib.h" // My main library
stdafx.cpp
// stdafx.cpp : source file that includes just the standard includes
// MathLib.pch will be the pre-compiled header
// stdafx.obj will contain the pre-compiled type information
#include "stdafx.h"
// TODO: reference any additional headers you need in STDAFX.H
// and not in this file
targetver.h
#pragma once
// Including SDKDDKVer.h defines the highest available Windows platform.
// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and
// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h.
#include <SDKDDKVer.h>