• vs2005 vc++ 程序发布


     

    10 vs2005 vc++ 程序发布

    先 1 生成-》配置管理-》release

    再 2 项目-》属性 -》C/C++-》代码生成-》运行时库-》

       选 第一个: 多线程 MT

    9

    error C3872: '0x3000': this character is not allowed in an identifie

    //我的错误是输入了一个中文的 空格 符号,把它删除 替换就好了

    //是在程序错误 指出地方的 下一行呵~~

    8

    error C2001: newline in constant……

    ……看了谢解释,大概是因为 unicode 的问题,把待输出的 连续的 两个 空格 删掉后就没问题了 ^_^

    1 找不到 .dll文件

        重新安装了VC后的问题,比如打开文件会弹出 :“找不到 shsql.dll",”“找不到 EESWT.DLL", 那就去搜索它,(如果本机上没有 就baidu 它,下载下来),放到安装VC 的那个文件夹的子文件夹:(安装VC 的那个文件夹)/MSDev98/Bin。 (在那里你也可以看见其他一些 DLL文件。

    2 . 提示 没有定义: Enable3dControls();    (vc.net2005中)

    我还不知道具体的原理,现在我是直接 按 F4,找到以下代码:然后把它注释掉了

    #ifdef _AFXDLL


       Enable3dControls();    // Call this when using MFC in a shared DLL


    #else

    Enable3dControlsStatic(); // Call this when linking to MFC statically


    #endif

    3.    ×× .pch' is not a precompiled header file created with……

    如果Rebuild All 不能解决的话,就:

    使用右键点击项目工程中的该cpp文件,选择setting,在c/c++栏,”分类“下面 选择PreCompiled headers,然后设置第一选项“N 不使用不使用预编译头",解决这个问题

    4 DEBUG:

        …… vc98/include/winnt.h(1092) : error C2146: syntax error : missing ';' before identifier 'KSPIN_LOCK'

    ?我安装的版本里面的 winnt.h 是1985版247K, 这个邮箱(vc2005_winnt@126.com 密码是123456”,baidu网友提供)里面的是 313K…… 换了文件又“fatal error C1083: Cannot open include file: 'specstrings.h': No such file or directory ”

    把 注释了#include “specstrings.h”又…………晕呵~最后是重新安装程序了……

    5 .fatal error C1010: unexpected end of file while looking for precompiled header directive

    问题详细解释:
    致命错误C1010,在寻找预编译指示头文件时,文件未预期结束。就是没有找到预编译指示信息的头文件。

    问题一般发生在:
    通过添加文件的方式,添加了一些cpp文件到一个MFC的程序,但该cpp文件并不是MFC,是标准C++的。

    解决方案1:
    右键点击项目工程中的该cpp文件,在菜单Project 》Settings里C++页面的Precomplie Header,设置为第一项:Not using precompiled headers。

    解决方案2:
    在.cpp文件开头添加包含文件stdafx.h。

    #include "stdafx.h"

    作者:sdnupeak@sina.com

    原创版权,村友录,转载请注明。

    我同时安装了 VC 6.0 和 Visual Studio 2005,用后者打开编译同一个文件其实又没有问题了……哎~

       还碰到了其他的一些问题,如果谁知道具体的原因的话请指点哦!

       欢迎大家交流哈……

    找不到MFC80UD.dll :……

     

     

    2007111301.jpg

    这个问题可能是Manifest 引起的,可以通过修改项目->属性->清单工具->输入输出,把嵌入清单,然后编译、链接、运行即可。

     

     

    6.提示 'string' : undeclared identifier

    添加:#include <string>

    并在文件开头处加上:using namespace std;
           或者每次定义的时候都用:std::string strName; 的形式

     

     

    7 warning C4312 : conversion from 'LONG' to 'WNDPROC' of greater size

    据说,这是因为32位/64位的问题,编译器是警告你代码到64位环境下可能会出问题。

    类型转换不要用(LONG_PTR),LongToPtr(),也不要直接用(WNPROC),而是用(WNDPROC)LongToPtr()。

    warning C4311: 'type cast' : pointer truncation from 'LRESULT (__stdcall *)(HWND,UINT,WPARAM,LPARAM)' to 'LONG'

    待解决……

    附:[转自微软官方网]Windows 64 位版本的 C/C++ 编程

    http://www.programfan.com/blog/article.asp?id=6396

    将程序移植到64位Windows(2)

  • 相关阅读:
    【IDEA】颜色主题 Color Theme
    【IDEA】IntelliJ IDEA 2020.1破解版
    【HTML】基础
    SQLyog
    【GitHub】本地代码上传
    【NetWork】外网和内网
    C#根据PDF模板生成内容
    layui数据表格显示与导出问题
    LayUIDataResult
    LayUIParameter
  • 原文地址:https://www.cnblogs.com/kevinzhwl/p/3878945.html
Copyright © 2020-2023  润新知