VC++ MFCProject的statically linked library问题

来源:百度知道 编辑:UC知道 时间:2024/06/17 13:49:55
我做了一个MFC工程,现在忘了当初选的是As a shared DLL还是As a statically linked library了,我怎么查看啊?
若果当初我选择的是As a shared DLL,而现在想改成As a statically linked library,怎么改????
我自己试了一下,可能是Project->Setting中的General那一项

请详细介绍下Project->Setting的各选项功能
我的英语不行

. This option also causes the compiler to place the library into the .OBJ file.
Applications compiled with this option are statically linked to MSVCRT.LIB. This library provides a layer of code that allows the linker to resolve external references. The actual working code is contained in MSVCRT.DLL, which must be available at run time to applications linked with MSVCRT.LIB.

/ML Single-Threaded Causes the compiler to place the library name LIBC.LIB into the .OBJ file so that the linker will use LIBC.LIB to resolve external symbols. This is the compiler’s default action. LIBC.LIB does not provide multithread support.

点击 Project Settings(工程 ->设置)选项
在General(常规)选项卡 会看到
Microsoft Foundation Classes(Microsoft基础类)下拉组建

Use MFC in a shared DLL(使用MFC做为共享的DLL)
Use MFC in a static library (使用MFC做为静态链接库)
选择第二项即可

注意,不同的版本是单独配置的..Release和Debug版本需要分别配置.
只需要在对话框上面的Setting for那个下拉里选择相应的版本即可.

关于setting
你看下这个吧