-Msmartalloc link problem on Win32

Hi,

I am using pgf90 7.1-5 on Win32 (not SUA or SFA) and try to compile and linke with -Msmartalloc. Almost all routines are compiled with:

pgf90 -Msmartalloc -tp=core2 -Munix […] -c <files.f>

When linking the program, using -Msmartalloc, I get the following error:

libcmt.lib(calloc.obj) : error LNK2005: _calloc already defined in pgmalloc.lib(pgmalloc.dll)
libcmt.lib(realloc.obj) : error LNK2005: _realloc already defined in pgmalloc.lib(pgmalloc.dll)

Both libraries seem to contain calloc() and realloc().

libcmt has to be used (I have tried -nodefaultlib=libcmt.lib), and pgmalloc.dll too.

Is there a possibility to use -Msmartalloc on Win32 at all? Without that option, compiling and linking is no problem.

Regards,

Uwe

Hi Uwe,


Please compile and link with -Bdynamic. -Msmartalloc must be linked dynamically.

Hongyon

Hi Hongyon,

o.k., thanks. I though that dynamic linking is default if I do not use -Bstatic.

Best,

Uwe