473,396 Members | 2,024 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Mass of 'already defined' errors on compilation.

During the linking I get the following:

1>Linking...
1>main.obj : error LNK2005: "double __cdecl sigma(class curious2007::pair<double,double> const &)" (?sigma@@YANABV?$pair@NN@curious2007@@@Z) already defined in Characteristics.obj
1>main.obj : error LNK2005: "double __cdecl sigma_linear(struct std::pair<double,double> const &)" (?sigma_linear@@YANABU?$pair@NN@std@@@Z) already defined in Characteristics.obj
1>main.obj : error LNK2005: "double __cdecl mu(class curious2007::pair<double,double> const &)" (?mu@@YANABV?$pair@NN@curious2007@@@Z) already defined in Characteristics.obj
1>main.obj : error LNK2005: "double __cdecl forcing(class curious2007::pair<double,double> const &)" (?forcing@@YANABV?$pair@NN@curious2007@@@Z) already defined in Characteristics.obj
1>main.obj : error LNK2005: "double __cdecl b(class curious2007::pair<double,double> const &)" (?b@@YANABV?$pair@NN@curious2007@@@Z) already defined in Characteristics.obj
1>main.obj : error LNK2005: "double __cdecl IC(double const &)" (?IC@@YANABN@Z) already defined in Characteristics.obj
1>main.obj : error LNK2005: "double __cdecl IC_put(double const &)" (?IC_put@@YANABN@Z) already defined in Characteristics.obj
1>main.obj : error LNK2005: "double __cdecl IC_PO(double const &)" (?IC_PO@@YANABN@Z) already defined in Characteristics.obj
1>main.obj : error LNK2005: "double __cdecl IC_ASCPO(double const &)" (?IC_ASCPO@@YANABN@Z) already defined in Characteristics.obj
1>main.obj : error LNK2005: "double __cdecl IC_SCPO(double const &)" (?IC_SCPO@@YANABN@Z) already defined in Characteristics.obj
1>main.obj : error LNK2005: "double __cdecl BCR(double const &)" (?BCR@@YANABN@Z) already defined in Characteristics.obj
1>main.obj : error LNK2005: "double __cdecl BCR_PO(double const &)" (?BCR_PO@@YANABN@Z) already defined in Characteristics.obj
1>main.obj : error LNK2005: "double __cdecl BCL(double const &)" (?BCL@@YANABN@Z) already defined in Characteristics.obj
1>main.obj : error LNK2005: "double __cdecl BCL_put(double const &)" (?BCL_put@@YANABN@Z) already defined in Characteristics.obj
1>main.obj : error LNK2005: "double __cdecl BCR_Topper_p11(double const &)" (?BCR_Topper_p11@@YANABN@Z) already defined in Characteristics.obj
1>main.obj : error LNK2005: "double __cdecl BCR_Topper_p10(double const &)" (?BCR_Topper_p10@@YANABN@Z) already defined in Characteristics.obj
1>main.obj : error LNK2019: unresolved external symbol "wchar_t * __stdcall _com_util::ConvertStringToBSTR(char const *)" (?ConvertStringToBSTR@_com_util@@YGPA_WPBD@Z) referenced in function "public: __thiscall _bstr_t::Data_t::Data_t(char const *)" (??0Data_t@_bstr_t@@QAE@PBD@Z)
1>main.obj : error LNK2019: unresolved external symbol "char * __stdcall _com_util::ConvertBSTRToString(wchar_t *)" (?ConvertBSTRToString@_com_util@@YGPADPA_W@Z) referenced in function "public: char const * __thiscall _bstr_t::Data_t::GetString(void)const " (?GetString@Data_t@_bstr_t@@QBEPBDXZ)
1>main.obj : error LNK2019: unresolved external symbol "long __cdecl _com_dispatch_method(struct IDispatch *,long,unsigned short,unsigned short,void *,wchar_t const *,...)" (?_com_dispatch_method@@YAJPAUIDispatch@@JGGPAXPB_ WZZ) referenced in function "public: class _com_ptr_t<class _com_IIID<struct Excel::_Workbook,&struct __s_GUID const _GUID_000208da_0000_0000_c000_000000000046> > __thiscall Excel::_Application::GetActiveWorkbook(void)" (?GetActiveWorkbook@_Application@Excel@@QAE?AV?$_c om_ptr_t@V?$_com_IIID@U_Workbook@Excel@@$1?_GUID_0 00208da_0000_0000_c000_000000000046@@3U__s_GUID@@B @@@@XZ)
1>main.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall DoubleSweep<double,long>::~DoubleSweep<double,long >(void)" (??1?$DoubleSweep@NJ@@UAE@XZ) referenced in function "public: void __thiscall ParabolicFDM<double,double,double>::advance(void)" (?advance@?$ParabolicFDM@NNN@@QAEXXZ)
1>main.obj : error LNK2019: unresolved external symbol "public: class Vector<double,long,class FullArray<double,class std::allocator<double> > > __thiscall DoubleSweep<double,long>::solve(void)" (?solve@?$DoubleSweep@NJ@@QAE?AV?$Vector@NJV?$Full Array@NV?$allocator@N@std@@@@@@XZ) referenced in function "public: void __thiscall ParabolicFDM<double,double,double>::advance(void)" (?advance@?$ParabolicFDM@NNN@@QAEXXZ)
1>main.obj : error LNK2019: unresolved external symbol "public: __thiscall DoubleSweep<double,long>::DoubleSweep<double,long> (class Vector<double,long,class FullArray<double,class std::allocator<double> > > const &,class Vector<double,long,class FullArray<double,class std::allocator<double> > > const &,class Vector<double,long,class FullArray<double,class std::allocator<double> > > const &,class Vector<double,long,class FullArray<double,class std::allocator<double> > > const &,double const &,double const &)" (??0?$DoubleSweep@NJ@@QAE@ABV?$Vector@NJV?$FullArr ay@NV?$allocator@N@std@@@@@@000ABN1@Z) referenced in function "public: void __thiscall ParabolicFDM<double,double,double>::advance(void)" (?advance@?$ParabolicFDM@NNN@@QAEXXZ)
1>C:\Users\admin\Documents\Visual Studio 2005\Projects\vec\Debug\vec.exe : fatal error LNK1120: 6 unresolved externals


I would appreciate any help as to how to handle this.
Sep 7 '07 #1
2 4215
Abhinay
44
During the linking I get the following:

1>Linking...
1>main.obj : error LNK2005: "double __cdecl sigma(class curious2007::pair<double,double> const &)" (?sigma@@YANABV?$pair@NN@curious2007@@@Z) already defined in Characteristics.obj
1>main.obj : error LNK2005: "double __cdecl sigma_linear(struct std::pair<double,double> const &)" (?sigma_linear@@YANABU?$pair@NN@std@@@Z) already defined in Characteristics.obj
1>main.obj : error LNK2005: "double __cdecl mu(class curious2007::pair<double,double> const &)" (?mu@@YANABV?$pair@NN@curious2007@@@Z) already defined in Characteristics.obj
1>main.obj : error LNK2005: "double __cdecl forcing(class curious2007::pair<double,double> const &)" (?forcing@@YANABV?$pair@NN@curious2007@@@Z) already defined in Characteristics.obj
1>main.obj : error LNK2005: "double __cdecl b(class curious2007::pair<double,double> const &)" (?b@@YANABV?$pair@NN@curious2007@@@Z) already defined in Characteristics.obj
1>main.obj : error LNK2005: "double __cdecl IC(double const &)" (?IC@@YANABN@Z) already defined in Characteristics.obj
1>main.obj : error LNK2005: "double __cdecl IC_put(double const &)" (?IC_put@@YANABN@Z) already defined in Characteristics.obj
1>main.obj : error LNK2005: "double __cdecl IC_PO(double const &)" (?IC_PO@@YANABN@Z) already defined in Characteristics.obj
1>main.obj : error LNK2005: "double __cdecl IC_ASCPO(double const &)" (?IC_ASCPO@@YANABN@Z) already defined in Characteristics.obj
1>main.obj : error LNK2005: "double __cdecl IC_SCPO(double const &)" (?IC_SCPO@@YANABN@Z) already defined in Characteristics.obj
1>main.obj : error LNK2005: "double __cdecl BCR(double const &)" (?BCR@@YANABN@Z) already defined in Characteristics.obj
1>main.obj : error LNK2005: "double __cdecl BCR_PO(double const &)" (?BCR_PO@@YANABN@Z) already defined in Characteristics.obj
1>main.obj : error LNK2005: "double __cdecl BCL(double const &)" (?BCL@@YANABN@Z) already defined in Characteristics.obj
1>main.obj : error LNK2005: "double __cdecl BCL_put(double const &)" (?BCL_put@@YANABN@Z) already defined in Characteristics.obj
1>main.obj : error LNK2005: "double __cdecl BCR_Topper_p11(double const &)" (?BCR_Topper_p11@@YANABN@Z) already defined in Characteristics.obj
1>main.obj : error LNK2005: "double __cdecl BCR_Topper_p10(double const &)" (?BCR_Topper_p10@@YANABN@Z) already defined in Characteristics.obj
1>main.obj : error LNK2019: unresolved external symbol "wchar_t * __stdcall _com_util::ConvertStringToBSTR(char const *)" (?ConvertStringToBSTR@_com_util@@YGPA_WPBD@Z) referenced in function "public: __thiscall _bstr_t::Data_t::Data_t(char const *)" (??0Data_t@_bstr_t@@QAE@PBD@Z)
1>main.obj : error LNK2019: unresolved external symbol "char * __stdcall _com_util::ConvertBSTRToString(wchar_t *)" (?ConvertBSTRToString@_com_util@@YGPADPA_W@Z) referenced in function "public: char const * __thiscall _bstr_t::Data_t::GetString(void)const " (?GetString@Data_t@_bstr_t@@QBEPBDXZ)
1>main.obj : error LNK2019: unresolved external symbol "long __cdecl _com_dispatch_method(struct IDispatch *,long,unsigned short,unsigned short,void *,wchar_t const *,...)" (?_com_dispatch_method@@YAJPAUIDispatch@@JGGPAXPB_ WZZ) referenced in function "public: class _com_ptr_t<class _com_IIID<struct Excel::_Workbook,&struct __s_GUID const _GUID_000208da_0000_0000_c000_000000000046> > __thiscall Excel::_Application::GetActiveWorkbook(void)" (?GetActiveWorkbook@_Application@Excel@@QAE?AV?$_c om_ptr_t@V?$_com_IIID@U_Workbook@Excel@@$1?_GUID_0 00208da_0000_0000_c000_000000000046@@3U__s_GUID@@B @@@@XZ)
1>main.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall DoubleSweep<double,long>::~DoubleSweep<double,long >(void)" (??1?$DoubleSweep@NJ@@UAE@XZ) referenced in function "public: void __thiscall ParabolicFDM<double,double,double>::advance(void)" (?advance@?$ParabolicFDM@NNN@@QAEXXZ)
1>main.obj : error LNK2019: unresolved external symbol "public: class Vector<double,long,class FullArray<double,class std::allocator<double> > > __thiscall DoubleSweep<double,long>::solve(void)" (?solve@?$DoubleSweep@NJ@@QAE?AV?$Vector@NJV?$Full Array@NV?$allocator@N@std@@@@@@XZ) referenced in function "public: void __thiscall ParabolicFDM<double,double,double>::advance(void)" (?advance@?$ParabolicFDM@NNN@@QAEXXZ)
1>main.obj : error LNK2019: unresolved external symbol "public: __thiscall DoubleSweep<double,long>::DoubleSweep<double,long> (class Vector<double,long,class FullArray<double,class std::allocator<double> > > const &,class Vector<double,long,class FullArray<double,class std::allocator<double> > > const &,class Vector<double,long,class FullArray<double,class std::allocator<double> > > const &,class Vector<double,long,class FullArray<double,class std::allocator<double> > > const &,double const &,double const &)" (??0?$DoubleSweep@NJ@@QAE@ABV?$Vector@NJV?$FullArr ay@NV?$allocator@N@std@@@@@@000ABN1@Z) referenced in function "public: void __thiscall ParabolicFDM<double,double,double>::advance(void)" (?advance@?$ParabolicFDM@NNN@@QAEXXZ)
1>C:\Users\admin\Documents\Visual Studio 2005\Projects\vec\Debug\vec.exe : fatal error LNK1120: 6 unresolved externals


I would appreciate any help as to how to handle this.


hi,

I guess you are trying to write Dll or you are working in multy threded invironment,

check your setting,

Projects ---->setting----->C++-----><<Select category>> CodeGeneration
<<and change use-runtime library to>> Multithreded Dll

and rebuilt your code.
it might work.

thanks
Abhinay
Sep 9 '07 #2
weaknessforcats
9,208 Expert Mod 8TB
Read this.

You may have more than one issue.
Sep 9 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: nospam_timur | last post by:
I'm writing a Linux device driver that needs to compile with several different Linux versions. In my code, I need to reference certain functions by their address alone. Something like this: ...
2
by: Gianni Mariani | last post by:
I'm getting "multiply defined" errors on STL symbols. Isn't this a linker error ? By definition, doesn't the compiler/linker need to guarentee the "one definition rule". Linking... ...
1
by: arkam | last post by:
Hi, Here are my link errors : atlsd.lib(ATLComTime.obj) : error LNK2005: "public: __thiscall ATL::COleDateTime::COleDateTime(struct tagVARIANT const &)"...
10
by: Eric G. Harrison | last post by:
We have a project with many other projects referenced (all of which are referenced at the project level and are included in the solution). Frequenly, if we make a change in project A (such as adding...
0
by: Mythran | last post by:
I'm have 2 primary errors that seem to occur. 1.) In my ASP.Net application, I have 3 libraries (BLL, DAL, and Schema) that are used for the 4th and 5th UI libraries. All of the dependant...
7
by: kforski | last post by:
Hello I wonder how can I find out if the param given to the xsl is defined without error during compilation. Actually I have such code (a part of it) <xsl:if test="$showWarnings='true']">...
6
by: fcvcnet | last post by:
Hi all, I defined a class, as fellows: // Segment.h #pragma once #include "MyPoint.h" enum TLSC {PARALLEL, INTERSECT, COINSIDE,INTERSECTATDIASTOLE} twolinesolutioncases;
11
by: johnbrown105 | last post by:
Hello All, I am doing another exercise (I repeat, *exercise*). The (irrelevant to this discussion) point is to show that "You can inject a friend declaration into a namespace by declaring it...
2
by: whitechan | last post by:
Hi, I have been experiencing problems compiling my latest gnu compile code nested in c program, which runs on ARM7. the code : #if defined ARM_V6 __asm void RV_FASTCALL C_EdgeFilter4x4_RV8(...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.