DLL 위치에서 EXE 안에있는 여러 함수를 호출해야합니다. 또한 DLL에서 EXE 내부에있는 일부 변수에 액세스해야합니다. 아래는 오류 목록입니다. 아마 전혀 도움이되지 않지만 어쨌든 첨부했습니다. .def 파일과 dllimport 및 추가 종속성을 사용하여 반대 (exe-> dll)를 수행했습니다. 그리고, 지금 나는 다른 길을 필요로 붙어있다. 참고 : 마이크로 * t Visual Studio 2008 pro, Standard-C.DLL 내부에서 EXE 함수 호출
3>sv_bot.obj : error LNK2019: 未解決の外部シンボル _SV_GentityNum が関数 _SV_BotAllocateClient で参照されました。 3>sv_bot.obj : error LNK2001: 外部シンボル "_svs" は未解決です。 3>sv_bot.obj : error LNK2001: 外部シンボル "_sv_maxclients" は未解決です。 3>sv_bot.obj : error LNK2001: 外部シンボル "_botlib_export" は未解決です。 3>sv_bot.obj : error LNK2019: 未解決の外部シンボル _Cvar_Get が関数 _BotDrawDebugPolygons で参照されました。 3>sv_bot.obj : error LNK2019: 未解決の外部シンボル _SV_Trace が関数 _BotImport_Trace で参照されました。 3>sv_bot.obj : error LNK2019: 未解決の外部シンボル _SV_ClipToEntity が関数 _BotImport_EntityTrace で参照されました。 3>sv_bot.obj : error LNK2019: 未解決の外部シンボル _SV_PointContents が関数 _BotImport_PointContents で参照されました。 3>sv_bot.obj : error LNK2019: 未解決の外部シンボル _SV_inPVS が関数 _BotImport_inPVS で参照されました。 3>sv_bot.obj : error LNK2019: 未解決の外部シンボル _CM_EntityString が関数 _BotImport_BSPEntityData で参照されました。 3>sv_bot.obj : error LNK2019: 未解決の外部シンボル _CM_ModelBounds が関数 _BotImport_BSPModelMinsMaxsOrigin で参照されました。 3>sv_bot.obj : error LNK2019: 未解決の外部シンボル _CM_InlineModel が関数 _BotImport_BSPModelMinsMaxsOrigin で参照されました。 3>sv_bot.obj : error LNK2019: 未解決の外部シンボル _Z_TagMalloc が関数 _BotImport_GetMemory で参照されました。 3>sv_bot.obj : error LNK2019: 未解決の外部シンボル _Z_Free が関数 _BotImport_FreeMemory で参照されました。 3>sv_bot.obj : error LNK2019: 未解決の外部シンボル _Hunk_Alloc が関数 _BotImport_HunkAlloc で参照されました。 3>sv_bot.obj : error LNK2019: 未解決の外部シンボル _Hunk_CheckMark が関数 _BotImport_HunkAlloc で参照されました。 3>sv_bot.obj : error LNK2019: 未解決の外部シンボル _SV_ExecuteClientCommand が関数 _BotClientCommand で参照されました。 3>sv_bot.obj : error LNK2019: 未解決の外部シンボル _VM_Call が関数 _SV_BotFrame で参照されました。 3>sv_bot.obj : error LNK2001: 外部シンボル "_gvm" は未解決です。 2> ライブラリ ..\..\build\quake3_release\ioquake3.lib とオブジェクト ..\..\build\quake3_release\ioquake3.exp を作成中 3>sv_bot.obj : error LNK2019: 未解決の外部シンボル _GetBotLibAPI が関数 _SV_BotInitBotLib で参照されました。 3>sv_bot.obj : error LNK2019: 未解決の外部シンボル _FS_Seek が関数 _SV_BotInitBotLib で参照されました。 3>sv_bot.obj : error LNK2019: 未解決の外部シンボル _FS_FCloseFile が関数 _SV_BotInitBotLib で参照されました。 3>sv_bot.obj : error LNK2019: 未解決の外部シンボル _FS_Write が関数 _SV_BotInitBotLib で参照されました。 3>sv_bot.obj : error LNK2019: 未解決の外部シンボル _FS_Read2 が関数 _SV_BotInitBotLib で参照されました。 3>sv_bot.obj : error LNK2019: 未解決の外部シンボル _FS_FOpenFileByMode が関数 _SV_BotInitBotLib で参照されました。 3>sv_bot.obj : error LNK2019: 未解決の外部シンボル _Z_AvailableMemory が関数 _SV_BotInitBotLib で参照されました。 3>sv_bot.obj : error LNK2019: 未解決の外部シンボル _Z_Malloc が関数 _SV_BotInitBotLib で参照されました。 3>sv_bot.obj : error LNK2019: 未解決の外部シンボル _Cvar_VariableIntegerValue が関数 _SV_BotInitBotLib で参照されました。 3>..\..\build\game_release\qagamex86.dll : fatal error LNK1120: 外部参照 28 が未解決です。 2>LINK : warning LNK4098: defaultlib 'LIBCMT' は他のライブラリの使用と競合しています。/NODEFAULTLIB:library を使用してください。 3>ビルドログは "file://c:\Documents and Settings\yasir\デスクトップ\ioquake3dev\ioquake3dev - sandbox\build\game_release\BuildLog.htm" に保存されました。 3>game - エラー 29、警告 0 2>LINK : warning LNK4199: /DELAYLOAD:OleAcc.dll は無視されます。OleAcc.dll にインポートがありません。 2>cm_patch.obj : error LNK2019: 未解決の外部シンボル _BotDrawDebugPolygons が関数 _CM_DrawDebugSurface で参照されました。 2>sv_client.obj : error LNK2019: 未解決の外部シンボル _SV_BotFreeClient が関数 _SV_DropClient で参照されました。 2>sv_game.obj : error LNK2001: 外部シンボル "_SV_BotFreeClient" は未解決です。 2>sv_game.obj : error LNK2019: 未解決の外部シンボル _SV_BotGetConsoleMessage が関数 _SV_GameSystemCalls で参照されました。 2>sv_game.obj : error LNK2019: 未解決の外部シンボル _SV_BotGetSnapshotEntity が関数 _SV_GameSystemCalls で参照されました。 2>sv_game.obj : error LNK2019: 未解決の外部シンボル _SV_BotLibShutdown が関数 _SV_GameSystemCalls で参照されました。 2>sv_game.obj : error LNK2019: 未解決の外部シンボル _SV_BotLibSetup が関数 _SV_GameSystemCalls で参照されました。 2>sv_game.obj : error LNK2019: 未解決の外部シンボル _BotImport_DebugPolygonDelete が関数 _SV_GameSystemCalls で参照されました。 2>sv_game.obj : error LNK2019: 未解決の外部シンボル _BotImport_DebugPolygonCreate が関数 _SV_GameSystemCalls で参照されました。 2>sv_game.obj : error LNK2019: 未解決の外部シンボル _SV_BotAllocateClient が関数 _SV_GameSystemCalls で参照されました。 2>sv_game.obj : error LNK2001: 外部シンボル "_bot_enable" は未解決です。 2>sv_init.obj : error LNK2019: 未解決の外部シンボル _SV_BotFrame が関数 _SV_SpawnServer で参照されました。 2>sv_main.obj : error LNK2001: 外部シンボル "_SV_BotFrame" は未解決です。 2>sv_init.obj : error LNK2019: 未解決の外部シンボル _SV_BotInitBotLib が関数 _SV_Init で参照されました。 2>sv_init.obj : error LNK2019: 未解決の外部シンボル _SV_BotInitCvars が関数 _SV_Init で参照されました。 2>..\..\build\quake3_release\ioquake3.exe : fatal error LNK1120: 外部参照 13 が未解決です。 2>ビルドログは "file://c:\Documents and Settings\yasir\デスクトップ\ioquake3dev\ioquake3dev - sandbox\build\quake3_release\BuildLog.htm" に保存されました。 2>quake3 - エラー 16、警告 2 ========== ビルド: 0 正常終了、2 失敗、2 更新不要、1 スキップ ==========
DLL에서 직접 호출하는 대신 기본 .exe의 함수에 함수 포인터를 전달하지 않는 이유는 무엇입니까? 그렇게하면 프로그램에서 "단단 결합"도 줄일 수 있습니다. – Lundin