PDA

View Full Version : undefined reference to `__imp_callui ' I can not my knowledge


Dmytro
November 24th, 2015, 06:03

Good evening! I compile a plugin for IDA. The error occurs like this:

   In function `vmsg (char const *, char *) ':
   [Linker error] C: /IDA/idasdk66/include/kernwin.hpp: 3914: undefined reference to `__imp_callui '

This code


This code

THREAD_SAFE AS_PRINTF (1, 0) inline int vmsg (const char * format, va_list va)
{
  return callui (ui_msg, format, va) .i;
}

What is it? What's this I see? I can not understand what it is callui ??

I saw two o'clock code. This callui much, very much! However, it is not clear that it can an object, because there is a point
so can not be, it is as if the function! Or something else, though?

I could not find him beginning, end or somewhere in the code it predobyavlennja callui !!

I can not my knowledge. Please, what is it?

The problem is most likely that a certain library needs to be added to your project which is actually missing.



Like me, my IDA whether all libraries? Maybe is not all that is needed for a well-ins? How can I verify that the correct kit for the entire IDA plugin?



Віндовс ХР 32.    Компілятор TDM-GSS 4.7.1 32-bit

Project->Project Options-> компілятор С++  -DWIN32 -D__NT__ -D__IDP__ -v -mrtd
Linker   ../IDA/idasdk66/lib/x86_win_gcc_32/ida.a
*-Wl, - Dll -shared


Project Options-> Files / Directories> header files> C: \ IDA \ idasdk66 \ include
reassign the output file name PL2.plw


There are many people here probably skillfully write plug-ins? Can someone instructions exactly how he does it? I ask you to write, it would be good. All steps in detail described.
    This will allow to compare and understand.

<div style="margin:20px; margin-top:5px"><div class="smallfont" style="margin-bottom:2px">Code:</div><pre class="alt2" style="margin:0px; padding:6px; border:solid 1px; width:90%; height:80px; overflow:auto"><div dir="ltr" style="text-align:left;">//#define memicmp _memicmp

#include &lt;ida.hpp&gt;
#include &lt;idp.hpp&gt;
#include &lt;loader.hpp&gt;
int IDAP_init(void)
{
// &#1059; &#1095;&#1077;&#1082;&#1080; &#1090;&#1091;&#1090;, &#1097;&#1086;&#1073; &#1075;&#1072;&#1088;&#1072;&#1085;&#1090;&#1091;&#1074;&#1072;&#1090;&#1080;, &#1097;&#1086; &#1042;&#1072;&#1096; &#1087;&#1083;&#1072;&#1075;&#1110;&#1085; &#1074;&#1080;&#1082;&#1086;&#1088;&#1080;&#1089;&#1090;&#1086;&#1074;&#1091;&#1108;&#1090;&#1100;&#1089;&#1103; &#1074;
// &#1057;&#1077;&#1088;&#1077;&#1076;&#1091; &#1074;&#1086;&#1085;&#1072; &#1073;&#1091;&#1083;&#1072; &#1085;&#1072;&#1087;&#1080;&#1089;&#1072;&#1085;&#1072; &#1076;&#1083;&#1103;. &#1055;&#1086;&#1074;&#1077;&#1088;&#1085;&#1091;&#1090;&#1080;&#1089;&#1103; PLUGIN_SKIP &#1103;&#1082;&#1097;&#1086;
// &#1055;&#1077;&#1088;&#1077;&#1074;&#1110;&#1088;&#1103;&#1108; &#1073;&#1077;&#1079;&#1091;&#1089;&#1087;&#1110;&#1096;&#1085;&#1080;&#1084;&#1080;, &#1074; &#1110;&#1085;&#1096;&#1086;&#1084;&#1091; &#1074;&#1080;&#1087;&#1072;&#1076;&#1082;&#1091; &#1087;&#1086;&#1074;&#1077;&#1088;&#1085;&#1091;&#1090;&#1080;&#1089;&#1103; PLUGIN_KEEP.
return PLUGIN_KEEP;
}
void IDAP_term(void)
{
// // &#1052;&#1072;&#1090;&#1077;&#1088;&#1110;&#1072;&#1083;, &#1097;&#1086;&#1073; &#1079;&#1088;&#1086;&#1073;&#1080;&#1090;&#1080; &#1087;&#1088;&#1080; &#1074;&#1080;&#1093;&#1086;&#1076;&#1110;, &#1103;&#1082; &#1087;&#1088;&#1072;&#1074;&#1080;&#1083;&#1086;, &#1074;&#1080; &#1073; &#1087;&#1086;&#1089;&#1090;&#1072;&#1074;&#1080;&#1074; &#1103;&#1082;&#1080;&#1081;&#1089;&#1100;
// &#1063;&#1080;&#1089;&#1090;&#1080;&#1093; &#1074;&#1075;&#1086;&#1088;&#1091; &#1088;&#1086;&#1073;&#1086;&#1095;&#1080;&#1093; &#1084;&#1110;&#1089;&#1094;&#1100; &#1090;&#1091;&#1090;.
 return;
}
// &#1055;&#1083;&#1072;&#1075;&#1110;&#1085; &#1084;&#1086;&#1078;&#1077; &#1073;&#1091;&#1090;&#1080; &#1087;&#1088;&#1080;&#1081;&#1085;&#1103;&#1090;&#1080;&#1081; &#1094;&#1110;&#1083;&#1080;&#1081; &#1072;&#1088;&#1075;&#1091;&#1084;&#1077;&#1085;&#1090; &#1074;&#1110;&#1076; plugins.cfg
// file. &#1060;&#1072;&#1081;&#1083;. &#1062;&#1077; &#1084;&#1086;&#1078;&#1077; &#1073;&#1091;&#1090;&#1080; &#1082;&#1086;&#1088;&#1080;&#1089;&#1085;&#1086;, &#1082;&#1086;&#1083;&#1080; &#1074;&#1080; &#1093;&#1086;&#1095;&#1077;&#1090;&#1077; &#1086;&#1076;&#1080;&#1085; &#1087;&#1083;&#1072;&#1075;&#1110;&#1085;, &#1097;&#1086;&#1073; &#1079;&#1088;&#1086;&#1073;&#1080;&#1090;&#1080;
// &#1065;&#1086;&#1089;&#1100; &#1110;&#1085;&#1096;&#1077; &#1079;&#1072;&#1083;&#1077;&#1078;&#1085;&#1086; &#1074;&#1110;&#1076; &#1075;&#1072;&#1088;&#1103;&#1095;&#1086;&#1075;&#1086; &#1082;&#1083;&#1102;&#1095;&#1072; &#1072;&#1073;&#1086; &#1084;&#1077;&#1085;&#1102; &#1085;&#1072;&#1090;&#1080;&#1089;&#1085;&#1091;&#1090;&#1072;
// &#1054;&#1073;&#1088;&#1072;&#1085;&#1080;&#1081; &#1077;&#1083;&#1077;&#1084;&#1077;&#1085;&#1090;.
void IDAP_run(int arg)
{
// &quot;&#1052;'&#1103;&#1089;&#1086;&quot; &#1079; &#1074;&#1072;&#1096;&#1086;&#1075;&#1086; &#1087;&#1083;&#1072;&#1075;&#1110;&#1085;&#1072;
msg(&quot;Hello world!&quot;
 return;
}
// &#1030;&#1089;&#1085;&#1091;&#1108; &#1085;&#1077; &#1090;&#1072;&#1082; &#1073;&#1072;&#1075;&#1072;&#1090;&#1086; &#1074;&#1080;&#1082;&#1086;&#1088;&#1080;&#1089;&#1090;&#1086;&#1074;&#1091;&#1074;&#1072;&#1090;&#1080; &#1076;&#1083;&#1103; &#1094;&#1080;&#1093;, &#1072;&#1083;&#1077; &#1103; &#1074;&#1089;&#1077; &#1086;&#1076;&#1085;&#1086; &#1111;&#1093; &#1074;&#1089;&#1090;&#1072;&#1085;&#1086;&#1074;&#1080;&#1090;&#1080;.
char IDAP_comment[] = &quot;This is my test plug-in&quot;;
char IDAP_help[] = &quot;My plugin&quot;;
// &#1030;&#1084;'&#1103; &#1087;&#1083;&#1072;&#1075;&#1110;&#1085; &#1074;&#1110;&#1076;&#1086;&#1073;&#1088;&#1072;&#1078;&#1072;&#1108;&#1090;&#1100;&#1089;&#1103; &#1074; &#1084;&#1077;&#1085;&#1102; &#1055;&#1088;&#1072;&#1074;&#1082;&#1072;&gt; Plugins. &#1042;&#1110;&#1085; &#1084;&#1086;&#1078;&#1077; &#1073;&#1091;&#1090;&#1080; &#1089;&#1082;&#1072;&#1089;&#1086;&#1074;&#1072;&#1085;&#1077;
//  &#1091; &#1092;&#1072;&#1081;&#1083;&#1110; plugins.cfg &#1082;&#1086;&#1088;&#1080;&#1089;&#1090;&#1091;&#1074;&#1072;&#1095;&#1072;.
char IDAP_name[] = &quot;My plugin&quot;;
// &#1043;&#1072;&#1088;&#1103;&#1095;&#1072; &#1082;&#1083;&#1072;&#1074;&#1110;&#1096;&#1072; &#1082;&#1086;&#1088;&#1080;&#1089;&#1090;&#1091;&#1074;&#1072;&#1095; &#1084;&#1086;&#1078;&#1077; &#1074;&#1080;&#1082;&#1086;&#1088;&#1080;&#1089;&#1090;&#1086;&#1074;&#1091;&#1074;&#1072;&#1090;&#1080; &#1076;&#1083;&#1103; &#1079;&#1072;&#1087;&#1091;&#1089;&#1082;&#1091; &#1087;&#1083;&#1072;&#1075;&#1110;&#1085;&#1072;.
char IDAP_hotkey[] = &quot;Alt-X&quot;;
// The all-important exported PLUGIN object &#1042;&#1089;&#1110; &#1074;&#1072;&#1078;&#1083;&#1080;&#1074;&#1110; &#1077;&#1082;&#1089;&#1087;&#1086;&#1088;&#1090;&#1091;&#1108;&#1090;&#1100;&#1089;&#1103; &#1086;&#1073;'&#1108;&#1082;&#1090; &#1087;&#1083;&#1072;&#1075;&#1110;&#1085;&#1072;
plugin_t PLUGIN =
{
 IDP_INTERFACE_VERSION, // &#1052;&#1040;&#1056; &#1074;&#1077;&#1088;&#1089;&#1110;&#1103; &#1087;&#1083;&#1072;&#1075;&#1110;&#1085;&#1072; &#1085;&#1072;&#1087;&#1080;&#1089;&#1072;&#1085;&#1080;&#1081; &#1076;&#1083;&#1103;
 0, // Flags (see below)&#1055;&#1088;&#1072;&#1087;&#1086;&#1088;&#1080; (&#1089;&#1084; &#1085;&#1080;&#1078;&#1095;&#1077;
 IDAP_init, // Initialisation function &#1060;&#1091;&#1085;&#1082;&#1094;&#1110;&#1103; &#1110;&#1085;&#1110;&#1094;&#1110;&#1072;&#1083;&#1110;&#1079;&#1072;&#1094;&#1110;&#1111;
 IDAP_term, // Clean-up function &#1054;&#1095;&#1080;&#1097;&#1077;&#1085;&#1085;&#1103; &#1092;&#1091;&#1085;&#1082;&#1094;&#1110;&#1103;
 IDAP_run, // Main plug-in body  &#1043;&#1086;&#1083;&#1086;&#1074;&#1085;&#1072; &#1079;&#1085;&#1110;&#1084;&#1085;&#1086;&#1075;&#1086; &#1082;&#1086;&#1088;&#1087;&#1091;&#1089;&#1091;
 IDAP_comment, // &#1050;&#1086;&#1084;&#1077;&#1085;&#1090;&#1072;&#1088; - &#1085;&#1077; &#1074;&#1080;&#1082;&#1086;&#1088;&#1080;&#1089;&#1090;&#1086;&#1074;&#1091;&#1108;&#1090;&#1100;&#1089;&#1103;
 IDAP_help, // &#1071;&#1082; &#1110; &#1074;&#1080;&#1097;&#1077; - &#1085;&#1077; &#1074;&#1080;&#1082;&#1086;&#1088;&#1080;&#1089;&#1090;&#1086;&#1074;&#1091;&#1108;&#1090;&#1100;&#1089;&#1103;
 IDAP_name, // &#1055;&#1083;&#1072;&#1075;&#1110;&#1085; &#1110;&#1084;'&#1103; &#1087;&#1086;&#1082;&#1072;&#1079;&#1072;&#1085;&#1086; &#1074; 
// Edit-&gt;Plugins menu   &#1042;&#1080;&#1087;&#1088;&#1072;&#1074;&#1083;&#1077;&#1085;&#1085;&#1103;&gt; &#1084;&#1077;&#1085;&#1102; &#1055;&#1083;&#1072;&#1075;&#1110;&#1085;&#1080;
 IDAP_hotkey // Hot key to run the plug-in &#1043;&#1072;&#1088;&#1103;&#1095;&#1072; &#1082;&#1083;&#1072;&#1074;&#1110;&#1096;&#1072; &#1076;&#1083;&#1103; &#1079;&#1072;&#1087;&#1091;&#1089;&#1082;&#1091; &#1087;&#1083;&#1072;&#1075;&#1110;&#1085;&#1072; &#1074;
};
</div></pre></div>



g++.exe g++.exe C:\V2\g++.exe Dll: No such file or directory. 


A talking about this error compiling? I did not even imagine it?