RPM Community Forums

Mailing List Message of <popt-devel>

Re: popt with msvc?

From: Jeff Johnson <n3npq@mac.com>
Date: Wed 27 Oct 2010 - 05:27:36 CEST
Message-id: <EE4FBB5D-081A-4FE2-9D02-B9822F73B9F6@mac.com>

On Oct 26, 2010, at 11:20 PM, Matt Arsenault wrote:

> 
> On Oct 25, 2010, at 11:18 PM, Jeff Johnson wrote:
> 
>> 
>> On Oct 25, 2010, at 10:49 PM, Matt Arsenault wrote:
>> 
>>> Has anyone ever gotten popt to build with visual studio? I've been using MinGW, but I need to get it to work with MSVC. I'm trying to link the MinGW build from VS and it's not really working. If not, is there an alternative that does?
>> 
>> What isn't working?
> 
> Mostly I get a lot of linker errors, which seem to be looking for MinGW stuff, such as
> 
> LINK : warning LNK4098: defaultlib 'MSVCRTD' conflicts with use of other libs; use /NODEFAULTLIB:library
> 1>LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library
> 1>libpopt.a(popt.o) : error LNK2019: unresolved external symbol ___mingw_vfprintf referenced in function _fprintf
> 1>libpopt.a(popthelp.o) : error LNK2001: unresolved external symbol ___mingw_vfprintf
> 1>libpopt.a(poptint.o) : error LNK2001: unresolved external symbol ___mingw_vfprintf

Can't help with those symbols.

> 1>libpopt.a(popt.o) : error LNK2019: unresolved external symbol _strtoll referenced in function _poptGetNextOpt
> 1>libpopt.a(popt.o) : error LNK2019: unresolved external symbol ___strtod referenced in function _poptGetNextOpt

Hmm popt mostly doesn't need use strtoll or strtod. The usage case could be finessed out
if necessary. I doubt you would notice ot care.

> 1>libpopt.a(popthelp.o) : error LNK2019: unresolved external symbol ___mingw_vsprintf referenced in function _sprintf
> 
> Since then I've tried getting popt built with visual studio. I've gotten it actually built (mostly by replacing C99 stuff), but about halfway through the tests they start failing.

What test are failing? Like "long long" and double, the tests are quite complete
over data types and It Really Doesn't Matter: hardly ant program needs/uses
long long and double CLI options.

> ______________________________________________________________________
> POPT Library                                           http://rpm5.org
> Developer Communication List                       popt-devel@rpm5.org
Received on Wed Oct 27 05:28:10 2010
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.