| | |
duplicate symbol
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: May 2008
Posts: 48
Reputation:
Solved Threads: 0
During a C++ script compilation, and doing exe building in AIX 5.3 using xlC compiler, I get the warning shown below:
The warning does not cause any problems in building EXE or during validation but too many warnings for building each EXE is annoying.
Can someone please help me on how to set the flag in Makefile so that this warning can be removed and build is done without this?
C++ Syntax (Toggle Plain Text)
ld: 0711-224 WARNING: Duplicate symbol: .NotNode::NotNode(BoolNode*) ld: 0711-224 WARNING: Duplicate symbol: .UnaryNode::UnaryNode(BoolNode*) ld: 0711-224 WARNING: Duplicate symbol: .OrNode::OrNode(BoolNode*,BoolNode*) ld: 0711-224 WARNING: Duplicate symbol: .BinaryNode::BinaryNode(BoolNode*,BoolNo de*) ld: 0711-224 WARNING: Duplicate symbol: .AndNode::AndNode(BoolNode*,BoolNode*) ld: 0711-224 WARNING: Duplicate symbol: .LeafNode::LeafNode(const char*) ld: 0711-224 WARNING: Duplicate symbol: .RegularExpression::RegularExpression(co nst char*) ld: 0711-224 WARNING: Duplicate symbol: .RegularExpression::Init(const char*) ld: 0711-224 WARNING: Duplicate symbol: .UnaryNode::~UnaryNode() ld: 0711-224 WARNING: Duplicate symbol: .UnaryNode::Dump(ostream&,int) ld: 0711-224 WARNING: Duplicate symbol: .UnaryNode::Visit(int,void*) ld: 0711-224 WARNING: Duplicate symbol: .BinaryNode::~BinaryNode() ld: 0711-224 WARNING: Duplicate symbol: .BinaryNode::Dump(ostream&,int) ld: 0711-224 WARNING: Duplicate symbol: .BinaryNode::Visit(int,void*) ld: 0711-224 WARNING: Duplicate symbol: .StringDictionaryIterator::operator void *()
The warning does not cause any problems in building EXE or during validation but too many warnings for building each EXE is annoying.
Can someone please help me on how to set the flag in Makefile so that this warning can be removed and build is done without this?
>Is this valid?.. #pragma warning(disable:'warn code') ..:p
If you don't know what's causing a warning, you'd be a fool to disable it. I only know of one warning, on any compiler that I've ever used, where I'm 100% sure that it can be safely disabled. The correct response to a warning is understanding it and then fixing it.
If you don't know what's causing a warning, you'd be a fool to disable it. I only know of one warning, on any compiler that I've ever used, where I'm 100% sure that it can be safely disabled. The correct response to a warning is understanding it and then fixing it.
New members chased away this month: 4
•
•
•
•
>Is this valid?.. #pragma warning(disable:'warn code') ..:p
If you don't know what's causing a warning, you'd be a fool to disable it. I only know of one warning, on any compiler that I've ever used, where I'm 100% sure that it can be safely disabled. The correct response to a warning is understanding it and then fixing it.
The problem could be the result of several different things, and no one can tell you specifically without seeing the code. Another possible cause, besides the ones I already mentioned previously, is putting the implementation code in a header file. In that case it will be duplicated in every *.cpp file that uses the header file, thus the duplicate error message(s). The solution is to put the implementation code in one *.cpp file, leaving only the class declaration in the header file.
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
![]() |
Similar Threads
- What is the proper way to combine C++ files (with g++) to avoid link (ld) errors? (C++)
- I'm having problems (Java)
- beginners (C++)
- Arrays (C++)
- Help me to choose keywords and Description (Search Engine Optimization)
Other Threads in the C++ Forum
- Previous Thread: how to get and use large size array?
- Next Thread: Using function parameters defined in if statement
Views: 1786 | Replies: 14
| Thread Tools | Search this Thread |
Tag cloud for C++
6 api application array arrays assignment beginner binary bitmap c++ c/c++ calculator char class classes code coding compile compiler console conversion convert count data database delete developer display dll email encryption error file forms fstream function functions game generator getline givemetehcodez graph homeworkhelper iamthwee ifstream image input int integer java lazy lib loop looping loops map math matrix memory multidimensional multiple newbie news node number output parameter pointer problem program programming project proxy python random read recursion recursive reference return sort string strings struct template templates text tree url variable vector video visual visualstudio win32 windows winsock word wordfrequency wxwidgets






