error LNK2005问题,小弟实在无能为力!!!0

代码部分:

// function.h: interface for the function class.

//接口函数类//

#ifndef AFX_FUNCTION_H__6E194843_FEB3_491F_8062_765AA3465CBC__INCLUDED_

#define AFX_FUNCTION_H__6E194843_FEB3_491F_8062_765AA3465CBC__INCLUDED_

#if _MSC_VER > 1000

#pragma once

#endif // _MSC_VER > 1000

#include "Dib.h"#include

// 常数π#define pi 3.1415926535

#define WIDTHBYTES(bits) (((bits) + 31) / 32 * 4)

#include

#include

using namespace std;

#define PI 3.14159265358979323846

typedef struct

{ int Value;

int Dist;

int AngleNumber;

} MaxValue;

struct CplexNum

{ double re;

double im;

};

/

//用于复数运算

CplexNum Add(CplexNum c1,CplexNum c2)

{ CplexNum c;

c.re=c1.re+c2.re;

c.im=c1.im+c2.im;

return c;

}

CplexNum Sub(CplexNum c1,CplexNum c2)

{ CplexNum c;

c.re=c1.re-c2.re;

c.im=c1.im-c2.im;

return c;

}

CplexNum Mul(CplexNum c1,CplexNum c2)

{ CplexNum c;

c.re=c1.re*c2.re-c1.im*c2.im;

c.im=c1.re*c2.im+c2.re*c1.im;

return c;

}

编译环境报错:

StdAfx.obj : error LNK2005: "struct CplexNum __cdecl Add(struct CplexNum,struct CplexNum)" (?Add@@YA?AUCplexNum@@U1@0@Z) already defined in MyTsetView.obj

StdAfx.obj : error LNK2005: "struct CplexNum __cdecl Sub(struct CplexNum,struct CplexNum)" (?Sub@@YA?AUCplexNum@@U1@0@Z) already defined in MyTsetView.obj

StdAfx.obj : error LNK2005: "struct CplexNum __cdecl Mul(struct CplexNum,struct CplexNum)" (?Mul@@YA?AUCplexNum@@U1@0@Z) already defined in MyTsetView.obj

StdAfx.obj : error LNK2005: "void __cdecl FastFourierTran(struct CplexNum *,struct CplexNum *,int)" (?FastFourierTran@@YAXPAUCplexNum@@0H@Z) already defined in MyTsetView.obj

StdAfx.obj : error LNK2005: "void __cdecl Fourier(struct CplexNum *,int,int,struct CplexNum *)" (?Fourier@@YAXPAUCplexNum@@HH0@Z) already defined in MyTsetView.obj

Debug/MyTset.exe : fatal error LNK1169: one or more multiply defined symbols found执行 link.exe 时出错.

Creating browse info file...

c语言error lnk 2005,error LNK2005问题,小弟实在无能为力!!!相关推荐

  1. c语言中error c2601,C 语言   dd.cpp(46) : error C2601: 'main' : local function definitions are illegal...

    C 语言   dd.cpp(46) : error C2601: 'main' : local function definitions are illegal0 #include #include ...

  2. C语言:为什么用fprintf(stderr,Error);比printf(Error);更好?

    C语言:为什么用fprintf(stderr,"Error");比printf("Error");更好?_百度知道 C语言:为什么用fprintf(stderr ...

  3. call stack是什么错误_Go语言(golang)的错误(error)处理的推荐方案

    原文链接:https://www.flysnow.org/2019/01/01/golang-error-handle-suggestion.html 微信公众号:flysnow_org(飞雪无情) ...

  4. Bug(九) —— error LNK 2019 无法解析的外部符号 __imp__timeGetTime@0

    错误显示: error LNK 2019 无法解析的外部符号 __imp__timeGetTime@0,该符号在函数 "public: virtual void __thiscall Vie ...

  5. panic函数c语言,【go语言学习】错误error和异常panic

    一.错误和异常的区别 错误指的是可能出现问题的地方出现了问题.比如打开一个文件时失败,这种情况在人们的意料之中 . 异常指的是不应该出现问题的地方出现了问题.比如引用了空指针,这种情况在人们的意料之外 ...

  6. C语言报错:error: static declaration of xxx follows non-static declaration

    C语言报错:error: static declaration of xxx follows non-static declaration 报错原因 调用了静态函数,但没有声明 解决方案 在使用函数之 ...

  7. C语言预处理#line、#error

    #line 的作用是改变当前行数和文件名称,它们是在编译程序中预先定义的标识符命令的基本形式如下: #line number["filename"] 其中[]内的文件名可以省略.例 ...

  8. C语言编程之错误一:error C2059:syntax error : ‘)’

    error C2059:syntax error : ')' syntax意思是语法,所以就是语法错误. 这类问题一般都是语法问题,不改写括号写括号啦,变量名写错啦什么的,不知道就看' '内的内容,基 ...

  9. C和C++混合编程(error C2059: syntax error : 'string')

    extern "C"表示编译生成的内部符号名使用C约定.C++支持函数重载,而C不支持,两者的编译规则也不一样.函数被C++编译后在符号库中的名字与C语言的不同.例如,假设某个函数 ...

  10. js调用c++实现的dll, Error: Dynamic Linking Error: Win32 error 126 问题原因

    在这里可以解决Win32 error 126 报错的所有问题: 总结:     1.dll加载路径有问题,找不到dll     2.dll路径没有问题,使用了多个相互依赖的dll,dll版本不一致,重 ...

最新文章

  1. LINUX内核分析第二周学习总结——操作系统是如何工作的
  2. 【软考】2017年11月软件设计师上午真题5-8题答案解析
  3. keras从入门到放弃(六)多层感知器(神经网络)
  4. C# 获取随机可用端口号
  5. android透明activity,Android 简单实现透明Activity
  6. VxWorks嵌入式操作系统的TrueFFS文件系统驱动开发
  7. 小米回应有品特殊激励需放弃年终奖……外媒说,荷兰运营商KPN允许华为有限参与5G网络建设;传苹果挖角英特尔5G工程师...
  8. 台式计算机有什么配置,目前台式电脑的主流配置有哪些?
  9. scrollTop的兼容性小结
  10. TyepScript入门教程 之 async await
  11. 暴风影音官网、App 挂了;工信部总结“携号转网”试运行情况;Zorin OS 15 Lite 发布 | 极客头条...
  12. [WARNING] Unable to autodetect 'javac' path, using 'javac' from the environment.
  13. jQuery 效果函数
  14. vmpalyer虚拟机的使用教程,小白也能看懂
  15. 没有超级英雄?自己做一个java漫威英雄手办商城系统
  16. 【云和恩墨大讲堂】杨俊 | 迁移神技XTTS-恩墨小王子再战32TB跨平台U2L
  17. springboot导入excel表格
  18. 硬盘知识大全(含主板、BIOS)
  19. 影响平面设计师的必然因素——节奏感
  20. MySQL学习笔记——第2章 SQL的基本概念和MySQL简介

热门文章

  1. 微信小程序云开发——打卡小程序
  2. lambda函数 python菜鸟教程-Python - lambda函数
  3. 电商后台管理系统——权限管理模块
  4. 每个人都应该了解的金融小知识 -- 利率计算
  5. Centos系统安装masscan
  6. CATIA怎么约束快捷键_CATIA设置和查看快捷键的方法及系统默认常用快捷键汇总 | 坐倚北风...
  7. Python网络爬虫与信息提取(10)—— 代码搜索全网音乐爬取并下载
  8. 推送环境搭建基于开源MPush
  9. 【重识云原生】第三章云存储第一节——分布式云存储总述
  10. 《Objective-C基础教程》学习笔记第九-十章