Index: trunk/ab5.0/abdev/BasicCompiler_Common/VarList.cpp
===================================================================
--- trunk/ab5.0/abdev/BasicCompiler_Common/VarList.cpp	(revision 507)
+++ trunk/ab5.0/abdev/BasicCompiler_Common/VarList.cpp	(revision 508)
@@ -7,4 +7,6 @@
 //デバッグ用
 #include "../BasicCompiler_Common/debug.h"
+
+using namespace ActiveBasic::Compiler;
 
 //変数リストのツリーハンドル
@@ -445,5 +447,5 @@
 	//Thisポインタを取得
 	LONG_PTR pThis;
-	const Variable *pVar = pUserProc->GetLocalVars().Find( Symbol( "_System_LocalThis" ) );
+	const Variable *pVar = pUserProc->GetLocalVars().Find( LexicalAnalyzer::FullNameToSymbol( "_System_LocalThis" ) );
 	if( !pVar ){
 		return;
Index: trunk/ab5.0/abdev/BasicCompiler_Common/VariableOpe.cpp
===================================================================
--- trunk/ab5.0/abdev/BasicCompiler_Common/VariableOpe.cpp	(revision 507)
+++ trunk/ab5.0/abdev/BasicCompiler_Common/VariableOpe.cpp	(revision 508)
@@ -12,4 +12,6 @@
 #include "../compiler_x86/opcode.h"
 #endif
+
+using namespace ActiveBasic::Compiler;
 
 BOOL IsPtrType(int type){
@@ -563,5 +565,5 @@
 		/////////////////
 
-		pVar = UserProc::CompilingUserProc().GetLocalVars().BackSearch( Symbol( VarName ) );
+		pVar = UserProc::CompilingUserProc().GetLocalVars().BackSearch( LexicalAnalyzer::FullNameToSymbol( VarName ) );
 		if( pVar ){
 			goto ok;
@@ -614,5 +616,5 @@
 		GetNowStaticVarFullName(VarName,temporary);
 
-		pVar = compiler.GetObjectModule().meta.GetGlobalVars().Find( Symbol( temporary ) );
+		pVar = compiler.GetObjectModule().meta.GetGlobalVars().Find( LexicalAnalyzer::FullNameToSymbol( temporary ) );
 		if( pVar ){
 			goto ok;
@@ -643,5 +645,5 @@
 		sprintf(temp2,"%s.%s",VarName,temporary);
 
-		pVar = compiler.GetObjectModule().meta.GetGlobalVars().Find( Symbol( temp2 ) );
+		pVar = compiler.GetObjectModule().meta.GetGlobalVars().Find( LexicalAnalyzer::FullNameToSymbol( temp2 ) );
 		if( pVar ){
 			lstrcpy(member,tempMember);
@@ -656,5 +658,5 @@
 		sprintf(temp2,"%s.%s",compiler.pCompilingClass->GetName().c_str(),VarName);
 
-		pVar = compiler.GetObjectModule().meta.GetGlobalVars().Find( Symbol( temp2 ) );
+		pVar = compiler.GetObjectModule().meta.GetGlobalVars().Find( LexicalAnalyzer::FullNameToSymbol( temp2 ) );
 		if( pVar ){
 			goto ok;
@@ -667,5 +669,5 @@
 	////////////////////
 
-	pVar = compiler.GetObjectModule().meta.GetGlobalVars().BackSearch( Symbol( VarName ) );
+	pVar = compiler.GetObjectModule().meta.GetGlobalVars().BackSearch( LexicalAnalyzer::FullNameToSymbol( VarName ) );
 	if( pVar ){
 		goto ok;
@@ -941,5 +943,5 @@
 	/////////////////////////
 
-	if( compiler.GetObjectModule().meta.GetGlobalVars().DuplicateCheck( Symbol( name ) ) ){
+	if( compiler.GetObjectModule().meta.GetGlobalVars().DuplicateCheck( LexicalAnalyzer::FullNameToSymbol( name ) ) ){
 		//２重定義のエラー
 		compiler.errorMessenger.Output(15,name,cp);
@@ -1167,5 +1169,5 @@
 {
 	char temporary[255];
-	if( compiler.GetObjectModule().meta.GetGlobalVars().Find( Symbol( "_DebugSys_dwThreadID" ) ) == NULL )
+	if( compiler.GetObjectModule().meta.GetGlobalVars().Find( LexicalAnalyzer::FullNameToSymbol( "_DebugSys_dwThreadID" ) ) == NULL )
 	{
 		// 未定義の場合は定義する
Index: trunk/ab5.0/abdev/BasicCompiler_Common/WatchList.cpp
===================================================================
--- trunk/ab5.0/abdev/BasicCompiler_Common/WatchList.cpp	(revision 507)
+++ trunk/ab5.0/abdev/BasicCompiler_Common/WatchList.cpp	(revision 508)
@@ -13,4 +13,6 @@
 //デバッグ用
 #include "debug.h"
+
+using namespace ActiveBasic::Compiler;
 
 int Debugging_GetArray( const Subscripts &subscripts,char *array,const Type &type,LONG_PTR *plpOffset);
@@ -350,5 +352,5 @@
 	/////////////////
 	if( UserProc::IsLocalAreaCompiling() ){
-		const Variable *pVar = UserProc::CompilingUserProc().GetLocalVars().Find( Symbol( VarName ) );
+		const Variable *pVar = UserProc::CompilingUserProc().GetLocalVars().Find( LexicalAnalyzer::FullNameToSymbol( VarName ) );
 
 		if( pVar ){
@@ -436,5 +438,5 @@
 		///////////////////
 
-		const Variable *pVar = compiler.GetObjectModule().meta.GetGlobalVars().Find( VarName );
+		const Variable *pVar = compiler.GetObjectModule().meta.GetGlobalVars().Find( LexicalAnalyzer::FullNameToSymbol( VarName ) );
 		if( !pVar ){
 			//一致しないとき
Index: trunk/ab5.0/abdev/BasicCompiler_Common/gc.cpp
===================================================================
--- trunk/ab5.0/abdev/BasicCompiler_Common/gc.cpp	(revision 507)
+++ trunk/ab5.0/abdev/BasicCompiler_Common/gc.cpp	(revision 508)
@@ -8,4 +8,6 @@
 #include "../compiler_x86/opcode.h"
 #endif
+
+using namespace ActiveBasic::Compiler;
 
 void InitGCVariables(void){
@@ -19,5 +21,5 @@
 	///////////////////////////////
 
-	if( compiler.GetObjectModule().meta.GetGlobalVars().Find( Symbol( "_System_gc_StackRoot_StartPtr" ) ) == NULL )
+	if( compiler.GetObjectModule().meta.GetGlobalVars().Find( LexicalAnalyzer::FullNameToSymbol( "_System_gc_StackRoot_StartPtr" ) ) == NULL )
 	{
 		// 未定義の場合は定義する
Index: trunk/ab5.0/abdev/BasicCompiler_Common/include/Compiler.h
===================================================================
--- trunk/ab5.0/abdev/BasicCompiler_Common/include/Compiler.h	(revision 507)
+++ trunk/ab5.0/abdev/BasicCompiler_Common/include/Compiler.h	(revision 508)
@@ -51,5 +51,4 @@
 		: isBuildSuccessful( false )
 		, pObjectModule( new ObjectModule )
-		, pNowObjectModule( pObjectModule )
 		, targetModuleType( Exe )
 		, isDebug( false )
@@ -57,4 +56,5 @@
 		, isCore( false )
 	{
+		SelectObjectModule( *pObjectModule );
 		Symbol::RegistNamespaceSupporter( &namespaceSupporter );
 	}
Index: trunk/ab5.0/abdev/BasicCompiler_Common/include/LexicalAnalyzer.h
===================================================================
--- trunk/ab5.0/abdev/BasicCompiler_Common/include/LexicalAnalyzer.h	(revision 507)
+++ trunk/ab5.0/abdev/BasicCompiler_Common/include/LexicalAnalyzer.h	(revision 508)
@@ -8,4 +8,6 @@
 public:
 	static bool CollectNamespaces( const char *source, NamespaceScopesCollection &namespaceScopesCollection );
+	static Symbol FullNameToSymbol( const char *fullName );
+	static Symbol FullNameToSymbol( const std::string &fullName );
 };
 
Index: trunk/ab5.0/abdev/BasicCompiler_Common/include/Symbol.h
===================================================================
--- trunk/ab5.0/abdev/BasicCompiler_Common/include/Symbol.h	(revision 507)
+++ trunk/ab5.0/abdev/BasicCompiler_Common/include/Symbol.h	(revision 508)
@@ -47,6 +47,4 @@
 	{
 	}
-	Symbol( const char *fullName );
-	Symbol( const string &fullName );
 	Symbol( const Symbol &symbol )
 		: namespaceScopes( symbol.namespaceScopes )
Index: trunk/ab5.0/abdev/BasicCompiler_Common/include/Variable.h
===================================================================
--- trunk/ab5.0/abdev/BasicCompiler_Common/include/Variable.h	(revision 507)
+++ trunk/ab5.0/abdev/BasicCompiler_Common/include/Variable.h	(revision 508)
@@ -59,5 +59,5 @@
 public:
 	Variable( const string &name, const Type &type, bool isConst, bool isRef, const std::string &paramStrForConstructor, bool hasInitData )
-		: Symbol( name )
+		: Symbol( ActiveBasic::Compiler::LexicalAnalyzer::FullNameToSymbol( name ) )
 		, type( type )
 		, isConst( isConst )
Index: trunk/ab5.0/abdev/BasicCompiler_Common/src/LexicalAnalyzer.cpp
===================================================================
--- trunk/ab5.0/abdev/BasicCompiler_Common/src/LexicalAnalyzer.cpp	(revision 507)
+++ trunk/ab5.0/abdev/BasicCompiler_Common/src/LexicalAnalyzer.cpp	(revision 508)
@@ -53,2 +53,16 @@
 	return isSuccessful;
 }
+
+Symbol LexicalAnalyzer::FullNameToSymbol( const char *fullName )
+{
+	char areaName[VN_SIZE] = "";		//オブジェクト変数
+	char nestName[VN_SIZE] = "";		//入れ子メンバ
+	bool isNest = SplitMemberName( fullName, areaName, nestName );
+
+	return Symbol( NamespaceScopes( areaName ), nestName );
+}
+
+Symbol LexicalAnalyzer::FullNameToSymbol( const std::string &fullName )
+{
+	return FullNameToSymbol( fullName.c_str() );
+}
Index: trunk/ab5.0/abdev/BasicCompiler_Common/src/ObjectModule.cpp
===================================================================
--- trunk/ab5.0/abdev/BasicCompiler_Common/src/ObjectModule.cpp	(revision 507)
+++ trunk/ab5.0/abdev/BasicCompiler_Common/src/ObjectModule.cpp	(revision 508)
@@ -49,5 +49,10 @@
 
 #include <Hashmap.h>
+#include <Configuration.h>
+#include <Symbol.h>
+#include <LexicalAnalyzer.h>
+#include <Program.h>
 #include <Compiler.h>
+#include <Debugger.h>
 
 
Index: trunk/ab5.0/abdev/BasicCompiler_Common/src/Symbol.cpp
===================================================================
--- trunk/ab5.0/abdev/BasicCompiler_Common/src/Symbol.cpp	(revision 507)
+++ trunk/ab5.0/abdev/BasicCompiler_Common/src/Symbol.cpp	(revision 508)
@@ -5,25 +5,4 @@
 
 const NamespaceSupporter *Symbol::namespaceSupporter = NULL;
-
-Symbol::Symbol( const char *fullName )
-	: isTargetObjectModule( true )
-{
-	char areaName[VN_SIZE] = "";		//オブジェクト変数
-	char nestName[VN_SIZE] = "";		//入れ子メンバ
-	bool isNest = SplitMemberName( fullName, areaName, nestName );
-
-	namespaceScopes = NamespaceScopes( areaName );
-	name = nestName;
-}
-Symbol::Symbol( const string &fullName )
-	: isTargetObjectModule( true )
-{
-	char areaName[VN_SIZE] = "";		//オブジェクト変数
-	char nestName[VN_SIZE] = "";		//入れ子メンバ
-	bool isNest = SplitMemberName( fullName.c_str(), areaName, nestName );
-
-	namespaceScopes = NamespaceScopes( areaName );
-	name = nestName;
-}
 
 std::string Symbol::GetFullName() const
