473,405 Members | 2,294 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,405 software developers and data experts.

Linking static libraries from different MSVC compilers

Hello All,
I have some static libraries generated on MSVC 2005 express edition and I have to use them along with static libraries created with MSVC 2003 and create an application on MSVC2003.

example.lib - generated on MSVC2005
All other libs - generated on MSVC2003

I have attached the compiler options as well as the error log along.
Any tips/suggestions will be of great help.

Thanks in Advance
Rahul

Compiler Options

Od /I "D:\trial\adl\\" /I "D:\trial\adl\../boost-RC_1_34_0-07-02-13-1710" /D "WIN32" /D "_DEBUG" /D "_LIB" /D "_CONSOLE" /D "USE_BOOST_TYPEOF" /D "USE_NO_GCC_BUILTINS" /D "_UNICODE" /D "UNICODE" /Gm /EHsc /MD /Fo"Debug/" /Fd"Debug/vc70.pdb" /W0 /c /Wp64 /Zi /TP
.\driver2.cc
]
Creating command line "cl.exe @d:\trial\StandAlone\Debug\RSP0000EB.rsp /nologo"
Creating temporary file "d:\trial\StandAlone\Debug\RSP0000EC.rsp" with contents
[
/OUT:"D:\trial\adl\..\Debug/StandAlone.exe" /INCREMENTAL /NOLOGO /LIBPATH:"C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\lib" /LIBPATH:"D:\trial\adl\..\Debug" /NODEFAULTLIB /DEBUG /PDB:"D:\trial\adl\..\Debug/StandAlone.pdb" /SUBSYSTEM:CONSOLE /MACHINE:X86 /FORCE /VERBOSE


msvcrtd.lib msvcprtd.lib libcpmtd.lib example.lib AdlIssExec.lib AdlIssMain.lib AdlIssSupport.lib AdlIssLogging.lib AdlIssTransLogging.lib AdlParsing.lib AdlSupport.lib IntbvRnum.lib Intbv.lib gc.lib RNumber.lib sim-util.lib Sfpu.lib SfpuAdl.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib "\trial\debug\sim-util.lib"
.\Debug\driver2.obj


Error Messages
example.lib(example.obj) : error LNK2019: unresolved external symbol ___CxxFrameHandler3 referenced in function __ehhandler$?getAttrData@adliss@@YAABUAttrData@adl @@XZ
example.lib(example.obj) : error LNK2001: unresolved external symbol "public: __thiscall std::exception::exception(class std::exception const &)" (??0exception@std@@QAE@ABV01@@Z)
example.lib(example.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall std::exception::~exception(void)" (__imp_??1exception@std@@UAE@XZ) referenced in function __unwindfunclet$??0runtime_error@std@@QAE@ABV?$bas ic_string@DU?$char_traits@D@std@@V?$allocator@D@2@ @1@@Z$0
example.lib(example.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(void)" (__imp_??0exception@std@@QAE@XZ) referenced in function "public: __thiscall std::runtime_error::runtime_error(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??0runtime_error@std@@QAE@ABV?$basic_string@DU?$c har_traits@D@std@@V?$allocator@D@2@@1@@Z)
example.lib(example.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(class std::exception const &)" (__imp_??0exception@std@@QAE@ABV01@@Z) referenced in function "public: __thiscall std::runtime_error::runtime_error(class std::runtime_error const &)" (??0runtime_error@std@@QAE@ABV01@@Z)
example.lib(example.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl std::_Debug_message(wchar_t const *,wchar_t const *,unsigned int)" (__imp_?_Debug_message@std@@YAXPB_W0I@Z) referenced in function "public: void __thiscall std::_Iterator_base::_Orphan_me(void)" (?_Orphan_me@_Iterator_base@std@@QAEXXZ)
example.lib(example.obj) : error LNK2019: unresolved external symbol __imp___wassert referenced in function "public: unsigned int __thiscall adliss:Stick out tongueowerpc::L1_cache_get_set(unsigned int)const " (?L1_cache_get_set@powerpc@adliss@@QBEII@Z)
example.lib(example.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(struct std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::_Has_debug_it)" (__imp_??0?$basic_string@DU?$char_traits@D@std@@V? $allocator@D@2@@std@@QAE@U_Has_debug_it@01@@Z) referenced in function "public: __thiscall adl::IntroBase::IntroBase(void)" (??0IntroBase@adl@@QAE@XZ)
example.lib(example.obj) : error LNK2019: unresolved external symbol __imp___invalid_parameter referenced in function "public: unsigned int const & __thiscall std::vector<unsigned int,class std::allocator<unsigned int> >:Surpriseperator[](unsigned int)const " (??A?$vector@IV?$allocator@I@std@@@std@@QBEABII@Z)
example.lib(example.obj) : error LNK2019: unresolved external symbol __imp___CrtDbgReportW referenced in function "public: unsigned int const & __thiscall std::vector<unsigned int,class std::allocator<unsigned int> >:Surpriseperator[](unsigned int)const " (??A?$vector@IV?$allocator@I@std@@@std@@QBEABII@Z)
example.lib(example.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base::~_Container_base(void)" (__imp_??1_Container_base@std@@QAE@XZ) referenced in function "public: __thiscall std::_Vector_val<int,class std::allocator<int> >::~_Vector_val<int,class std::allocator<int> >(void)" (??1?$_Vector_val@HV?$allocator@H@std@@@std@@QAE@X Z)
example.lib(example.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base::_Orphan_all(void)const " (__imp_?_Orphan_all@_Container_base@std@@QBEXXZ) referenced in function "protected: void __thiscall std::vector<int,class std::allocator<int> >::_Tidy(void)" (?_Tidy@?$vector@HV?$allocator@H@std@@@std@@IAEXXZ )
example.lib(example.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base::_Container_base(void)" (__imp_??0_Container_base@std@@QAE@XZ) referenced in function "protected: __thiscall std::_Vector_val<int,class std::allocator<int> >::_Vector_val<int,class std::allocator<int> >(class std::allocator<int>)" (??0?$_Vector_val@HV?$allocator@H@std@@@std@@IAE@V ?$allocator@H@1@@Z)
example.lib(example.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception@std@@QAE@ABQBD@Z) referenced in function "public: __thiscall std::bad_alloc::bad_alloc(char const *)" (??0bad_alloc@std@@QAE@PBD@Z)
example.lib(example.obj) : error LNK2001: unresolved external symbol "public: virtual char const * __thiscall std::exception::what(void)const " (?what@exception@std@@UBEPBDXZ)
example.lib(example.obj) : error LNK2019: unresolved external symbol __imp__memmove_s referenced in function "int * __cdecl std::_Uninit_copy<class std::_Vector_const_iterator<int,class std::allocator<int> >,int *,class std::allocator<int> >(class std::_Vector_const_iterator<int,class std::allocator<int> >,class std::_Vector_const_iterator<int,class std::allocator<int> >,int *,class std::allocator<int> &,struct std::_Scalar_ptr_iterator_tag,struct std::_Range_checked_iterator_tag)" (??$_Uninit_copy@V?$_Vector_const_iterator@HV?$all ocator@H@std@@@std@@PAHV?$allocator@H@2@@std@@YAPA HV?$_Vector_const_iterator@HV?$allocator@H@std@@@0 @0PAHAAV?$allocator@H@0@U_Scalar_ptr_iterator_tag@ 0@U_Range_checked_iterator_tag@0@@Z)
May 31 '07 #1
3 33081
Motoma
3,237 Expert 2GB
I believe this is more of a C/C++ related issue, therefore I am moving this thread to the appropriate forum.
May 31 '07 #2
weaknessforcats
9,208 Expert Mod 8TB
Are these missing functions in the library headers?
May 31 '07 #3
dfaure
1
That's due to /NODEFAULTLIB. Remove that flag and it should compile (at least it should have less undefined references).
Aug 22 '08 #4

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

Similar topics

7
by: johny smith | last post by:
Can someone please explain to me why when linking a C with a C++ program that there has to be some flag to check to see if it is compiled with C++. For example. This is not exactly correct but...
3
by: daniel_shaw01 | last post by:
I want to link the C++ standard libraries statically for my application because I don't space for the .so files on my target platform. After quite a bit of searching, I found very little...
1
by: Venky | last post by:
I'm compiling a C program that is using Interbase 6.0 APIS. Getting the following errors at the time of linking. Linking test.exe: Linker Warning: No module definition file specified: using...
6
by: Uli | last post by:
Hello, I'm trying to use a DLL (by static linking) which was compiled with Borland C++Builder (BCB) in Visual C++ (Visual-Studio 2003). All functions are declared with the directive 'extern...
12
by: fox | last post by:
How do I (portably) make a forward reference to a static (I mean file-scope) variable? I've been using "extern" for years, for example: extern int x; int foo(void) { return x++; }
10
by: Julian | last post by:
I get the following error when i try to link a fortran library to a c++ code in .NET 2005. LINK : fatal error LNK1104: cannot open file 'libc.lib' the code was working fine when built using...
7
by: Hal Vaughan | last post by:
I have a problem with port forwarding and I have been working on it for over 2 weeks with no luck. I have found C programs that almost work and Java programs that almost work, but nothing that...
6
by: Chris Stankevitz | last post by:
At link time, MSVC determines some of my libraries are unused and doesn't link them into my exe. This undesirable feature causes problems when I employ the factory pattern. With the factory...
0
by: xieml2007 | last post by:
Dear Madam or Sir, I encountered one problem which is quite similiar to the discussions launched at the web site: http://www.thescripts.com/forum/thread280324.html
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
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.