ホーム » 2021 » 3月 » 19

日別アーカイブ: 2021/03/19

2021年3月
 123456
78910111213
14151617181920
21222324252627
28293031  

カテゴリー

アーカイブ

ブログ統計情報

  • 80,214 アクセス



C2084: 既に本体を持っています

共通のコードを hxx にまとめてビルドすると…

------ ビルド開始: プロジェクト: G3toM, 構成: Debug Win32 ------
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\VC\VCTargets\Platforms\Win32\PlatformToolsets\v141_xp\Toolset.targets(39,5): warning MSB8051: Windows XP をターゲットとするサポートは非推奨であり、Visual Studio の将来のリリースで提供されなくなります。詳細については、https://go.microsoft.com/fwlink/?linkid=2023588 をご覧ください。
MainFrm.cpp
t:\develop\_.src\__win\c_fbx_to.hxx(23): error C2084: 関数 'bool exec_FBXtoG3(c_tstring &)' は既に本体を持っています。
t:\develop\_.src\__win\c_fbx_to.hxx(22): note: 'exec_FBXtoG3' の以前の定義を確認してください
t:\develop\_.src\__win\c_fbx_to.hxx(61): error C2084: 関数 'tstring call_fbx_to_ig3(c_tstring &)' は既に本体を持っています。
t:\develop\_.src\__win\c_fbx_to.hxx(60): note: 'call_fbx_to_ig3' の以前の定義を確認してください
t:\develop\_.src\__win\c_fbx_to.hxx(66): error C2065: 'exec_FBXtoG3': 定義されていない識別子です。
t:\develop\_.src\__win\c_fbx_to.hxx(74): error C2065: 'exec_FBXtoG3': 定義されていない識別子です。
\\z170s0\e_temp\test.prj\test\vc_test\tomb\g3tom\mainfrm.cpp(276): error C2065: 'call_fbx_to_ig3': 定義されていない識別子です。
\\z170s0\e_temp\test.prj\test\vc_test\tomb\g3tom\mainfrm.cpp(276): error C2440: '初期化中': 'tstring (__cdecl *)(c_tstring &)' から 'std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t>>' に変換できません。
\\z170s0\e_temp\test.prj\test\vc_test\tomb\g3tom\mainfrm.cpp(276): note: コンストラクターはソース型を持てません、またはコンストラクターのオーバーロードの解決があいまいです。
プロジェクト "G3toM141.vcxproj" のビルドが終了しました -- 失敗。
========== ビルド: 0 正常終了、1 失敗、1 更新不要、0 スキップ ==========

C2084: 関数 'bool exec_FBXtoG3(c_tstring &)' は既に本体を持っています。
「inline にしているのに…」と思ったが,
#pragma once がないため複数回読み込まれていたので,追加して対応.

//	*******************************************************************************
//	Name	:	c_fbx_to.hxx
//	...
//	*******************************************************************************

#pragma		once    

#include	"W_mutex.hxx"
//	...

inline	bool	exec_FBXtoG3	(c_tstring& g3d_path)
{
//	...
	return	true ;
	}
Is this 投稿 useful? Useful Useless 0 of 1 people say this 投稿 is useful.