Go back to Richel Bilderbeek's homepage.
Go back to Richel Bilderbeek's C++ page.
ld: duplicate symbol Gnuplot::SetLineStyles() in /MyFolder/UnitGnuplotInterface.o and /MyFolder/GnuplotInterfaceMain.o |
IDE: Xcode 3.1.2
This might happen if you use my Gnuplot Interface. The cause is in the following lines:
//Yes, this #include is non-standard |
Duplicate symbols occur when you have both added an implementation file (.cpp) to your project and #included it. This way, the implementation file (.cpp) gets compiled twice: once as a module in your project (as it is added to your project) and subsequently as a piece of #included code.
Avoid #including implementation files (.cpp). Prefer #including header files (.h) only. Prefer adding implementation files (.cpp) to your project.
For the Gnuplot Interface problem: follow the hints from the commments:
//#include "UnitGnuplotInterface.cpp" //Already added to project |
Thanks to Roger Wehage for sending me a complete and detailed email with this problem
Go back to Richel Bilderbeek's C++ page.
Go back to Richel Bilderbeek's homepage.