Hello Greg,

2010/7/16 Greg Peele <aerovec...@hotmail.com>:
> I've been taking MinGW-w64 TDM-GCC 4.5 for a spin on my company's code and I
> ran into a problem compiling a third party dependency: CppUnit 1.12.  Looks
> like MinGW defines __STDC_SECURE_LIB__ which causes CppUnit to use sprintf_s
> instead of sprintf (and similar functions).  However, prototypes for these
> functions aren't visible unless I explicitly define MINGW_HAS_SECURE_API.
> Once that's done, CppUnit compiles but doesn't link due to unresolved
> symbols for sprintf_s and friends.  After having some fun with nm and grep I
> gave up because I couldn't figure out which library contained these guys.
> Am I missing something or should I just modify CppUnit to only use these
> functions for MSVC?  Personally I don't ever use them but I try to avoid
> changes to third party code if possible.
> Greg Peele

Yes, the secured API isn't provided in msvcrt's import, as it is not
necessarily part of it. So you need to use msvcr80.dll or higher. We
don't provide the .def files for it at the moment, but you can use the
'gendef' tool to generate such an import library for it (see our crt
Makefile to see how DLL import libraries can be generated by a .def
file).

Regards,
Kai


-- 
|  (\_/) This is Bunny. Copy and paste
| (='.'=) Bunny into your signature to help
| (")_(") him gain world domination

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to