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

Re: [PATCH] Modify mingw_main() workaround to avoid link errors

From
Johannes Sixt <johannes.sixt@telecom.at>
Date
Jul 29, 2008, 08:33 UTC
Message-ID
<1217320426.488ed5ea47384@webmail.nextra.at>
In-Reply-To
<B6158330-640B-4CA3-8589-310FA8EA6CC9@zib.de>
Zitat von Steffen Prohaska <prohaska@zib.de>:
Show 36 quoted lines
>
> On Jul 27, 2008, at 9:24 PM, Johannes Sixt wrote:
>
> > Zitat von Steffen Prohaska <prohaska@zib.de>:
> >
> >>
> >> On Jul 26, 2008, at 10:37 PM, Johannes Sixt wrote:
> >>
> >>> Zitat von Steffen Prohaska <prohaska@zib.de>:
> >>>> With MinGW's
> >>>>
> >>>>  gcc.exe (GCC) 3.4.5 (mingw special)
> >>>>  GNU ld version 2.17.50 20060824
> >>>>
> >>>> the old define caused link errors:
> >>>>
> >>>>  git.o: In function `main':
> >>>>  C:/msysgit/git/git.c:500: undefined reference to `mingw_main'
> >>>>  collect2: ld returned 1 exit status
> >>>>
> >>>> The modified define works.
> >>>
> >>> I have the same tools, but not this error. ???
> >>
> >> I cleaned my work tree and built several times but did not
> >> find out what exactly is causing the error.  So I came up
> >> with the modified define, which declares the static
> >> mingw_main in global scope.  I have no clue why I see the
> >> error that you don't have.
> >
> > Neither do I. But a strange line number you have there. In 01d9b2d
> > (from
> > mingw.git) I have 'exit(1)' in line 500 of git.c.
>
> I have the same in line 500.  I am still wondering what this could
> mean.  But I do not yet now :-(

Can you try 'make -k' and see whether you have a similar problem with the non-builtins that have their own main()?

-- Hannes
Previous: Steffen ProhaskaNext: Steffen Prohaska
Message 18 of 21 in “Modify mingw_main() workaround to avoid link errors”
  1. Modify mingw_main() workaround to avoid link errorsSteffen Prohaska, Jul 26, 2008
  2. Johannes SchindelinJul 26, 2008
  3. Steffen ProhaskaJul 26, 2008
  4. Set up argv0_path correctly, even when argv[0] is just the basenameJohannes Schindelin, Jul 26, 2008
  5. Rene HermanJul 26, 2008
  6. Johannes SchindelinJul 26, 2008
  7. Rene HermanJul 26, 2008
  8. Johannes SchindelinJul 26, 2008
  9. Rene HermanJul 26, 2008
  10. Junio C HamanoJul 26, 2008
  11. Johannes SchindelinJul 26, 2008
  12. Jan HudecAug 3, 2008
  13. Junio C HamanoAug 3, 2008
  14. Johannes SixtJul 26, 2008
  15. Steffen ProhaskaJul 26, 2008
  16. Johannes SixtJul 27, 2008
  17. Steffen ProhaskaJul 29, 2008
  18. Johannes SixtJul 29, 2008
  19. Steffen ProhaskaJul 29, 2008
  20. Johannes SixtAug 3, 2008
  21. Junio C HamanoAug 3, 2008

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.