NO

Author Topic: beginner question  (Read 4447 times)

FreeThought

  • Guest
beginner question
« on: February 27, 2007, 01:20:46 PM »
I coded a dll as plugin, and used sprintf to convert it to string to print it using MessageBox. now , on loading my plugin , it output a message looking for pocrt.dll, I added the pocrt.lib but have no luck,however, if i add the pocrt.dll  to my application folder , it works fine. any advice. thanks.

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2096
beginner question
« Reply #1 on: February 27, 2007, 03:07:45 PM »
You have to recompile your application specifying to use the lib instead of DLL. To do this go in project->options->compiler->runtime library and choose single or multithreaded (LIB) instead of (DLL).
It is better to be hated for what you are than to be loved for what you are not. - Andre Gide

FreeThought

  • Guest
beginner question
« Reply #2 on: February 27, 2007, 03:42:22 PM »
Thanks for the respond, and I apologize for not  making my self clear, I want to compile the plugin as dll, and not as lib.I am just coding the plugin only.

Great, you are always helpful, problem solved.truly appreciated your help.

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2096
beginner question
« Reply #3 on: February 28, 2007, 11:48:39 AM »
I too will try to be more clear: to avoid that your dll asks for the pocrt.dll on loading you have to tell the compiler to link the static version of pocrt (that is single or multithreaded lib, which means static, version of pocrt), not change your project from dll to lib (see picture).
It is better to be hated for what you are than to be loved for what you are not. - Andre Gide