Hello everybody,
I have a monolithic and big toto.cpp code to split into a clean
toto.hpp, toto_mod.cpp, main_toto.cpp.
When I tried to compile , after spliting, I had the following error :
------------------------------------------------------------------------------------------------------------------------------------------------
1>------ Build started: Project: Archi-II-RLD-1D-V.4, Configuration: Debug Win32 ------
1> Archi-II-RLD-1D-V.4.cpp
1> Archi-Main.cpp
1> xilink: executing 'link'
1>Archi-Main.obj : error LNK2005: "struct Seg Seg" (?Seg@@3U0@A) already defined in Archi-II-RLD-1D-V.4.obj
1>Archi-Main.obj : error LNK2005: "struct SysRac * sR" (?sR@@3PAUSysRac@@A) already defined in Archi-II-RLD-1D-V.4.obj
1>D:\PROJET--COUPLAGE-VISUAL-SOURCES--\ARCHI-1D-RLD-AVRIL-2014_\ARCHI-II-RLD-1D-V.4\ARCHI-II-RLD-1D-V.4\Archi-II-RLD-1D-V.4\Debug\Archi-II-RLD-1D-V.4.exe : fatal error LNK1169: one or more multiply defined symbols found
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
----------------------------------------------------------------------------------------------------------------------------------------------------------
But the matter is that struct Seg, and SysRac * SR are just defined inside toto.hpp as following :
typedef struct SysRac *pTSysRac;
typedef struct Axe *pTAxe; /* Pour chacun des axes */
typedef struct Pointe *pTPointe; /* Pour les pointes, parties apicales des racines */
typedef struct Seg *pTSeg; /* Pour les segments, qui sont des portions d'axes */
struct SysRac /* Ensemble d'axes */
{
.........
} ;
struct Axe /* Ensemble constitué d'un méristème et liste de noeuds */
{
................................................
} ;
struct Pointe /* Méristème apical, ou pointe de chaque racine */
{
....................
};
struct Seg
{
.......
} Seg;
Any one could Help ?
Thanks in advance.
With Best Regards.