0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

2015-09-02 c++ builder XE4 > TDictionaryを使おうとしてひっかかったこと > ilink32 エラー

Last updated at Posted at 2015-09-02
動作確認
C++ Builder XE4

UnityでTDictionaryの存在を知り、それをC++ Builderでも使おうかと考えた。

XE4のヘルプを見ながら実装したところ、以下のエラーが出た。

#include <System.Generics.Collections.hpp> // for TDictionary
...
void __fastcall TForm1::Button2Click(TObject *Sender)
{

	TDictionary__2<String, String> *dic = new TDictionary__2<String, String>(0);

	dic->Add(L"0d", L"CR");
	dic->Add(L"0a", L"LF");

}
エラー
  [ilink32 エラー] Error: 未解決の外部シンボル '__fastcall System::Generics::Collections::TDictionary__2<System::UnicodeString, System::UnicodeString>::TDictionary__2<System::UnicodeString, System::UnicodeString>(int)' が D:\TOOLS\XE4\XXXX_HMRZ1CSVVIEWER\WIN32\DEBUG\MAIN.OBJ から参照されています
  [ilink32 エラー] Error: 未解決の外部シンボル '__fastcall System::Generics::Collections::TDictionary__2<System::UnicodeString, System::UnicodeString>::Add(const System::UnicodeString, const System::UnicodeString)' が D:\TOOLS\XE4\XXXX_HMRZ1CSVVIEWER\WIN32\DEBUG\MAIN.OBJ から参照されています
  [ilink32 エラー] Error: リンクを実行できません

以下において、解決方法が掲示されている。
http://www.gesource.jp/weblog/?p=5949

一方で、
http://stackoverflow.com/questions/10611606/use-tdictionary-in-c-builder-xe2

For C++ code, you should use an STL std::map instead:

というコメントもあるようだ。

mapを使うことにした。

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?