git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 1/4] MSVC: Fix an "unresolved symbol" linker error on cygwin

From
Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Date
Nov 4, 2009, 20:20 UTC
Message-ID
<4AF1E1FD.1050102@ramsay1.demon.co.uk>
In-Reply-To
<7veiogt4g8.fsf@alter.siamese.dyndns.org>
Junio C Hamano wrote:
> How does Cygwin-ness of the build environment affect the end result when
> you build with MSVC?

Not at all. This is an MSVC/NO_MMAP combo problem. (The "problem" also exists with the msvc build on msysGit[1])

Show 5 quoted lines
>                      I am not a Windows person, so I am only guessing,
> but I suspect that the result does not pull any library nor crt0 from what
> people usually consider "Cygwin environment".  It feels that the "default
> configuration of Cygwin" that insists on NO_MMAP is the guilty party here.
> 
See patch #3.
> Shouldn't this be solved by teaching the Makefile about this new "Cygwin
> but using MSVC as compiler toolchain" combination?
Yes. Err... see patch #3 :-P
Show 5 quoted lines
> [Footnote]
> 
> *1* Notice "if" at the beginning of this sentence---I am not qualified to
> make a judgement without help from area experts here.  Is it a sane thing
> to run Cygwin and still use MSVC as the compiler toolchain?
About as sane as running msysGit and still use MSVC as the compiler! :D
>  Is it
> commonly done?  I have no idea.
> 

Nor me. I just tried it, and it works (after applying these patches!); for exactly the same reason, and to the same extent, that it works on msysGit.

[Footnote] *1* I admit to sometimes being a bit sloppy with naming (and maybe confused also!). Now, IIUC, MinGW is basically gcc + binutils, MSYS is bash + some unix tools and msysGit is MinGW + MSYS + some additional packages needed to build and run git (eg perl). So, the "MinGW build" should really be called the msysGit build ;-) (but the config section specifically picks out the MINGW string from uname_S) Also, the "msvc build on MinGW" should really be the "msvc build on msysGit". Or something like that!

ATB, Ramsay Jones

Previous: Junio C HamanoNext: Johannes Sixt
Message 4 of 8 in “MSVC: Fix an "unresolved symbol" linker error on cygwin”
  1. 1/4 MSVC: Fix an "unresolved symbol" linker error on cygwinRamsay Jones, Oct 27, 2009
  2. Johannes SixtNov 3, 2009
  3. Junio C HamanoNov 3, 2009
  4. Ramsay JonesNov 4, 2009
  5. Johannes SixtNov 5, 2009
  6. Junio C HamanoNov 5, 2009
  7. Ramsay JonesNov 4, 2009
  8. Johannes SixtNov 5, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.