所用BCG版本: bcg 10[Project -> 
Settings -> 
C/C++ -> 
Category: Code Generation -
Struct member alignment: 1 Byte
]
当把工程的 字节对齐设置为1时, 程序出错, 
开发所用平台那个字节对齐必须设置为1,
 
大家知道怎么解决的说说看...

解决方案 »

  1.   

    改变对齐格式,可能会影响到bcg的一些数据结构,以及对结构的处理等,如:通过指针偏移等操作相关数据
    这种情况,只能自己调试一下,看具体出错的位置
      

  2.   

    没听说过哪个能用bcg的平台必须按1对齐
      

  3.   

    估计你的工程是按BYTE对齐的,但是BCG DLL库不是,所以出现了不兼容性的问题。建议:
    将BCG按字节对齐重新编译
      

  4.   


    我按一字节重新编译..出现了很多警告, 不知道要不要紧
    C:\Program Files\BCGSoft\BCGControlBarPro\BCGCBPro\StdAfx.cpp(5) : warning C4653: compiler option 'structure packing (/Zp)' inconsistent with precompiled header; current command-line option ignored
    Compiling...
    BCGCBPro.cpp
    C:\Program Files\BCGSoft\BCGControlBarPro\BCGCBPro\BCGCBPro.cpp(16) : warning C4653: compiler option 'structure packing (/Zp)' inconsistent with precompiled header; current command-line option ignored
    Bcgglobals.cpp
    C:\Program Files\BCGSoft\BCGControlBarPro\BCGCBPro\Bcgglobals.cpp(13) : warning C4653: compiler option 'structure packing (/Zp)' inconsistent with precompiled header; current command-line option ignored
    BCGPAnimCtrl.cpp
    .......
      

  5.   


    这个不是bcg平台.
    是我们公司的平台字节对齐必须为1, 但又要用bcg, 所以这个字节对齐就冲突了...
      

  6.   

    用#pragma预编译命令只把用 bcg 的地方圆整因子设置成4或8(看它需要多大)
      

  7.   


    那可能是你的BCG先前的预编译头跟现在的声明不一样,请Rebuild All即可