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


Groups > comp.lang.c > #70600 > unrolled thread

Compiling C project for Windows and Mac OS X (GCC for Linux)

Started by"Morten W. Petersen" <morphex@gmail.com>
First post2015-09-16 06:18 +0200
Last post2015-09-17 17:06 +0200
Articles 20 on this page of 138 — 21 participants

Back to article view | Back to comp.lang.c


Contents

  Compiling C project for Windows and Mac OS X (GCC for Linux) "Morten W. Petersen" <morphex@gmail.com> - 2015-09-16 06:18 +0200
    Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Ian Collins <ian-news@hotmail.com> - 2015-09-16 17:06 +1200
      Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Noob <root@127.0.0.1> - 2015-09-16 08:00 +0200
        Re: Compiling C project for Windows and Mac OS X (GCC for Linux) David Brown <david.brown@hesbynett.no> - 2015-09-16 09:00 +0200
          Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-09-16 02:03 -0700
            Re: Compiling C project for Windows and Mac OS X (GCC for Linux) David Brown <david.brown@hesbynett.no> - 2015-09-16 11:20 +0200
              Re: Compiling C project for Windows and Mac OS X (GCC for Linux) "Morten W. Petersen" <morphex@gmail.com> - 2015-09-16 13:08 +0200
                Re: Compiling C project for Windows and Mac OS X (GCC for Linux) David Brown <david.brown@hesbynett.no> - 2015-09-16 13:26 +0200
                  Re: Compiling C project for Windows and Mac OS X (GCC for Linux) "Morten W. Petersen" <morphex@gmail.com> - 2015-09-16 17:47 +0200
                    Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-09-16 09:37 -0700
                      Re: Compiling C project for Windows and Mac OS X (GCC for Linux) "Morten W. Petersen" <morphex@gmail.com> - 2015-09-17 15:41 +0200
                        Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-09-17 07:06 -0700
                          Re: Compiling C project for Windows and Mac OS X (GCC for Linux) "Morten W. Petersen" <morphex@gmail.com> - 2015-09-17 16:22 +0200
                    Re: Compiling C project for Windows and Mac OS X (GCC for Linux) David Brown <david.brown@hesbynett.no> - 2015-09-16 23:13 +0200
                      Re: Compiling C project for Windows and Mac OS X (GCC for Linux) "Morten W. Petersen" <morphex@gmail.com> - 2015-09-17 15:35 +0200
                Re: Compiling C project for Windows and Mac OS X (GCC for Linux) jacobnavia <jacob@jacob.remcomp.fr> - 2015-09-16 18:12 +0200
              Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Noob <root@127.0.0.1> - 2015-09-16 13:18 +0200
                Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Keith Thompson <kst-u@mib.org> - 2015-09-16 08:47 -0700
                  Re: Quoting Noob <root@127.0.0.1> - 2015-09-16 20:30 +0200
                    Re: Quoting Keith Thompson <kst-u@mib.org> - 2015-09-16 11:41 -0700
                      Re: Quoting Noob <root@127.0.0.1> - 2015-09-16 20:53 +0200
                        Re: Quoting Keith Thompson <kst-u@mib.org> - 2015-09-16 12:19 -0700
                          Re: Quoting Noob <root@127.0.0.1> - 2015-09-16 21:49 +0200
                            Re: Quoting Keith Thompson <kst-u@mib.org> - 2015-09-16 13:24 -0700
              Re: Compiling C project for Windows and Mac OS X (GCC for Linux) jacobnavia <jacob@jacob.remcomp.fr> - 2015-09-16 18:14 +0200
                Re: Compiling C project for Windows and Mac OS X (GCC for Linux) "Morten W. Petersen" <morphex@gmail.com> - 2015-09-16 18:22 +0200
                  Re: Compiling C project for Windows and Mac OS X (GCC for Linux) jacobnavia <jacob@jacob.remcomp.fr> - 2015-09-16 18:29 +0200
                    Re: Compiling C project for Windows and Mac OS X (GCC for Linux) "Morten W. Petersen" <morphex@gmail.com> - 2015-09-16 18:31 +0200
                      Re: Compiling C project for Windows and Mac OS X (GCC for Linux) James Kuyper <jameskuyper@verizon.net> - 2015-09-16 12:48 -0400
                        Re: Compiling C project for Windows and Mac OS X (GCC for Linux) "Morten W. Petersen" <morphex@gmail.com> - 2015-09-16 18:56 +0200
                          Re: Compiling C project for Windows and Mac OS X (GCC for Linux) James Kuyper <jameskuyper@verizon.net> - 2015-09-16 13:09 -0400
                            Re: Compiling C project for Windows and Mac OS X (GCC for Linux) "Morten W. Petersen" <morphex@gmail.com> - 2015-09-16 23:41 +0200
                              Re: Compiling C project for Windows and Mac OS X (GCC for Linux) James Kuyper <jameskuyper@verizon.net> - 2015-09-16 18:05 -0400
                          Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Martin Shobe <martin.shobe@yahoo.com> - 2015-09-16 12:13 -0500
                          Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-09-16 10:13 -0700
                          Re: Compiling C project for Windows and Mac OS X (GCC for Linux) fir <profesor.fir@gmail.com> - 2015-09-16 14:01 -0700
                        Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-09-16 10:02 -0700
                      Re: Compiling C project for Windows and Mac OS X (GCC for Linux) fir <profesor.fir@gmail.com> - 2015-09-16 13:53 -0700
                    Re: Compiling C project for Windows and Mac OS X (GCC for Linux) fir <profesor.fir@gmail.com> - 2015-09-16 14:10 -0700
                  Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Keith Thompson <kst-u@mib.org> - 2015-09-16 10:33 -0700
                    Re: Compiling C project for Windows and Mac OS X (GCC for Linux) "Morten W. Petersen" <morphex@gmail.com> - 2015-09-16 19:40 +0200
                      Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Martin Shobe <martin.shobe@yahoo.com> - 2015-09-16 12:50 -0500
                        Re: Compiling C project for Windows and Mac OS X (GCC for Linux) "Morten W. Petersen" <morphex@gmail.com> - 2015-09-16 19:55 +0200
                      Re: Compiling C project for Windows and Mac OS X (GCC for Linux) James Kuyper <jameskuyper@verizon.net> - 2015-09-16 13:57 -0400
                      Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Keith Thompson <kst-u@mib.org> - 2015-09-16 11:02 -0700
                  Re: Hidden agendas on Usenet Noob <root@127.0.0.1> - 2015-09-16 20:50 +0200
                    Re: Hidden agendas on Usenet Keith Thompson <kst-u@mib.org> - 2015-09-16 12:20 -0700
                      Re: Hidden agendas on Usenet "Morten W. Petersen" <morphex@gmail.com> - 2015-09-16 23:33 +0200
                        Re: Hidden agendas on Usenet James Kuyper <jameskuyper@verizon.net> - 2015-09-16 17:52 -0400
                          Re: Hidden agendas on Usenet "Morten W. Petersen" <morphex@gmail.com> - 2015-09-17 00:03 +0200
                            Re: Hidden agendas on Usenet Keith Thompson <kst-u@mib.org> - 2015-09-16 15:21 -0700
                              Re: Hidden agendas on Usenet "Morten W. Petersen" <morphex@gmail.com> - 2015-09-17 00:30 +0200
                                Re: Hidden agendas on Usenet Richard Heathfield <rjh@cpax.org.uk> - 2015-09-17 00:26 +0100
                              Re: Hidden agendas on Usenet Geoff <geoff@invalid.invalid> - 2015-09-16 21:24 -0700
                                Re: Hidden agendas on Usenet Richard Heathfield <rjh@cpax.org.uk> - 2015-09-17 05:48 +0100
                                  Re: Hidden agendas on Usenet Geoff <geoff@invalid.invalid> - 2015-09-17 07:16 -0700
                                    Re: Hidden agendas on Usenet Richard Heathfield <rjh@cpax.org.uk> - 2015-09-17 17:00 +0100
                                      Re: Hidden agendas on Usenet Keith Thompson <kst-u@mib.org> - 2015-09-17 11:23 -0700
                                MSVC deprecation (was Re: Hidden agendas on Usenet) Keith Thompson <kst-u@mib.org> - 2015-09-16 23:31 -0700
                                  Re: MSVC deprecation (was Re: Hidden agendas on Usenet) Geoff <geoff@invalid.invalid> - 2015-09-17 07:33 -0700
                            Re: Hidden agendas on Usenet David Brown <david.brown@hesbynett.no> - 2015-09-17 11:46 +0200
                            Re: Hidden agendas on Usenet Ian Collins <ian-news@hotmail.com> - 2015-09-17 22:26 +1200
                              Re: Hidden agendas on Usenet gazelle@shell.xmission.com (Kenny McCormack) - 2015-09-17 11:17 +0000
                                Re: Hidden agendas on Usenet David Brown <david.brown@hesbynett.no> - 2015-09-17 13:33 +0200
                                  Re: Hidden agendas on Usenet "Morten W. Petersen" <morphex@gmail.com> - 2015-09-17 13:56 +0200
                                    Re: Hidden agendas on Usenet David Brown <david.brown@hesbynett.no> - 2015-09-17 14:20 +0200
                                      Re: Hidden agendas on Usenet Bartc <bc@freeuk.com> - 2015-09-17 13:28 +0100
                                        Re: Hidden agendas on Usenet David Brown <david.brown@hesbynett.no> - 2015-09-17 15:18 +0200
                                          Re: Hidden agendas on Usenet gazelle@shell.xmission.com (Kenny McCormack) - 2015-09-17 13:34 +0000
                                      Re: Hidden agendas on Usenet gazelle@shell.xmission.com (Kenny McCormack) - 2015-09-17 12:29 +0000
                                      Re: Hidden agendas on Usenet Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-09-17 05:34 -0700
                                      Re: Hidden agendas on Usenet "Morten W. Petersen" <morphex@gmail.com> - 2015-09-17 14:48 +0200
                                        Re: Hidden agendas on Usenet James Kuyper <jameskuyper@verizon.net> - 2015-09-17 08:52 -0400
                                    Re: Hidden agendas on Usenet James Kuyper <jameskuyper@verizon.net> - 2015-09-17 08:50 -0400
                                      Re: Hidden agendas on Usenet gazelle@shell.xmission.com (Kenny McCormack) - 2015-09-17 12:57 +0000
                                    Re: Hidden agendas on Usenet Richard Heathfield <rjh@cpax.org.uk> - 2015-09-17 13:52 +0100
                                  Re: Hidden agendas on Usenet fir <profesor.fir@gmail.com> - 2015-09-17 07:13 -0700
                                    Re: Hidden agendas on Usenet fir <profesor.fir@gmail.com> - 2015-09-17 07:42 -0700
                                      Re: Hidden agendas on Usenet fir <profesor.fir@gmail.com> - 2015-09-17 07:55 -0700
                                        Re: Hidden agendas on Usenet fir <profesor.fir@gmail.com> - 2015-09-18 05:51 -0700
                    Re: Hidden agendas on Usenet James Kuyper <jameskuyper@verizon.net> - 2015-09-16 16:27 -0400
                    Re: Hidden agendas on Usenet David Brown <david.brown@hesbynett.no> - 2015-09-16 23:35 +0200
                      Re: Hidden agendas on Usenet Richard Heathfield <rjh@cpax.org.uk> - 2015-09-17 00:36 +0100
                        Re: Hidden agendas on Usenet "Morten W. Petersen" <morphex@gmail.com> - 2015-09-17 08:09 +0200
                          Re: Hidden agendas on Usenet Richard Heathfield <rjh@cpax.org.uk> - 2015-09-17 07:59 +0100
                          Re: Hidden agendas on Usenet Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-09-17 01:13 -0700
                            Re: Hidden agendas on Usenet "Morten W. Petersen" <morphex@gmail.com> - 2015-09-17 13:08 +0200
                Re: Compiling C project for Windows and Mac OS X (GCC for Linux) David Brown <david.brown@hesbynett.no> - 2015-09-16 23:22 +0200
                  Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Richard Damon <Richard@Damon-Family.org> - 2015-09-17 08:57 -0400
                    Re: Compiling C project for Windows and Mac OS X (GCC for Linux) David Brown <david.brown@hesbynett.no> - 2015-09-17 15:28 +0200
                      Re: Compiling C project for Windows and Mac OS X (GCC for Linux) James Kuyper <jameskuyper@verizon.net> - 2015-09-17 09:45 -0400
                      Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Richard Damon <Richard@Damon-Family.org> - 2015-09-17 22:56 -0400
                        Re: Compiling C project for Windows and Mac OS X (GCC for Linux) David Brown <david.brown@hesbynett.no> - 2015-09-18 10:19 +0200
                      Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Robert Wessel <robertwessel2@yahoo.com> - 2015-09-17 23:01 -0500
                        Re: Compiling C project for Windows and Mac OS X (GCC for Linux) David Brown <david.brown@hesbynett.no> - 2015-09-18 10:20 +0200
                          Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Richard Heathfield <rjh@cpax.org.uk> - 2015-09-18 09:23 +0100
                            Re: Compiling C project for Windows and Mac OS X (GCC for Linux) David Brown <david.brown@hesbynett.no> - 2015-09-18 14:08 +0200
                            Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Keith Thompson <kst-u@mib.org> - 2015-09-18 08:48 -0700
                          Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Lowell Gilbert <lgusenet@be-well.ilk.org> - 2015-09-18 16:44 -0400
                            Re: Compiling C project for Windows and Mac OS X (GCC for Linux) James Kuyper <jameskuyper@verizon.net> - 2015-09-18 17:33 -0400
                              Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Lowell Gilbert <lgusenet@be-well.ilk.org> - 2015-09-19 21:12 -0400
                      Re: Compiling C project for Windows and Mac OS X (GCC for Linux) raltbos@xs4all.nl (Richard Bos) - 2015-09-21 09:10 +0000
                        Re: Compiling C project for Windows and Mac OS X (GCC for Linux) gazelle@shell.xmission.com (Kenny McCormack) - 2015-09-21 09:16 +0000
            Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Keith Thompson <kst-u@mib.org> - 2015-09-16 08:34 -0700
              Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-09-16 09:33 -0700
                Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Keith Thompson <kst-u@mib.org> - 2015-09-16 10:43 -0700
                  Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-09-16 12:29 -0700
                    Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Keith Thompson <kst-u@mib.org> - 2015-09-16 13:10 -0700
                      Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-09-16 13:42 -0700
                        Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Keith Thompson <kst-u@mib.org> - 2015-09-16 14:04 -0700
                          Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-09-16 14:34 -0700
                            Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Keith Thompson <kst-u@mib.org> - 2015-09-16 15:01 -0700
                              Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Richard Damon <Richard@Damon-Family.org> - 2015-09-16 22:26 -0400
                                Re: Compiling C project for Windows and Mac OS X (GCC for Linux) jacobnavia <jacob@jacob.remcomp.fr> - 2015-09-17 13:46 +0200
                                  Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Richard Heathfield <rjh@cpax.org.uk> - 2015-09-17 12:48 +0100
                                    Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Philip Lantz <prl@canterey.us> - 2015-09-19 12:40 -0700
                                  Re: Compiling C project for Windows and Mac OS X (GCC for Linux) raltbos@xs4all.nl (Richard Bos) - 2015-09-21 09:14 +0000
                                    Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-09-21 06:13 -0700
                                      Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-09-21 17:39 +0100
                                      Re: Compiling C project for Windows and Mac OS X (GCC for Linux) raltbos@xs4all.nl (Richard Bos) - 2015-10-02 13:21 +0000
                                      Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Keith Thompson <kst-u@mib.org> - 2015-10-02 13:25 -0700
                                        Re: Compiling C project for Windows and Mac OS X (GCC for Linux) raltbos@xs4all.nl (Richard Bos) - 2015-10-04 13:51 +0000
                                          Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Keith Thompson <kst-u@mib.org> - 2015-10-04 15:45 -0700
                              Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Geoff <geoff@invalid.invalid> - 2015-09-16 21:39 -0700
                    Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Richard Heathfield <rjh@cpax.org.uk> - 2015-09-17 00:42 +0100
                      Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Kelsey Bjarnason <kbjarnason@gmail.com> - 2015-09-24 07:34 -0700
                    Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Robert Wessel <robertwessel2@yahoo.com> - 2015-09-16 23:55 -0500
                Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Robert Wessel <robertwessel2@yahoo.com> - 2015-09-16 13:03 -0500
        Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Ian Collins <ian-news@hotmail.com> - 2015-09-16 19:31 +1200
          Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Noob <root@127.0.0.1> - 2015-09-16 11:06 +0200
            Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Ian Collins <ian-news@hotmail.com> - 2015-09-16 21:17 +1200
              Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Noob <root@127.0.0.1> - 2015-09-16 11:56 +0200
                Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Keith Thompson <kst-u@mib.org> - 2015-09-16 08:59 -0700
                  Re: "gcc" on OS X Noob <root@127.0.0.1> - 2015-09-16 21:43 +0200
                    Re: "gcc" on OS X Keith Thompson <kst-u@mib.org> - 2015-09-16 13:20 -0700
                Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Ian Collins <ian-news@hotmail.com> - 2015-09-17 08:25 +1200
                Re: Compiling C project for Windows and Mac OS X (GCC for Linux) gazelle@shell.xmission.com (Kenny McCormack) - 2015-09-17 11:21 +0000
                  Re: gcc not a symlink on Mac OS X Noob <root@127.0.0.1> - 2015-09-17 17:06 +0200

Page 1 of 7  [1] 2 3 4 5 6 7  Next page →


#70600 — Compiling C project for Windows and Mac OS X (GCC for Linux)

From"Morten W. Petersen" <morphex@gmail.com>
Date2015-09-16 06:18 +0200
SubjectCompiling C project for Windows and Mac OS X (GCC for Linux)
Message-ID<mtaqif$50r$1@speranza.aioe.org>
Hi there.

I'm inching along on my XML project here:

https://github.com/morphex/smash_xml

Now I've started dabbling around with Valgrind, and I'm also looking for
ways to compile "natively" on Windows (currently using Cygwin GCC) as
well as Mac OS X.

The first thing I'm looking for is something that is simple to setup
and maintain, that is there isn't a lot to learn or a lot of work to
make other compiler suites compile with similar results as what a make
with the Makefile that's already there does on Linux.

Later on it would probably be good to support different IDEs and
compiler suites, but for now something that is freely available (free
is better but gratis is OK) and produces good executables is better.

Any thoughts and suggestions here?

Do I need to get a computer with Mac OS x to compile and test there,
or are there alternatives?

Regards,

Morten

[toc] | [next] | [standalone]


#70601

FromIan Collins <ian-news@hotmail.com>
Date2015-09-16 17:06 +1200
Message-ID<d5sbmhF884kU16@mid.individual.net>
In reply to#70600
Morten W. Petersen wrote:
> Hi there.
>
> I'm inching along on my XML project here:
>
> https://github.com/morphex/smash_xml
>
> Now I've started dabbling around with Valgrind, and I'm also looking for
> ways to compile "natively" on Windows (currently using Cygwin GCC) as
> well as Mac OS X.

The obvious question is why?

If it builds with gcc on one platform, it will build with gcc on 
another.  On Mac at least, gcc (Clang in disguise) is native.

-- 
Ian Collins

[toc] | [prev] | [next] | [standalone]


#70602

FromNoob <root@127.0.0.1>
Date2015-09-16 08:00 +0200
Message-ID<mtb0eh$ulf$1@dont-email.me>
In reply to#70601
On 16/09/2015 07:06, Ian Collins wrote:

> If it builds with gcc on one platform, it will build with gcc on 
> another.  On Mac at least, gcc (Clang in disguise) is native.

At the risk of stating the obvious, clang in disguise is not gcc.
(It is true that compatibility with gcc is a stated goal.)
http://clang.llvm.org/compatibility.html

Regards

[toc] | [prev] | [next] | [standalone]


#70604

FromDavid Brown <david.brown@hesbynett.no>
Date2015-09-16 09:00 +0200
Message-ID<mtb3ug$8ul$1@dont-email.me>
In reply to#70602
On 16/09/15 08:00, Noob wrote:
> On 16/09/2015 07:06, Ian Collins wrote:
> 
>> If it builds with gcc on one platform, it will build with gcc on 
>> another.  On Mac at least, gcc (Clang in disguise) is native.
> 
> At the risk of stating the obvious, clang in disguise is not gcc.
> (It is true that compatibility with gcc is a stated goal.)
> http://clang.llvm.org/compatibility.html
> 

This can be summed up with:

Use a modern C or C++ standard.  Write valid code.
Use appropriate headers for your vector functions.
Don't use weird Apple-only extensions to gcc.
In fact, don't use Apple's weird Objective-C at all.


That does not sound too difficult.

[toc] | [prev] | [next] | [standalone]


#70615

FromMalcolm McLean <malcolm.mclean5@btinternet.com>
Date2015-09-16 02:03 -0700
Message-ID<6dd2d227-fd27-4616-b1a5-049c7e3c37cb@googlegroups.com>
In reply to#70604
On Wednesday, September 16, 2015 at 8:00:27 AM UTC+1, David Brown wrote:
>
> This can be summed up with:
> 
> Use a modern C or C++ standard.  Write valid code.
> Use appropriate headers for your vector functions.
> Don't use weird Apple-only extensions to gcc.
> In fact, don't use Apple's weird Objective-C at all.
> 
A modern C++ standard is fine.
If you're writing in C, you must use a conservative subset of C89.
Otherwise it will break on Microsoft compilers.

You should also consider writing your own standard library string
functions - Microsoft has deprecated them, but not the identical
function with a my prefix.

[toc] | [prev] | [next] | [standalone]


#70619

FromDavid Brown <david.brown@hesbynett.no>
Date2015-09-16 11:20 +0200
Message-ID<mtbc58$4j4$1@dont-email.me>
In reply to#70615
On 16/09/15 11:03, Malcolm McLean wrote:
> On Wednesday, September 16, 2015 at 8:00:27 AM UTC+1, David Brown wrote:
>>
>> This can be summed up with:
>>
>> Use a modern C or C++ standard.  Write valid code.
>> Use appropriate headers for your vector functions.
>> Don't use weird Apple-only extensions to gcc.
>> In fact, don't use Apple's weird Objective-C at all.
>>
> A modern C++ standard is fine.
> If you're writing in C, you must use a conservative subset of C89.
> Otherwise it will break on Microsoft compilers.

The issue here was for compatibility between clang and gcc.

But if you need compatibility with MS's feeble offerings in C, then yes,
you need to pick a limited version of C90 or C89, and have a set of
wrappers for library functions that MS implements in a different way or
has declared to be "unsafe" and therefore not immediately available.
But the code will be compatible between gcc and clang - the issues there
are with things like subtle changes to the meaning of "inline" (with the
default -std setting), which is not an issue with C89/C90 code.

> 
> You should also consider writing your own standard library string
> functions - Microsoft has deprecated them, but not the identical
> function with a my prefix.
> 

[toc] | [prev] | [next] | [standalone]


#70629

From"Morten W. Petersen" <morphex@gmail.com>
Date2015-09-16 13:08 +0200
Message-ID<mtbiio$p08$1@speranza.aioe.org>
In reply to#70619
On 16.09.2015 11:20, David Brown wrote:
> On 16/09/15 11:03, Malcolm McLean wrote:
>> On Wednesday, September 16, 2015 at 8:00:27 AM UTC+1, David Brown wrote:
>>>
>>> This can be summed up with:
>>>
>>> Use a modern C or C++ standard.  Write valid code.
>>> Use appropriate headers for your vector functions.
>>> Don't use weird Apple-only extensions to gcc.
>>> In fact, don't use Apple's weird Objective-C at all.
>>>
>> A modern C++ standard is fine.
>> If you're writing in C, you must use a conservative subset of C89.
>> Otherwise it will break on Microsoft compilers.
>
> The issue here was for compatibility between clang and gcc.
>
> But if you need compatibility with MS's feeble offerings in C, then yes,
> you need to pick a limited version of C90 or C89, and have a set of
> wrappers for library functions that MS implements in a different way or
> has declared to be "unsafe" and therefore not immediately available.
> But the code will be compatible between gcc and clang - the issues there
> are with things like subtle changes to the meaning of "inline" (with the
> default -std setting), which is not an issue with C89/C90 code.

So MS doesn't support standards here either?

Anyway, the reason I was thinking of supporting different compilers and
IDEs is to make the code accessible, for review, changes, integration /
compiler-specific optimization and so on.

The project looks like it will be available under the LGPL so any
changes to the library has to be sent back upstream, making for
better code.  It also looks like it will be forwards-compatible C90
code.

Another good thing about making it accessible is that the code will
be compiled on different compilers.  I think that will also make bugs
pop up that show that the code needs to be corrected because the
programmer hasn't understood C90 properly.

-Morten

[toc] | [prev] | [next] | [standalone]


#70632

FromDavid Brown <david.brown@hesbynett.no>
Date2015-09-16 13:26 +0200
Message-ID<mtbjhd$ula$1@dont-email.me>
In reply to#70629
On 16/09/15 13:08, Morten W. Petersen wrote:
> On 16.09.2015 11:20, David Brown wrote:
>> On 16/09/15 11:03, Malcolm McLean wrote:
>>> On Wednesday, September 16, 2015 at 8:00:27 AM UTC+1, David Brown wrote:
>>>>
>>>> This can be summed up with:
>>>>
>>>> Use a modern C or C++ standard.  Write valid code.
>>>> Use appropriate headers for your vector functions.
>>>> Don't use weird Apple-only extensions to gcc.
>>>> In fact, don't use Apple's weird Objective-C at all.
>>>>
>>> A modern C++ standard is fine.
>>> If you're writing in C, you must use a conservative subset of C89.
>>> Otherwise it will break on Microsoft compilers.
>>
>> The issue here was for compatibility between clang and gcc.
>>
>> But if you need compatibility with MS's feeble offerings in C, then yes,
>> you need to pick a limited version of C90 or C89, and have a set of
>> wrappers for library functions that MS implements in a different way or
>> has declared to be "unsafe" and therefore not immediately available.
>> But the code will be compatible between gcc and clang - the issues there
>> are with things like subtle changes to the meaning of "inline" (with the
>> default -std setting), which is not an issue with C89/C90 code.
> 
> So MS doesn't support standards here either?
> 

MSVC does not support C standards properly beyond something like C90.
AFAIUI, it has recently gained more C99 support, but basically it is a
C++ compiler and not a C compiler, as far as MS is concerned.

Other C compilers on Windows should be okay - gcc, clang, icc, etc.

So it is all a matter of how portable you need to be, and how many
different tools you want to support.

> Anyway, the reason I was thinking of supporting different compilers and
> IDEs is to make the code accessible, for review, changes, integration /
> compiler-specific optimization and so on.

Aim to make your code a simple set of headers and C files with a clear
structure.  Have a header file that handles compatibility, using
#ifdef's for automatic compiler detection to deal with the
incompatibilities - it should be good enough for most purposes, along
with basic requirements (such as C99 support).  And have a readme with
instructions, and a simple Makefile that works using the system's
default compiler and adds required flags (such as for setting the C
standard), which should work out of the box for gcc or clang, on most
*nix systems, including Windows with msys/mingw or cygwin.

Then users of IDE's or other compilers should have no problem importing
the code into a project on that system, and you don't have to deal with
the messy details.

> 
> The project looks like it will be available under the LGPL so any
> changes to the library has to be sent back upstream, making for
> better code.  It also looks like it will be forwards-compatible C90
> code.

Be careful that using the LGPL also means that any user's code linked
with it also has to be under the GPL/LGPL unless they build your library
as a DLL/SO, or mess about with distributing object files if they want
to use static linking.  So if your intention is to let people use your
code freely for static linking but force changes and improvements in
/your/ files to be made public, then the LGPL is not the answer.  You
are better with the Mozilla Public License or an explicitly modified
GPL/LGPL that makes your position clear.  (See www.freertos.org for an
example of a modified GPL.)

> 
> Another good thing about making it accessible is that the code will
> be compiled on different compilers.  I think that will also make bugs
> pop up that show that the code needs to be corrected because the
> programmer hasn't understood C90 properly.
> 
> -Morten
> 

[toc] | [prev] | [next] | [standalone]


#70639

From"Morten W. Petersen" <morphex@gmail.com>
Date2015-09-16 17:47 +0200
Message-ID<mtc2tr$2ip$1@speranza.aioe.org>
In reply to#70632
On 16.09.2015 13:26, David Brown wrote:
> On 16/09/15 13:08, Morten W. Petersen wrote:
[...]
>> The project looks like it will be available under the LGPL so any
>> changes to the library has to be sent back upstream, making for
>> better code.  It also looks like it will be forwards-compatible C90
>> code.
>
> Be careful that using the LGPL also means that any user's code linked
> with it also has to be under the GPL/LGPL unless they build your library
> as a DLL/SO, or mess about with distributing object files if they want
> to use static linking.  So if your intention is to let people use your
> code freely for static linking but force changes and improvements in
> /your/ files to be made public, then the LGPL is not the answer.  You
> are better with the Mozilla Public License or an explicitly modified
> GPL/LGPL that makes your position clear.  (See www.freertos.org for an
> example of a modified GPL.)

Hm, this is an interesting point.

What I want to do, is create a good XML parsing/writing/manipulation
library (in that order), and maybe a simple front-end that can be a
tool for dealing with XML files for example on a *NIX command line.

It should be licensed so that it can be included in just about any
project, commercial, open-source, closed-source, volunteer etc.

At the same time, it shouldn't be possible to take the source, wrap
it under a new label and pass it off as another XML-library.  This is
important because the library should promote (web) standards, and
strengthen XML's position in the world rather than weaken it.

At the same time, speed/security modifications to the library is
something that can be expected is done to the library, and it is
fair to request those things in return for the free use of the
library.  But, security-motivated or other modifications that by their
nature should be kept under wraps shouldn't be required to give up.

Regards,

Morten

[toc] | [prev] | [next] | [standalone]


#70650

FromMalcolm McLean <malcolm.mclean5@btinternet.com>
Date2015-09-16 09:37 -0700
Message-ID<499619fd-7f65-47d4-81c3-13f16ad01566@googlegroups.com>
In reply to#70639
On Wednesday, September 16, 2015 at 4:47:23 PM UTC+1, Morten W. Petersen wrote:
> On 16.09.2015 13:26, David Brown wrote:
>
> What I want to do, is create a good XML parsing/writing/manipulation
> library (in that order), and maybe a simple front-end that can be a
> tool for dealing with XML files for example on a *NIX command line.
> 
> It should be licensed so that it can be included in just about any
> project, commercial, open-source, closed-source, volunteer etc.
> 
> At the same time, it shouldn't be possible to take the source, wrap
> it under a new label and pass it off as another XML-library.  This is
> important because the library should promote (web) standards, and
> strengthen XML's position in the world rather than weaken it.
> 
> At the same time, speed/security modifications to the library is
> something that can be expected is done to the library, and it is
> fair to request those things in return for the free use of the
> library.  But, security-motivated or other modifications that by their
> nature should be kept under wraps shouldn't be required to give up.
> 
The risk is that people will shrug, say "yet another XML parser" and never
give your work a serious chance. So it will gain almost no recognition 
and only be used by one or two people.
I wouldn't worry about pirates wrapping the source and passing it off
as another library. If they do that, you've won.

[toc] | [prev] | [next] | [standalone]


#70818

From"Morten W. Petersen" <morphex@gmail.com>
Date2015-09-17 15:41 +0200
Message-ID<mtefv2$bvl$1@speranza.aioe.org>
In reply to#70650
On 16.09.2015 18:37, Malcolm McLean wrote:
> On Wednesday, September 16, 2015 at 4:47:23 PM UTC+1, Morten W. Petersen wrote:
>> On 16.09.2015 13:26, David Brown wrote:
>>
>> What I want to do, is create a good XML parsing/writing/manipulation
>> library (in that order), and maybe a simple front-end that can be a
>> tool for dealing with XML files for example on a *NIX command line.
>>
>> It should be licensed so that it can be included in just about any
>> project, commercial, open-source, closed-source, volunteer etc.
>>
>> At the same time, it shouldn't be possible to take the source, wrap
>> it under a new label and pass it off as another XML-library.  This is
>> important because the library should promote (web) standards, and
>> strengthen XML's position in the world rather than weaken it.
>>
>> At the same time, speed/security modifications to the library is
>> something that can be expected is done to the library, and it is
>> fair to request those things in return for the free use of the
>> library.  But, security-motivated or other modifications that by their
>> nature should be kept under wraps shouldn't be required to give up.
>>
> The risk is that people will shrug, say "yet another XML parser" and never
> give your work a serious chance. So it will gain almost no recognition
> and only be used by one or two people.
> I wouldn't worry about pirates wrapping the source and passing it off
> as another library. If they do that, you've won.

Well it wouldn't be a good feeling if someone took the project in
its entirety and passed it off as their own.  An XML editor for
example could of course statically link the library and have a
note in the credits or something similar.

A worse case would be if someone made changes to it so that it didn't
deal with XML in the standards-defined way and that became popular.

I'll be looking at different licenses and maybe send some mail to
the OSI mailing lists.

-Morten

[toc] | [prev] | [next] | [standalone]


#70820

FromMalcolm McLean <malcolm.mclean5@btinternet.com>
Date2015-09-17 07:06 -0700
Message-ID<3beb71d8-4ac8-4f6d-b3b4-394e30790823@googlegroups.com>
In reply to#70818
On Thursday, September 17, 2015 at 2:42:06 PM UTC+1, Morten W. Petersen wrote:
> 
> Well it wouldn't be a good feeling if someone took the project in
> its entirety and passed it off as their own.  An XML editor for
> example could of course statically link the library and have a
> note in the credits or something similar.
>
An XML parser is a small cog in a medium or large program. Often
it's a sledgehammer against a nut, the XML is a few simple
configuration settings or something. But if you have to read it,
and a parser can be grabbed from the self, might as well use it. But
you're not really going to credit the guy who enabled you to read in the
config file. 
>
> A worse case would be if someone made changes to it so that it didn't
> deal with XML in the standards-defined way and that became popular.
> 
That's certainly a threat. But whilst that's maybe worse than the parser
not being used at all, the latter is a far more likely fate, and that's what
you need to concentrate on avoiding. XML parsing is an understood,
discrete problem, and so of course there are solutions out there. 
Unless you can offer a real point of advantage, it will be hard to generate
much interest for another parser.

[toc] | [prev] | [next] | [standalone]


#70823

From"Morten W. Petersen" <morphex@gmail.com>
Date2015-09-17 16:22 +0200
Message-ID<mteib0$i0d$1@speranza.aioe.org>
In reply to#70820
On 17.09.2015 16:06, Malcolm McLean wrote:
> On Thursday, September 17, 2015 at 2:42:06 PM UTC+1, Morten W. Petersen wrote:
[...]
>> A worse case would be if someone made changes to it so that it didn't
>> deal with XML in the standards-defined way and that became popular.
>>
> That's certainly a threat. But whilst that's maybe worse than the parser
> not being used at all, the latter is a far more likely fate, and that's what
> you need to concentrate on avoiding. XML parsing is an understood,
> discrete problem, and so of course there are solutions out there.
> Unless you can offer a real point of advantage, it will be hard to generate
> much interest for another parser.

Mm, yes.  Well I've decided that speed and security are going to be two
key features, and at some point when optimizing the C code doesn't give
results, hand-optimizing Assembly code will be done.

I have the impression that it isn't easy to be better than a good C
compiler at creating Assembly code, but it will be interesting to
give it a go.

I guess creating something that's safer and faster than the alternative
and then going around on different projects "selling" the library could
be a good way to get things started.

Would be great to have it included in Firefox and Thunderbird for
example.

-Morten

[toc] | [prev] | [next] | [standalone]


#70716

FromDavid Brown <david.brown@hesbynett.no>
Date2015-09-16 23:13 +0200
Message-ID<mtcltk$b7e$1@dont-email.me>
In reply to#70639
On 16/09/15 17:47, Morten W. Petersen wrote:
> On 16.09.2015 13:26, David Brown wrote:
>> On 16/09/15 13:08, Morten W. Petersen wrote:
> [...]
>>> The project looks like it will be available under the LGPL so any
>>> changes to the library has to be sent back upstream, making for
>>> better code.  It also looks like it will be forwards-compatible C90
>>> code.
>>
>> Be careful that using the LGPL also means that any user's code linked
>> with it also has to be under the GPL/LGPL unless they build your library
>> as a DLL/SO, or mess about with distributing object files if they want
>> to use static linking.  So if your intention is to let people use your
>> code freely for static linking but force changes and improvements in
>> /your/ files to be made public, then the LGPL is not the answer.  You
>> are better with the Mozilla Public License or an explicitly modified
>> GPL/LGPL that makes your position clear.  (See www.freertos.org for an
>> example of a modified GPL.)
>
> Hm, this is an interesting point.
>
> What I want to do, is create a good XML parsing/writing/manipulation
> library (in that order), and maybe a simple front-end that can be a
> tool for dealing with XML files for example on a *NIX command line.
>
> It should be licensed so that it can be included in just about any
> project, commercial, open-source, closed-source, volunteer etc.
>
> At the same time, it shouldn't be possible to take the source, wrap
> it under a new label and pass it off as another XML-library.  This is
> important because the library should promote (web) standards, and
> strengthen XML's position in the world rather than weaken it.
>
> At the same time, speed/security modifications to the library is
> something that can be expected is done to the library, and it is
> fair to request those things in return for the free use of the
> library.  But, security-motivated or other modifications that by their
> nature should be kept under wraps shouldn't be required to give up.
>
> Regards,
>
> Morten
>

That is how I understood you, so I again point you to the MPL or a 
modified GPL, with FreeRTOS as an example:

<https://en.wikipedia.org/wiki/Mozilla_Public_License>
<http://www.freertos.org/a00114.html>

[toc] | [prev] | [next] | [standalone]


#70817

From"Morten W. Petersen" <morphex@gmail.com>
Date2015-09-17 15:35 +0200
Message-ID<mtefia$b5h$1@speranza.aioe.org>
In reply to#70716
On 16.09.2015 23:13, David Brown wrote:
> On 16/09/15 17:47, Morten W. Petersen wrote:
[...]
>> Hm, this is an interesting point.
>>
>> What I want to do, is create a good XML parsing/writing/manipulation
>> library (in that order), and maybe a simple front-end that can be a
>> tool for dealing with XML files for example on a *NIX command line.
>>
>> It should be licensed so that it can be included in just about any
>> project, commercial, open-source, closed-source, volunteer etc.
>>
>> At the same time, it shouldn't be possible to take the source, wrap
>> it under a new label and pass it off as another XML-library.  This is
>> important because the library should promote (web) standards, and
>> strengthen XML's position in the world rather than weaken it.
>>
>> At the same time, speed/security modifications to the library is
>> something that can be expected is done to the library, and it is
>> fair to request those things in return for the free use of the
>> library.  But, security-motivated or other modifications that by their
>> nature should be kept under wraps shouldn't be required to give up.
>>
>> Regards,
>>
>> Morten
>>
>
> That is how I understood you, so I again point you to the MPL or a
> modified GPL, with FreeRTOS as an example:
>
> <https://en.wikipedia.org/wiki/Mozilla_Public_License>
> <http://www.freertos.org/a00114.html>

I haven't dealt with the MPL that much so I'll do some reading up on
that.

Thanks.

-Morten

[toc] | [prev] | [next] | [standalone]


#70642

Fromjacobnavia <jacob@jacob.remcomp.fr>
Date2015-09-16 18:12 +0200
Message-ID<mtc4a4$38q$1@dont-email.me>
In reply to#70629
Le 16/09/2015 13:08, Morten W. Petersen a écrit :
>
> So MS doesn't support standards here either?
>

Look, there is

1) The MS bashing contest
2) The facts

If you use functions deprecated by Microsoft like "strlen" you will get 
a warning about it. That is a warning, and compilation will go on as usual.

If you do not like the warning you can add a #define to silence the 
warnings, it is something like "NO_DEPRECATE" or similar, I do not 
remember exactly.

If you compile with Microsoft's IDE the IDE will tell you what define to 
add.

Now, we can forget the facts and the bashing contest can go on.

:-)

[toc] | [prev] | [next] | [standalone]


#70631

FromNoob <root@127.0.0.1>
Date2015-09-16 13:18 +0200
Message-ID<mtbj2v$t3f$1@dont-email.me>
In reply to#70619
On 16/09/2015 11:20, David Brown wrote:

> But if you need compatibility with MS's feeble offerings in C, then yes,
> you need to pick a limited version of C90 or C89, and have a set of
> wrappers for library functions that MS implements in a different way or
> has declared to be "unsafe" and therefore not immediately available.

I only recently found this article:
http://arstechnica.com/information-technology/2013/06/c99-acknowledged-at-last-as-microsoft-lays-out-its-path-to-c14/

> The final version of 2013 will also include a few C99 features.
> Microsoft has long avoided supporting C99, the major update to C++'s
> predecessor that was standardized last millennium, claiming that
> there was little demand for it among Visual Studio users. This was
> true, but only to a point; it's true that many Windows developers
> weren't especially interested in C99 because they had no good tooling
> to support it. Open source developers, however, embraced the update,
> as it makes C a lot less awkward to work with.
> 
> While full C99 support is still not in the cards, Sutter said that
> certain specific features were going to be added, including C99's
> compound literals and direct initializers. These additions will mean
> that many open source projects will become buildable in Visual Studio
> without demanding significant code changes. Sutter mentioned widely
> used video codec library ffmpeg as a specific example of a project
> that would work given these compiler improvements.

Regards.

[toc] | [prev] | [next] | [standalone]


#70640

FromKeith Thompson <kst-u@mib.org>
Date2015-09-16 08:47 -0700
Message-ID<lny4g6jrh2.fsf@kst-u.example.com>
In reply to#70631
Noob <root@127.0.0.1> writes:
> On 16/09/2015 11:20, David Brown wrote:
>> But if you need compatibility with MS's feeble offerings in C, then yes,
>> you need to pick a limited version of C90 or C89, and have a set of
>> wrappers for library functions that MS implements in a different way or
>> has declared to be "unsafe" and therefore not immediately available.
>
> I only recently found this article:
> http://arstechnica.com/information-technology/2013/06/c99-acknowledged-at-last-as-microsoft-lays-out-its-path-to-c14/

Quoting from the article (which is more than 2 years old):

    The final version of 2013 will also include a few C99
    features. Microsoft has long avoided supporting C99, the
    major update to C++'s predecessor that was standardized last
    millennium, claiming that there was little demand for it among
    Visual Studio users. This was true, but only to a point; it's
    true that many Windows developers weren't especially interested
    in C99 because they had no good tooling to support it. Open
    source developers, however, embraced the update, as it makes
    C a lot less awkward to work with.

    While full C99 support is still not in the cards, Sutter
    said that certain specific features were going to be added,
    including C99's compound literals and direct initializers. These
    additions will mean that many open source projects will become
    buildable in Visual Studio without demanding significant code
    changes. Sutter mentioned widely used video codec library ffmpeg
    as a specific example of a project that would work given these
    compiler improvement

-- 
Keith Thompson (The_Other_Keith) kst-u@mib.org  <http://www.ghoti.net/~kst>
Working, but not speaking, for JetHead Development, Inc.
"We must do something.  This is something.  Therefore, we must do this."
    -- Antony Jay and Jonathan Lynn, "Yes Minister"

[toc] | [prev] | [next] | [standalone]


#70672 — Re: Quoting

FromNoob <root@127.0.0.1>
Date2015-09-16 20:30 +0200
SubjectRe: Quoting
Message-ID<mtccd5$2rp$1@dont-email.me>
In reply to#70640
On 16/09/2015 17:47, Keith Thompson wrote:

> Quoting from the article (which is more than 2 years old):

And just what is the point of snipping my quote, and providing
the same, with no added comment?

[toc] | [prev] | [next] | [standalone]


#70673 — Re: Quoting

FromKeith Thompson <kst-u@mib.org>
Date2015-09-16 11:41 -0700
SubjectRe: Quoting
Message-ID<ln8u86jjfb.fsf@kst-u.example.com>
In reply to#70672
Noob <root@127.0.0.1> writes:
> On 16/09/2015 17:47, Keith Thompson wrote:
>
>> Quoting from the article (which is more than 2 years old):
>
> And just what is the point of snipping my quote, and providing
> the same, with no added comment?

The point is that I didn't read your article closely enough.  I saw a
block of text with leading "> " markers, incorrectly assumed it was
quoted from the parent article rather than from the link, and didn't
bother to read it.

Sorry about the noise.

-- 
Keith Thompson (The_Other_Keith) kst-u@mib.org  <http://www.ghoti.net/~kst>
Working, but not speaking, for JetHead Development, Inc.
"We must do something.  This is something.  Therefore, we must do this."
    -- Antony Jay and Jonathan Lynn, "Yes Minister"

[toc] | [prev] | [next] | [standalone]


Page 1 of 7  [1] 2 3 4 5 6 7  Next page →

Back to top | Article view | comp.lang.c


csiph-web