| | |
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.
I'm here to prove you wrong.
•
•
•
•
>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
| Thread Tools | Search this Thread |
api array arrays based binary c++ c/c++ calculator char char* class classes code coding compile console conversion convert count database delete deploy desktop developer directshow dll download dynamic dynamiccharacterarray email encryption error file forms fstream function functions game givemetehcodez google graph gui homeworkhelp iamthwee ifstream input int java lib linkedlist linker linux list loop looping loops map math matrix memory multiple news number numbertoword output pointer problem program programming project python random read recursion recursive reference return rpg sorting string strings temperature template templates test text text-file tree unix url variable vector video visual visualstudio win32 windows winsock wordfrequency wxwidgets






