fatal error C1900: “P1”(第“20080116”版)和“P2”(第“20070207”版)之间 Il 不匹配

dawei2310 2009-11-02 11:36:48
1>------ 已启动全部重新生成: 项目: NspeexWrapperEx, 配置: Debug Win32 ------
1>正在删除项目“NspeexWrapperEx”(配置“Debug|Win32”)的中间文件和输出文件
1>正在编译...
1>Stdafx.cpp
1>正在编译...
1>AssemblyInfo.cpp
1>NspeexWrapperEx.cpp
1>正在生成代码...
1>正在编译资源...
1>Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0
1>Copyright (C) Microsoft Corporation. All rights reserved.
1>正在链接...
1>fatal error C1900: “P1”(第“20080116”版)和“P2”(第“20070207”版)之间 Il 不匹配
1>LINK : fatal error LNK1257: 代码生成失败
1>生成日志保存在“file://c:\Documents and Settings\Administrator\桌面\nspeex\nspeex-33307\NspeexWrapperEx\Debug\BuildLog.htm”
1>NspeexWrapperEx - 1 个错误,0 个警告
========== 全部重新生成: 成功 0 个,失败 1 个,跳过 0 个 ==========

编译出错。
再下面的文件里


// NsWEx.h

#pragma once
#include "..//include//speex//speex.h"
#pragma comment(lib, "..//lib//speex//libspeex.lib")

#include <vector>
#include <iostream>
using namespace std;

using namespace System;
using namespace System::Runtime::InteropServices;

namespace NsWEx {

public enum EncodingMode
{
NarrowBand = 0,
WideBand = 1,
UltraWideBand = 2
};

const SpeexMode* ConvertToSpeexMode(EncodingMode mode)
{
const SpeexMode *speexMode = (SpeexMode*)0;

switch (mode)
{
case NarrowBand:
speexMode = (SpeexMode*)0;
break;
case WideBand:
speexMode = (SpeexMode*)1;
break;
case UltraWideBand:
speexMode = (SpeexMode*)2;
break;
default:
speexMode = (SpeexMode*)0;
}


return speexMode;
}


public ref class NSpeexControl
{

public:
NSpeexControl(bool isEncoder, EncodingMode mode)
{
this->isEncoder = isEncoder;

if (isEncoder)
{

speex_encoder_init(0);
//ConvertToSpeexMode(mode);

}
else
;//enc_state = speex_decoder_init(ConvertToSpeexMode(mode));

}
~NSpeexControl()
{}

protected:
void* enc_state;

private:
bool isEncoder;
};
}



如果把
speex_encoder_init(0); 注释掉
则没有错误。
但是必须用到这个东西。
怎么解决
SOS
...全文
3778 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
tianyazifan 2010-01-14
  • 打赏
  • 举报
回复
清一下项目,重新编译。只是因为中间库和现有版本不匹配而已。
ttbird 2009-12-29
  • 打赏
  • 举报
回复
怎么解决呢?
panzuanxin 2009-12-10
  • 打赏
  • 举报
回复
怎么重新安装当前版本?
阁楼上的伟哥 2009-11-12
  • 打赏
  • 举报
回复
在线更新一下当前版本。
然后在重新生成
阁楼上的伟哥 2009-11-02
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 tttyd 的回复:]
你的speex_encoder_init函数在那里定义的,将其头文件#include进来
[/Quote]
#include "..//include//speex//speex.h"
这不是引用上了吗。
就是调函数的问题。
hhwei1985 2009-11-02
  • 打赏
  • 举报
回复
up
雪影 2009-11-02
  • 打赏
  • 举报
回复
你的speex_encoder_init函数在那里定义的,将其头文件#include进来
阁楼上的伟哥 2009-11-02
  • 打赏
  • 举报
回复
[Quote=引用 4 楼 tttyd 的回复:]
1>fatal error C1900: “P1”(第“20080116”版)和“P2”(第“20070207”版)之间 Il 不匹配
1>LINK : fatal error LNK1257: 代码生成失败


错误消息
“tool1”版本“number1”和“tool2”版本“number2”之间的 Il 不匹配
在各遍编译器扫描中运行的工具不匹配。number1 和 number2 引用文件上的日期。例如,在第 1 遍扫描中,编译器前端运行 (c1.dll),在第 2 遍扫描中,编译器后端运行 (c2.dll)。文件上的日期必须匹配,如果它们不匹配,请重新安装和使用每个工具的当前版本。
[/Quote]
怎么重新安装当前版本?
雪影 2009-11-02
  • 打赏
  • 举报
回复
1>fatal error C1900: “P1”(第“20080116”版)和“P2”(第“20070207”版)之间 Il 不匹配
1>LINK : fatal error LNK1257: 代码生成失败


错误消息
“tool1”版本“number1”和“tool2”版本“number2”之间的 Il 不匹配
在各遍编译器扫描中运行的工具不匹配。number1 和 number2 引用文件上的日期。例如,在第 1 遍扫描中,编译器前端运行 (c1.dll),在第 2 遍扫描中,编译器后端运行 (c2.dll)。文件上的日期必须匹配,如果它们不匹配,请重新安装和使用每个工具的当前版本。

3,248

社区成员

发帖
与我相关
我的任务
社区描述
ATL,Active Template Library活动(动态)模板库,是一种微软程序库,支持利用C++语言编写ASP代码以及其它ActiveX程序。
社区管理员
  • ATL/ActiveX/COM社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧