Index: trunk/abdev/BasicCompiler_Common/BasicCompiler.cpp
===================================================================
--- trunk/abdev/BasicCompiler_Common/BasicCompiler.cpp	(revision 293)
+++ trunk/abdev/BasicCompiler_Common/BasicCompiler.cpp	(revision 294)
@@ -778,11 +778,32 @@
 	}
 
-	//インクルードディレクトリが指定されなかったとき
-	if(szIncludeDir[0]=='\0'){
-		lstrcpy(szIncludeDir,".\\Include\\");
-	}
-
-	//インクルードディレクトリを絶対パスに変更
-	GetFullPath(szIncludeDir,(Jenga::Common::Environment::GetAppDir()+"\\").c_str());
+	{
+		// カレントディレクトリを取得
+		char currentDirPath[MAX_PATH];
+		GetCurrentDirectory( MAX_PATH, currentDirPath );
+		if( currentDirPath[lstrlen(currentDirPath)-1] != '\\' )
+		{
+			lstrcat( currentDirPath, "\\" );
+		}
+
+		// インクルードディレクトリが指定されなかったとき
+		if(szIncludeDir[0]=='\0'){
+			lstrcpy(szIncludeDir,".\\Include\\");
+
+			// インクルードディレクトリを絶対パスに変更
+			GetFullPath(szIncludeDir,(Jenga::Common::Environment::GetAppDir()+"\\").c_str());
+		}
+		else
+		{
+			// インクルードディレクトリを絶対パスに変更
+			GetFullPath(szIncludeDir,currentDirPath);
+		}
+
+		// ソースファイル名を絶対パスに変換
+		GetFullPath(SourceFileName,currentDirPath);
+
+		// 出力ファイル名を絶対パスに変換
+		GetFullPath(OutputFileName,currentDirPath);
+	}
 
 	if( compiler.IsDll() ){
Index: trunk/abdev/BasicCompiler_Common/Intermediate_Step1.cpp
===================================================================
--- trunk/abdev/BasicCompiler_Common/Intermediate_Step1.cpp	(revision 293)
+++ trunk/abdev/BasicCompiler_Common/Intermediate_Step1.cpp	(revision 294)
@@ -1,5 +1,3 @@
 #include "stdafx.h"
-
-#include <jenga/include/common/Path.h>
 
 #include <jenga/include/smoothie/Smoothie.h>
@@ -256,9 +254,14 @@
 				compiler.staticLibraryFilePaths.push_back( temporary );
 
-				compiler.staticLibraries.push_back( new ObjectModule() );
-
-				Jenga::Common::Path path( temporary );
-				CompileMessage( ((string)"\"" + path.GetFileName() + path.GetExt() + "\" を読み込みました。").c_str() );
-				compiler.staticLibraries.back()->Read( temporary );
+				for(;;i2++){
+					if(basbuf[i2]=='\n'||basbuf[i2]=='\0') break;
+				}
+				SlideString(basbuf+i2,i-i2);
+			}
+			else if( lstrcmpi( temporary, "_core" ) == 0 )
+			{
+				// #_core
+				// コアモジュール
+				compiler.SetCoreMark( true );
 
 				for(;;i2++){
Index: trunk/abdev/BasicCompiler_Common/MakeExe.cpp
===================================================================
--- trunk/abdev/BasicCompiler_Common/MakeExe.cpp	(revision 293)
+++ trunk/abdev/BasicCompiler_Common/MakeExe.cpp	(revision 294)
@@ -2,4 +2,5 @@
 
 #include <jenga/include/smoothie/Smoothie.h>
+#include <jenga/include/common/Path.h>
 
 #include <Compiler.h>
@@ -130,4 +131,38 @@
 
 	StepCompileProgress();
+
+
+	/////////////////////////////////////////////////////////////////
+	// 静的リンクライブラリをロードする
+	/////////////////////////////////////////////////////////////////
+
+	if( !compiler.IsCore() )
+	{
+		// コアモジュールをロードする
+		extern BOOL bDebugCompile;
+		extern char szIncludeDir[MAX_PATH];
+
+		const char *coreFileName = "core.lib";
+		if( bDebugCompile )
+		{
+			coreFileName = "cored.lib";
+		}
+
+		char coreFilePath[MAX_PATH];
+		sprintf( coreFilePath, "..\\lib\\%s", coreFileName );
+		GetFullPath( coreFilePath, szIncludeDir );
+
+		compiler.staticLibraries.push_back( new ObjectModule() );
+		compiler.staticLibraries.back()->Read( coreFilePath );
+	}
+
+	BOOST_FOREACH( const std::string &filePath, compiler.staticLibraryFilePaths )
+	{
+		compiler.staticLibraries.push_back( new ObjectModule() );
+		compiler.staticLibraries.back()->Read( filePath );
+
+		Jenga::Common::Path path( filePath );
+		CompileMessage( ((string)"\"" + path.GetFileName() + path.GetExt() + "\" を読み込みました。").c_str() );
+	}
 
 
Index: trunk/abdev/BasicCompiler_Common/include/Compiler.h
===================================================================
--- trunk/abdev/BasicCompiler_Common/include/Compiler.h	(revision 293)
+++ trunk/abdev/BasicCompiler_Common/include/Compiler.h	(revision 294)
@@ -24,4 +24,5 @@
 		, pNowObjectModule( pObjectModule )
 		, targetModuleType( Exe )
+		, isCore( false )
 	{
 	}
@@ -110,4 +111,16 @@
 
 
+	// コアモジュールかどうか
+	bool isCore;
+	void SetCoreMark( bool isCore )
+	{
+		this->isCore = isCore;
+	}
+	bool IsCore() const
+	{
+		return isCore;
+	}
+
+
 	static bool StringToType( const std::string &typeName, Type &type );
 	static const std::string TypeToString( const Type &type );
Index: trunk/abdev/BasicCompiler_Common/src/Source.cpp
===================================================================
--- trunk/abdev/BasicCompiler_Common/src/Source.cpp	(revision 293)
+++ trunk/abdev/BasicCompiler_Common/src/Source.cpp	(revision 294)
@@ -815,6 +815,6 @@
 
 	// basic.sbpをインクルード
-	const char *headCode = "#include <basic.sbp>\n";
-	//const char *headCode = "\n";
+	//const char *headCode = "#include <basic.sbp>\n";
+	const char *headCode = "";
 	Realloc( length + lstrlen(headCode) );
 	Text::SlideString( buffer, lstrlen(headCode) );
