|
From: | Sisyphus |
Subject: | Re: 4.1.3 and mpfr |
Date: | Fri, 07 May 2004 17:09:02 +1000 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030313 |
Kevin Ryde wrote:
Sisyphus <address@hidden> writes:So ... I repeated the same procedure with GMP-4.1.3. Everything still works fine with MinGW, but with VC 7, when I build an mpfr app, I get the errors pertaining to '_alloca'.I think _alloca may live in libgcc, which would not be a normal part of an ms c link. We're using gcc __builtin_alloca, or should be, I guess that comes out as a libgcc call. I don't know what one is meant to do for that when mixing gcc and ms. I'll add a note to the manual if anyone can say. Presumably it affects any program using __builtin_alloca and mixing gcc and ms c though.
Yes - the above info led me to a solution. I went into my MinGW/lib/gcc-lib/mingw32/3.2.3/ directory and copied 'libgcc.a' to my VC7/lib folder, renaming the file to 'libgcc.lib' in the process.
I can now build the test program I supplied in my original post with: cl test.c libmpfr.lib libgmp.lib libc.lib msvcrt.lib libgcc.libI don't know if that is "what one is meant to do" - seems a bit of a rough hack to me ... but then I guess the whole exercise of taking gcc stuff and using it with VC7 is pretty much a "rough hack", anyway :-)
Compilation produces no warnings and the resultant exe runs fine - no need to mess around with other build options.
Usually I find that simply renaming a '.a' file to '.lib' fails to work ... but not *this* time.
Linking to this 'libgcc.lib' also means that I can dispense with the headers relating to 'strcasecmp' and 'strncasecmp'.
Thanks again, Kevin. Cheers, Rob --Any emails containing attachments will be deleted from my ISP's mail server before I even get to see them. If you wish to email me an attachment, please provide advance warning so that I can make the necessary arrangements.
[Prev in Thread] | Current Thread | [Next in Thread] |