473,395 Members | 1,978 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,395 software developers and data experts.

STL template symbol "already defined in" errors ...


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...

msvcprtd.lib(MSVCP71D.dll) : error LNK2005: "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> >(void)"
(??1?$basic_string@DU?$char_traits@D@std@@V?$alloc ator@D@2@@std@@QAE@XZ)
already defined in SyncTx.lib(SyncTr.obj)

msvcprtd.lib(MSVCP71D.dll) : error LNK2005: "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> >(char const *)"
(??0?$basic_string@DU?$char_traits@D@std@@V?$alloc ator@D@2@@std@@QAE@PBD@Z)
already defined in SyncTx.lib(SyncTr.obj)

msvcprtd.lib(MSVCP71D.dll) : error LNK2005: "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> >(class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> > const &)"
(??0?$basic_string@DU?$char_traits@D@std@@V?$alloc ator@D@2@@std@@QAE@ABV01@@Z)
already defined in SyncTx.lib(SyncTr.obj)

.... lots o these cut

work.win32/NMFinger.exe : fatal error LNK1169: one or more multiply
defined symbols found

Nov 17 '05 #1
2 6863
check project properties
C++
Code Generation
Runtime Library

ex (Multi-threaded Debug DLL (/MDd))

and make sure they are compatible bewteeen the projects in the solution
Nov 17 '05 #2
jrainey wrote:
check project properties
C++
Code Generation
Runtime Library

ex (Multi-threaded Debug DLL (/MDd))

and make sure they are compatible bewteeen the projects in the solution


This turned out to be an ATL/MFC madness.

First I tried one suggestion to define _AFXDLL and that worked for one
binary but then it broke another binary.

So I'm now trying the "Use of MFC" and "Use of ATL" combinations.

The other problem confounding things is that I have a library from MS
(which I can't get compiled in different modes) that I think is build in
/MT (but it uses no system run times).

Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: beachboy | last post by:
I have a problem if the parameter has a "&" symbol in querystring, i think asp.net will split the value into 2 values as "&" is a spliter any advise can give me to solve this problem? P.S. I...
32
by: SAL | last post by:
Hello, I do not have any trouble declaring string values except when it comes to directory path's. Why does C# implicitly put a @ symbol at the being of a String value that has been declared...
2
by: Will hunting | last post by:
hi, when compiling using makefile on unix, I encounter such problem, anyone has similar experience on this? what could be the possible cause? thanks make OBJS=out/release "EXTRAFLAGS=-O...
3
by: Vijay Bajwa | last post by:
I declared a static std::map<string, intin one.cpp at the module level. This is only used inside the file and I did it to avoid global namespace pollution The file one.o goes into the library...
0
by: Gregory Gadow | last post by:
We have a number of development machines in our IT department, all running the same version of VS 2005 sp 1. Our company website and several compiled components were all written in VB.Net 2.0 using...
2
by: curious2007 | last post by:
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)...
4
by: MimiMi | last post by:
Hi all! I want a mu (the micro symbol) in the text property of a JLabel. (I want to be able to display the unit micro-seconds as "mu"s...) Can anyone help me with that, pretty please?
4
by: fran7 | last post by:
Hi, from help in the javascript forum I found the error in some code but need help. This bit of code works perfectly, trouble is I am writing it to a javascript function so the height needs to be in...
4
by: Winks | last post by:
How do I print the "&" symbol in an Access 2007 report? The help system says I should use the ASCI character 38 while holding the Alt key. This works---I can see it in the caption property, but...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: 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
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
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
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,...

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.