Dear friends:
I am using " Seldon c++ libary for linear algebra, http://seldon.sourceforge.net/" in my heat transfer code. the paltform is vs2010.
I use the Seldon::Vector<double> in my class mesh to store the x y coordinates. I include the "Mesh.h" in my main.cpp.but it gave me some error about seldon redefinition error .

#ifndef MESH_H
#define MESH_H

#include"Seldon.hxx"

class Domain;

class Mesh
{
private:
	int nL;
	
	int nW;
	
	Seldon::Vector<double> x;

	Seldon::Vector<double> xInterface;

	Seldon::Vector<double> y;
	 
	Seldon::Vector<double> yInterface;

public:

    Mesh(void);

   void setNl(int const& _Nl);

   void setNw(int const& _Nw);

    void creatMeshonDomain(Domain & aDomain);

   ~Mesh(void);
};


#endif
#include"Mesh.h"

int main(int argc, char** argv)
{
 

  std::cin.get();
  return 0;
}

已经在 Main.obj 中定义="already defined in Main.obj"

1>Mesh.obj : error LNK2005: "class Seldon::class_SeldonNonUnit Seldon::SeldonNonUnit" (?SeldonNonUnit@Seldon@@3Vclass_SeldonNonUnit@1@A) 已经在 Main.obj 中定义
1>Mesh.obj : error LNK2005: "class Seldon::SeldonNorm Seldon::SeldonNorm1" (?SeldonNorm1@Seldon@@3VSeldonNorm@1@A) 已经在 Main.obj 中定义
1>Mesh.obj : error LNK2005: "class Seldon::SeldonUplo Seldon::SeldonLower" (?SeldonLower@Seldon@@3VSeldonUplo@1@A) 已经在 Main.obj 中定义
1>Mesh.obj : error LNK2005: "class Seldon::class_SeldonUnit Seldon::SeldonUnit" (?SeldonUnit@Seldon@@3Vclass_SeldonUnit@1@A) 已经在 Main.obj 中定义
1>Mesh.obj : error LNK2005: "class Seldon::LapackInfo Seldon::lapack_info" (?lapack_info@Seldon@@3VLapackInfo@1@A) 已经在 Main.obj 中定义
1>Mesh.obj : error LNK2005: "class Seldon::class_SeldonNoTrans Seldon::SeldonNoTrans" (?SeldonNoTrans@Seldon@@3Vclass_SeldonNoTrans@1@A) 已经在 Main.obj 中定义
1>Mesh.obj : error LNK2005: "class Seldon::SeldonConjugate Seldon::SeldonUnconj" (?SeldonUnconj@Seldon@@3VSeldonConjugate@1@A) 已经在 Main.obj 中定义
1>Mesh.obj : error LNK2005: "class Seldon::SeldonNorm Seldon::SeldonNormInf" (?SeldonNormInf@Seldon@@3VSeldonNorm@1@A) 已经在 Main.obj 中定义
1>Mesh.obj : error LNK2005: "class Seldon::SeldonUplo Seldon::SeldonUpper" (?SeldonUpper@Seldon@@3VSeldonUplo@1@A) 已经在 Main.obj 中定义
1>Mesh.obj : error LNK2005: "class Seldon::class_SeldonTrans Seldon::SeldonTrans" (?SeldonTrans@Seldon@@3Vclass_SeldonTrans@1@A) 已经在 Main.obj 中定义
1>Mesh.obj : error LNK2005: "class Seldon::class_SeldonRight Seldon::SeldonRight" (?SeldonRight@Seldon@@3Vclass_SeldonRight@1@A) 已经在 Main.obj 中定义
1>Mesh.obj : error LNK2005: "class Seldon::class_SeldonConjTrans Seldon::SeldonConjTrans" (?SeldonConjTrans@Seldon@@3Vclass_SeldonConjTrans@1@A) 已经在 Main.obj 中定义
1>Mesh.obj : error LNK2005: "class Seldon::class_SeldonLeft Seldon::SeldonLeft" (?SeldonLeft@Seldon@@3Vclass_SeldonLeft@1@A) 已经在 Main.obj 中定义
1>Mesh.obj : error LNK2005: "class Seldon::SeldonConjugate Seldon::SeldonConj" (?SeldonConj@Seldon@@3VSeldonConjugate@1@A) 已经在 Main.obj 中定义
1>Mesh.obj : error LNK2005: "public: int & __thiscall Seldon::LapackInfo::GetInfoRef(void)" (?GetInfoRef@LapackInfo@Seldon@@QAEAAHXZ) 已经在 Main.obj 中定义
1>Mesh.obj : error LNK2005: "public: int __thiscall Seldon::LapackInfo::GetInfo(void)" (?GetInfo@LapackInfo@Seldon@@QAEHXZ) 已经在 Main.obj 中定义
1>Mesh.obj : error LNK2005: "public: __thiscall Seldon::LapackInfo::operator int(void)" (??BLapackInfo@Seldon@@QAEHXZ) 已经在 Main.obj 中定义
1>Mesh.obj : error LNK2005: "public: __thiscall Seldon::LapackInfo::LapackInfo(int)" (??0LapackInfo@Seldon@@QAE@H@Z) 已经在 Main.obj 中定义
1>Mesh.obj : error LNK2005: "public: virtual class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall Seldon::LapackError::What(void)" (?What@LapackError@Seldon@@UAE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ) 已经在 Main.obj 中定义
1>Mesh.obj : error LNK2005: "public: __thiscall Seldon::LapackError::LapackError(int,class std::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> >)" (??0LapackError@Seldon@@QAE@HV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@0@Z) 已经在 Main.obj 中定义
1>Mesh.obj : error LNK2005: "public: __thiscall Seldon::IOError::IOError(class std::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> >)" (??0IOError@Seldon@@QAE@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@0@Z) 已经在 Main.obj 中定义
1>Mesh.obj : error LNK2005: "public: __thiscall Seldon::WrongCol::WrongCol(class std::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> >)" (??0WrongCol@Seldon@@QAE@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@0@Z) 已经在 Main.obj 中定义
1>Mesh.obj : error LNK2005: "public: __thiscall Seldon::WrongRow::WrongRow(class std::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> >)" (??0WrongRow@Seldon@@QAE@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@0@Z) 已经在 Main.obj 中定义
1>Mesh.obj : error LNK2005: "public: __thiscall Seldon::WrongIndex::WrongIndex(class std::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> >)" (??0WrongIndex@Seldon@@QAE@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@0@Z) 已经在 Main.obj 中定义
1>Mesh.obj : error LNK2005: "public: __thiscall Seldon::WrongDim::WrongDim(class std::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> >)" (??0WrongDim@Seldon@@QAE@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@0@Z) 已经在 Main.obj 中定义
1>Mesh.obj : error LNK2005: "public: __thiscall Seldon::NoMemory::NoMemory(class std::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> >)" (??0NoMemory@Seldon@@QAE@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@0@Z) 已经在 Main.obj 中定义
1>Mesh.obj : error LNK2005: "public: virtual class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall Seldon::WrongArgument::What(void)" (?What@WrongArgument@Seldon@@UAE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ) 已经在 Main.obj 中定义
1>Mesh.obj : error LNK2005: "public: __thiscall Seldon::WrongArgument::WrongArgument(class std::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> >)" (??0WrongArgument@Seldon@@QAE@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@0@Z) 已经在 Main.obj 中定义
1>Mesh.obj : error LNK2005: "public: virtual class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall Seldon::Undefined::What(void)" (?What@Undefined@Seldon@@UAE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ) 已经在 Main.obj 中定义
1>Mesh.obj : error LNK2005: "public: __thiscall Seldon::Undefined::Undefined(class std::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> >)" (??0Undefined@Seldon@@QAE@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@0@Z) 已经在 Main.obj 中定义
1>Mesh.obj : error LNK2005: "public: void __thiscall Seldon::Error::CoutWhat(void)" (?CoutWhat@Error@Seldon@@QAEXXZ) 已经在 Main.obj 中定义
1>Mesh.obj : error LNK2005: "public: virtual class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall Seldon::Error::What(void)" (?What@Error@Seldon@@UAE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ) 已经在 Main.obj 中定义
1>Mesh.obj : error LNK2005: "public: virtual __thiscall Seldon::Error::~Error(void)" (??1Error@Seldon@@UAE@XZ) 已经在 Main.obj 中定义
1>Mesh.obj : error LNK2005: "public: __thiscall Seldon::Error::Error(class std::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> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (??0Error@Seldon@@QAE@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@00@Z) 已经在 Main.obj 中定义
1>Mesh.obj : error LNK2005: "public: __thiscall Seldon::Error::Error(class std::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> >)" (??0Error@Seldon@@QAE@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@0@Z) 已经在 Main.obj 中定义
1>Mesh.obj : error LNK2005: "public: __thiscall Seldon::class_SeldonRight::class_SeldonRight(void)" (??0class_SeldonRight@Seldon@@QAE@XZ) 已经在 Main.obj 中定义
1>Mesh.obj : error LNK2005: "public: __thiscall Seldon::class_SeldonLeft::class_SeldonLeft(void)" (??0class_SeldonLeft@Seldon@@QAE@XZ) 已经在 Main.obj 中定义
1>Mesh.obj : error LNK2005: "public: bool __thiscall Seldon::SeldonSide::Right(void)const " (?Right@SeldonSide@Seldon@@QBE_NXZ) 已经在 Main.obj 中定义
1>Mesh.obj : error LNK2005: "public: bool __thiscall Seldon::SeldonSide::Left(void)const " (?Left@SeldonSide@Seldon@@QBE_NXZ) 已经在 Main.obj 中定义
1>Mesh.obj : error LNK2005: "public: __thiscall Seldon::SeldonSide::SeldonSide(int)" (??0SeldonSide@Seldon@@QAE@H@Z) 已经在 Main.obj 中定义
1>Mesh.obj : error LNK2005: "public: __thiscall Seldon::SeldonConjugate::SeldonConjugate(bool)" (??0SeldonConjugate@Seldon@@QAE@_N@Z) 已经在 Main.obj 中定义
1>Mesh.obj : error LNK2005: "public: char __thiscall Seldon::SeldonNorm::RevChar(void)const " (?RevChar@SeldonNorm@Seldon@@QBEDXZ) 已经在 Main.obj 中定义
1>Mesh.obj : error LNK2005: "public: char __thiscall Seldon::SeldonNorm::Char(void)const " (?Char@SeldonNorm@Seldon@@QBEDXZ) 已经在 Main.obj 中定义
1>Mesh.obj : error LNK2005: "public: __thiscall Seldon::SeldonNorm::operator char(void)const " (??BSeldonNorm@Seldon@@QBEDXZ) 已经在 Main.obj 中定义
1>Mesh.obj : error LNK2005: "public: __thiscall Seldon::SeldonNorm::SeldonNorm(int)" (??0SeldonNorm@Seldon@@QAE@H@Z) 已经在 Main.obj 中定义
1>Mesh.obj : error LNK2005: "public: char __thiscall Seldon::SeldonUplo::RevChar(void)const " (?RevChar@SeldonUplo@Seldon@@QBEDXZ) 已经在 Main.obj 中定义
1>Mesh.obj : error LNK2005: "public: char __thiscall Seldon::SeldonUplo::Char(void)const " (?Char@SeldonUplo@Seldon@@QBEDXZ) 已经在 Main.obj 中定义
1>Mesh.obj : error LNK2005: "public: bool __thiscall Seldon::SeldonUplo::Lower(void)const " (?Lower@SeldonUplo@Seldon@@QBE_NXZ) 已经在 Main.obj 中定义
1>Mesh.obj : error LNK2005: "public: bool __thiscall Seldon::SeldonUplo::Upper(void)const " (?Upper@SeldonUplo@Seldon@@QBE_NXZ) 已经在 Main.obj 中定义
1>Mesh.obj : error LNK2005: "public: __thiscall Seldon::SeldonUplo::operator char(void)const " (??BSeldonUplo@Seldon@@QBEDXZ) 已经在 Main.obj 中定义
1>Mesh.obj : error LNK2005: "public: __thiscall Seldon::SeldonUplo::SeldonUplo(int)" (??0SeldonUplo@Seldon@@QAE@H@Z) 已经在 Main.obj 中定义
1>Mesh.obj : error LNK2005: "public: __thiscall Seldon::class_SeldonUnit::class_SeldonUnit(void)" (??0class_SeldonUnit@Seldon@@QAE@XZ) 已经在 Main.obj 中定义
1>Mesh.obj : error LNK2005: "public: __thiscall Seldon::class_SeldonNonUnit::class_SeldonNonUnit(void)" (??0class_SeldonNonUnit@Seldon@@QAE@XZ) 已经在 Main.obj 中定义
1>Mesh.obj : error LNK2005: "public: bool __thiscall Seldon::SeldonDiag::Unit(void)const " (?Unit@SeldonDiag@Seldon@@QBE_NXZ) 已经在 Main.obj 中定义
1>Mesh.obj : error LNK2005: "public: bool __thiscall Seldon::SeldonDiag::NonUnit(void)const " (?NonUnit@SeldonDiag@Seldon@@QBE_NXZ) 已经在 Main.obj 中定义
1>Mesh.obj : error LNK2005: "public: char __thiscall Seldon::SeldonDiag::Char(void)const " (?Char@SeldonDiag@Seldon@@QBEDXZ) 已经在 Main.obj 中定义
1>Mesh.obj : error LNK2005: "public: __thiscall Seldon::SeldonDiag::SeldonDiag(int)" (??0SeldonDiag@Seldon@@QAE@H@Z) 已经在 Main.obj 中定义
1>Mesh.obj : error LNK2005: "public: __thiscall Seldon::class_SeldonConjTrans::class_SeldonConjTrans(void)" (??0class_SeldonConjTrans@Seldon@@QAE@XZ) 已经在 Main.obj 中定义
1>Mesh.obj : error LNK2005: "public: __thiscall Seldon::class_SeldonNoTrans::class_SeldonNoTrans(void)" (??0class_SeldonNoTrans@Seldon@@QAE@XZ) 已经在 Main.obj 中定义
1>Mesh.obj : error LNK2005: "public: __thiscall Seldon::class_SeldonTrans::class_SeldonTrans(void)" (??0class_SeldonTrans@Seldon@@QAE@XZ) 已经在 Main.obj 中定义
1>Mesh.obj : error LNK2005: "public: bool __thiscall Seldon::SeldonTranspose::ConjTrans(void)const " (?ConjTrans@SeldonTranspose@Seldon@@QBE_NXZ) 已经在 Main.obj 中定义
1>Mesh.obj : error LNK2005: "public: bool __thiscall Seldon::SeldonTranspose::NoTrans(void)const " (?NoTrans@SeldonTranspose@Seldon@@QBE_NXZ) 已经在 Main.obj 中定义
1>Mesh.obj : error LNK2005: "public: bool __thiscall Seldon::SeldonTranspose::Trans(void)const " (?Trans@SeldonTranspose@Seldon@@QBE_NXZ) 已经在 Main.obj 中定义
1>Mesh.obj : error LNK2005: "public: char __thiscall Seldon::SeldonTranspose::RevChar(void)const " (?RevChar@SeldonTranspose@Seldon@@QBEDXZ) 已经在 Main.obj 中定义
1>Mesh.obj : error LNK2005: "public: char __thiscall Seldon::SeldonTranspose::Char(void)const " (?Char@SeldonTranspose@Seldon@@QBEDXZ) 已经在 Main.obj 中定义
1>Mesh.obj : error LNK2005: "public: __thiscall Seldon::SeldonTranspose::SeldonTranspose(int)" (??0SeldonTranspose@Seldon@@QAE@H@Z) 已经在 Main.obj 中定义
1>D:\dingpeng\CartesianHeat\Release\CartesianHeat.exe : fatal error LNK1169: 找到一个或多个多重定义的符号

Edited 4 Years Ago by ztdep: n/a

you may have defined the variables in the classes provided in header 1, but in you main code you have no definitions for the functions described . the errors reference functions required to render the mesh values. without them, you cannot run the program nor render anything at all.

you have no functions that are actually rendering the meshes for your program. review the documentation provided with the sdk. i'm not familiar with skeleton, so i cannot provide a proper answer. however, i suggest you use a more widely known sdk, like OpenGl or DarkGDK, which has a ton more documentation, and users who may be able help you.

This question has already been answered. Start a new discussion instead.