有如下文件:
mfc.cpp
my.cpp
mfc.h
my.h
请问怎样建立工作空间然后正确运行他们?

解决方案 »

  1.   

    发到信箱建完给你[email protected]
      

  2.   

    回复人: abrams(vcvc我爱你) (  
    :呵呵,你的名字也了得:)
      

  3.   

    回复人: ShutDOT(孔雀开屏是美丽的,但转过身就是屁眼了) ( ) :
    不行呀,我看了以下,用winrar压缩后还有2.17M,没法发呀
    能直接教教我怎么建工作空间吗?
    总不能以后一碰到此类问题就来找你帮忙吧
      

  4.   

    File->New->project(dialog)->win32 Appplication(别忘了name)->OK->finish.
    然后再这个workspace中加入你上面的文件就可以了。
      

  5.   


    回复人: liuxianhui(无知) :
    照你说的作了,出错提示如下:
    LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16
    ////
    知道原因吗??
      

  6.   

    把你的原码给我看一下,[email protected]
      

  7.   

    是不是缺少那个.lib文件?
    vc98/lib目录下有很多.lib文件,是不是mfc的类都是由它们+.dll文件封装的阿?
      

  8.   

    error LNK2001是最讨厌的错误之一,一般都是因为哪个.lib没加,或者.lib
    中没有这个函数申明,另外#include "stdafx.h"加了没有,_WinMain@16都没有????把你的Release Debug 删了,在压缩,发给我看看,
    E-mail:   [email protected]
      

  9.   

    先打开一个CPP文件,怎么build,建立工作空间之后就可以把其余的文件加进去了,再build就可以了
      

  10.   

    mfc.cpp
    my.cpp
    mfc.h
    my.h
    用winrar压缩后还有2.17M强强!!!!!!!!!!!!
      

  11.   

    小看MM了...
    楼主很强...
    vc,vb,pb,sql server...........
      

  12.   

    搞不懂为什么,无论怎么设置都会出现这种问题,而且是出现在main函数上???代码中没有main啊,即使没有WinMain函数也会出现一下错误
    LIBC.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
    我从新建立工作空间加入.CPP .H 以及资源文件,问题解决,
      

  13.   

    问题解决
    project->setings->link->project Option编辑筐中把/subsystem:console改为/subsystem:windows
      

  14.   

    一滴水大哥果然厉害,
    不过你的思维有点逻辑错误,
    应该是把windows改成console吧:)不过我很想知道把这里的/subsystem:windows改成/subsystem:console的原因?望赐教
      

  15.   

    非常感谢 E17(守护星),呵呵,如果不会就请帮忙up:)
      

  16.   

    节选自MSDN/SUBSYSTEM:{CONSOLE|EFI_APPLICATION|EFI_BOOT_SERVICE_DRIVER|
                EFI_ROM|EFI_RUNTIME_DRIVER|NATIVE|POSIX|WINDOWS|WINDOWSCE}
                [,major[.minor]]
    where: CONSOLE 
    Win32 character-mode application. Console applications are given a console by the operating system. If main or wmain is defined, CONSOLE is the default. Extensible Firmware Interface 
    The EFI_* subsystems. See the EFI specification for more information. For example, see the Intel web site. The minimum version and default version is 1.0. NATIVE 
    Device drivers for Windows NT. If /DRIVER:WDM is specified, NATIVE is the default. POSIX 
    Application that runs with the POSIX subsystem in Windows NT. WINDOWS 
    Application does not require a console, probably because it creates its own windows for interaction with the user. If WinMain or wWinMain is defined, WINDOWS is the default. WINDOWSCE 
    Application that runs on a Windows CE device. 
    major and minor (optional) 
    Specify the minimum required version of the subsystem. The arguments are decimal numbers in the range 0 through 65,535. See the Res for details. There are no upper bounds for version numbers. 
    Res
    The /SUBSYTEM option tells the operating system how to run the .exe file. The choice of subsystem affects the default starting address for the program. For more information, see the Entry-Point Symbol (/ENTRY:function) option.The optional minimum and default major and minor version numbers for the subsystems are as follows.
      

  17.   

    /SUBSYSTEM:大概(我的E文很差)是要指定编译的程序要在哪个操作系统或子系统上运行,NT架构的操作系统含有许多子系统来让例如 POSIX 上的程序也运行在NT上,windows上的程序应该设为windows,windows下调用控制台的程序才用console我刚又试了你给我的程序应该设为windows另外,不要叫我大哥,听上去很烦(我肯定比你小啊,我有那么老吗???)
      

  18.   

    如果使用win32 application建立起来的工程,则请在project|settings...中设置选上使用mfc动态链接库或直接使用静态编译(如果在你程序中包含了文件名以afx开头的头文件)
      

  19.   

    AthlonxpX86(一滴水) :
    谢谢,结帖了~