1

When I compile DLL in C++ Builder with my procedure

 extern "C" __declspec(dllexport) __cdecl void show_m(void)
{
 MessageBox(NULL, "MSG", "COTI DLL", MB_OK |MB_ICONINFORMATION);
}

I can see in depends.exe that name of my procedure is _show_m. How can I remove underscore? (rename procedure inside dll)

Thanx

manlio
  • 18,345
  • 14
  • 76
  • 126
Jacek
  • 59
  • 3
  • 2
    it does depend on the linker (in this case Borland's (uh, Embaracado's)), but most probably it accepts a **module definition file**. by convention those files have filename extension ".def". google up some documentation and examples, and your problem is solved. remember to write up the solution here so others can benefit. tia. ;-) – Cheers and hth. - Alf Mar 01 '13 at 23:43
  • I found how to create .DEF file, and I did it, but I do not know how to use it during DLL compilation or what to do with that. – Jacek Mar 01 '13 at 23:47

1 Answers1

1

I think I found solution. In C++ Builder (Code Gear 2009) I set FALSE to:

Options->C++ Compiller->Output->Generate underscore on sympol names->FALSE

I think we can close topic.

Jacek
  • 59
  • 3
  • 1
    You "close" a question on Stackoverflow by "accepting" an answer. Click the checkmark to the left of this answer. See [About] for more info. – ThinkingStiff Mar 02 '13 at 21:11