Board index » cppbuilder » Unresolved external '___org__msize'

Unresolved external '___org__msize'

Hi ,

 Heres a funny linker problem that I found. If you use the function _msize and you compile the code by ticking the
Build with Runtime packages and you Untick the Use Dynamic RTL box you get
[Linker Error] Unresolved external '___org__msize' referenced from C:\PROGRAM FILES\BORLAND\CBUILDER6\LIB\CG32.LIB|_msize

If you untick both Build with Runtime packages and Use Dynamic RTL then you get
[Linker Error] Unresolved external '__msize' referenced from C:\PROGRAM FILES\BORLAND\CBUILDER6\PROJECTS\UNIT1.OBJ

heres some example code (Just create a new application and stick this in the Constructtor :
#include <malloc.h>

__fastcall TForm1::TForm1(TComponent* Owner)
  : TForm(Owner)
{

  BYTE* pbData;
  if (pbData=(BYTE *)malloc(1000))
  {
    DWORD dwSize = _msize(pbData);
    ShowMessage("dwSize = " + IntToStr(dwSize));
  }

Quote
}

any ideas why I cannot have this option by linking in all my dlls ?? or is there another way to detirmine the Block size that was used created in the heap with malloc ?

Thanks

 

Re:Unresolved external '___org__msize'


Try enabling multi-tasking.

I do not remember offhand if you can switch a project from single to
multi-tasking.  You may have to create a new project to try it.

.  Ed

Quote
>  ...If you use the function _msize and you compile the
> code by ticking the Build with Runtime packages and
> you Untick the Use Dynamic RTL box you get
> [Linker Error] Unresolved external '___org__msize'
> referenced from
> C:\PROGRAM FILES\BORLAND\CBUILDER6\LIB\CG32.LIB|_msize

> If you untick both Build with Runtime packages and Use
> Dynamic RTL then you get [Linker Error] Unresolved
> external '__msize' ...

Other Threads