Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.arch.embedded > #30946

Re: Makefile or IDE?

From David Brown <david.brown@hesbynett.no>
Newsgroups comp.arch.embedded
Subject Re: Makefile or IDE?
Date 2021-12-05 13:16 +0100
Organization A noiseless patient Spider
Message-ID <soiai4$jsa$1@dont-email.me> (permalink)
References (1 earlier) <cPf*AdQAy@news.chiark.greenend.org.uk> <soe26m$78i$1@reader1.panix.com> <7ugnqgpgu34hb8gvhsglse4e49dj5anhjd@4ax.com> <soglu6$bm9$1@dont-email.me> <soi67k.1pc.1@stefan.msgid.phost.de>

Show all headers | View raw


On 05/12/2021 11:02, Stefan Reuther wrote:
> Am 04.12.2021 um 22:17 schrieb David Brown:
>> On 04/12/2021 20:53, George Neuner wrote:
>>> On Fri, 3 Dec 2021 21:28:54 -0000 (UTC), Grant Edwards
>>>> I always had good luck using Cygwin and gnu "make" on Windows to run
>>>> various Win32 .exe command line compilers (e.g. IAR). I (thankfully)
>>>> haven't needed to do that for several years now...
>>>
>>> The problem with Cygwin is it doesn't play well with native Windows
>>> GCC (MingW et al).  
> [...]
>> I concur with that.  Cygwin made sense long ago, but for the past couple
>> of decades the mingw-based alternatives have been more appropriate for
>> most uses of *nix stuff on Windows.  In particular, Cygwin is a thick
>> compatibility layer that has its own filesystem, process management, and
>> other features to fill in the gaps where Windows doesn't fulfil the
>> POSIX standards (or does so in a way that plays badly with the rest of
>> Windows).
> 
> The problem is that both projects, Cygwin and MinGW/MSYS, provide much
> more than just a compiler, and in an incompatible way, which is probably
> incompatible with what your toolchain does, and incompatible with what
> Visual Studio does.

Neither Cygwin nor msys are compilers or toolchains.  Nor is MSVS, for
that matter.  That would only be a problem if you misunderstood what
they are.

> 
> "-Ic:\test" specifies one path name for Windows, but probably two for a
> toolchain with Unix heritage, where ":" is the separator, not a drive
> letter. Cygwin wants "-I/cygdrive/c" instead, (some versions of) MinGW
> want "-I/c". That, on the other hand, might be an option "-I" followed
> by an option "/c" for a toolchain with Windows heritage.
> 

Drive letters on Windows have always been a PITA.  Usually, IME, it is
not a big issue for compilation - most of your include directories will
be on the same drive you are working in (with "system" includes already
handled by the compiler configuration).  Use a makefile, make the base
part a variable, then at most you only have to change one part.  It's a
good idea anyway to have things like base paths to includes as a
variable in the makefile.

One of the differences between msys and cygwin is the way they handle
paths - msys has a method that is simpler and closer to Windows, while
cygwin is a bit more "alien" but supports more POSIX features (like
links).  In practice, with programs compiled for the "mingw" targets you
can usually use Windows names and paths without further ado.  On my
Windows systems, I put msys2's "/usr/bin" directory on my normal PATH,
and from the standard Windows command prompt I happily use make, grep,
less, cp, ssh, and other *nix tools without problems or special
consideration.


> The problem domain is complex, therefore solutions need to be complex.
> 
> That aside, I found staying within one universe ("use all from Cygwin",
> "use all from MinGW") to work pretty well; when having to call into
> another universe (e.g. native Win32), be careful to not use, for
> example, any absolute paths.
> 
> 
>   Stefan
> 

Back to comp.arch.embedded | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Makefile or IDE? pozz <pozzugno@gmail.com> - 2021-12-02 12:46 +0100
  Re: Makefile or IDE? Grant Edwards <invalid@invalid.invalid> - 2021-12-02 15:22 +0000
    Re: Makefile or IDE? pozz <pozzugno@gmail.com> - 2021-12-02 17:34 +0100
      Re: Makefile or IDE? Tauno Voipio <tauno.voipio@notused.fi.invalid> - 2021-12-03 13:15 +0200
  Re: Makefile or IDE? Don Y <blockedofcourse@foo.invalid> - 2021-12-02 09:48 -0700
  Re: Makefile or IDE? Stefan Reuther <stefan.news@arcor.de> - 2021-12-02 17:34 +0100
    Re: Makefile or IDE? pozz <pozzugno@gmail.com> - 2021-12-03 11:49 +0100
      Re: Makefile or IDE? Stefan Reuther <stefan.news@arcor.de> - 2021-12-03 18:27 +0100
    Re: Makefile or IDE? George Neuner <gneuner2@comcast.net> - 2021-12-04 14:37 -0500
  Re: Makefile or IDE? Theo <theom+news@chiark.greenend.org.uk> - 2021-12-03 20:51 +0000
    Re: Makefile or IDE? Grant Edwards <invalid@invalid.invalid> - 2021-12-03 21:28 +0000
      Re: Makefile or IDE? George Neuner <gneuner2@comcast.net> - 2021-12-04 14:53 -0500
        Re: Makefile or IDE? David Brown <david.brown@hesbynett.no> - 2021-12-04 22:17 +0100
          Re: Makefile or IDE? Stefan Reuther <stefan.news@arcor.de> - 2021-12-05 11:02 +0100
            Re: Makefile or IDE? David Brown <david.brown@hesbynett.no> - 2021-12-05 13:16 +0100
        Re: Makefile or IDE? Grant Edwards <invalid@invalid.invalid> - 2021-12-06 13:52 +0000
          Re: Makefile or IDE? chris <chris-nospam@tridac.net> - 2021-12-17 17:19 +0000
  Re: Makefile or IDE? pozz <pozzugno@gmail.com> - 2021-12-03 23:48 +0100
    Re: Makefile or IDE? Stefan Reuther <stefan.news@arcor.de> - 2021-12-04 10:31 +0100
      Re: Makefile or IDE? pozz <pozzugno@gmail.com> - 2021-12-04 16:23 +0100
        Re: Makefile or IDE? David Brown <david.brown@hesbynett.no> - 2021-12-04 17:41 +0100
          Re: Makefile or IDE? Tauno Voipio <tauno.voipio@notused.fi.invalid> - 2021-12-04 18:49 +0200
            Re: Makefile or IDE? David Brown <david.brown@hesbynett.no> - 2021-12-04 18:23 +0100
              Re: Makefile or IDE? Tauno Voipio <tauno.voipio@notused.fi.invalid> - 2021-12-04 21:25 +0200
                Re: Makefile or IDE? David Brown <david.brown@hesbynett.no> - 2021-12-04 22:20 +0100
                Re: Makefile or IDE? Grant Edwards <invalid@invalid.invalid> - 2021-12-06 13:51 +0000
                Re: Makefile or IDE? David Brown <david.brown@hesbynett.no> - 2021-12-06 16:33 +0100
                Re: Makefile or IDE? Grant Edwards <invalid@invalid.invalid> - 2021-12-06 16:02 +0000
          Re: Makefile or IDE? pozz <pozzugno@gmail.com> - 2021-12-09 11:54 +0100
            Re: Makefile or IDE? Hans-Bernhard Bröker <HBBroeker@t-online.de> - 2021-12-10 18:35 +0100
              Re: Makefile or IDE? David Brown <david.brown@hesbynett.no> - 2021-12-10 19:44 +0100
                Re: Makefile or IDE? pozz <pozzugno@gmail.com> - 2021-12-11 16:18 +0100
                Re: Makefile or IDE? David Brown <david.brown@hesbynett.no> - 2021-12-11 17:06 +0100
                Re: Makefile or IDE? Grant Edwards <invalid@invalid.invalid> - 2021-12-11 16:57 +0000
                Re: Makefile or IDE? Hans-Bernhard Bröker <HBBroeker@t-online.de> - 2021-12-11 18:53 +0100
                Re: Makefile or IDE? David Brown <david.brown@hesbynett.no> - 2021-12-12 14:15 +0100
              Re: Makefile or IDE? Stefan Reuther <stefan.news@arcor.de> - 2021-12-11 10:01 +0100
                Re: Makefile or IDE? Hans-Bernhard Bröker <HBBroeker@t-online.de> - 2021-12-11 18:47 +0100
                Re: Makefile or IDE? Stefan Reuther <stefan.news@arcor.de> - 2021-12-12 11:27 +0100
        Re: Makefile or IDE? Stefan Reuther <stefan.news@arcor.de> - 2021-12-05 11:11 +0100
          Re: Makefile or IDE? David Brown <david.brown@hesbynett.no> - 2021-12-05 13:21 +0100
  Re: Makefile or IDE? Dave Nadler <drn@nadler.com> - 2021-12-06 15:45 -0500
  Re: Makefile or IDE? pozz <pozzugno@gmail.com> - 2021-12-09 10:43 +0100
  Re: Makefile or IDE? Johann Klammer <klammerj@NOSPAM.a1.net> - 2021-12-10 09:30 +0100
  Re: Makefile or IDE? chris <chris-nospam@tridac.net> - 2021-12-17 17:27 +0000
    Re: Makefile or IDE? StateMachineCOM <statemachineguru@gmail.com> - 2021-12-20 17:18 -0800
      Re: Makefile or IDE? chris <chris-nospam@tridac.net> - 2021-12-21 16:45 +0000
      Re: Makefile or IDE? Jim Jackson <jj@franjam.org.uk> - 2021-12-21 17:40 +0000
        Re: Makefile or IDE? StateMachineCOM <statemachineguru@gmail.com> - 2021-12-21 10:55 -0800

csiph-web