public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: mizo 91 <mizo91@gmail.com>
To: David Brown <david@westcontrol.com>
Cc: LIU Hao <lh_mouse@126.com>, gcc-help@gcc.gnu.org
Subject: Re: CreateProcess No such file or directory
Date: Fri, 23 Sep 2022 22:55:01 +0200	[thread overview]
Message-ID: <CAGt5VgGBbhXQ=dvM1Bt0ctGi6DtkGj5ZXjwHewsM4JRa=TSAaA@mail.gmail.com> (raw)
In-Reply-To: <857a3e13-c5df-8c38-f3d6-c512c96033c8@westcontrol.com>

[-- Attachment #1: Type: text/plain, Size: 3604 bytes --]

Hi David,

At the begining let me thank you for seriously addressing my concern. I
aggre that approach with global list of includes is not perfect. But it's
been in use for so long by so many people in my company that switching to
something else at this point is simply impossible. They are using Tasking
compiler which comes integrated with some derivative form of Eclipse IDE.
What I have to work with is preconfigured, There is a lot of auto generated
code and changing the approach would require extrem amount of work which I
simply cant handle on my own. I didnt invented it. I'm just trying to make
it work in my Software in the loop solution for testing purpouses and not
having a compiler that could handle this amount of load is a big no no for
me. I will simply switch to Clang and never think about this problem
again.Thank you all for you valuable sugestions.

Kind Regards,
Filip

This all sounds like a very questionable way to organise your project.
> (I hesitate to say "wrong", because people have good reasons for
> organising projects in different ways, and sometimes it's just down to
> personal preferences.  But if I were given charge of this project as you
> describe it, I'd say it's wrong and must be changed.)
>

> I would say that if you are listing a large number of include
> directories in the include search path, you are doing things wrong.
> This is especially true when you have code from different places and
> different modules - you are just asking for trouble when there are
> filename clashes between parts.  It is much better to put the directory
> explicitly in the #include statements.  Alternatively, you can have
> indirect inclusions - have a single directory "modules_includes" that
> has an include file for each module.  Those include files have nothing
> but an include directive with the real module public include file,
> including the directory.  This "modules_include" might then go on your
> compiler include path, but I'd not do that either.
>
> That way you can easily include the files you want, and not accidentally
> include private headers that are internal to modules.  It is much easier
> to find what you want, and much easier to read the source code.  When
> you see "#include "modules_include/foo.h" ", or "foo/public.h"
> (depending on which solution you use) in the source code, you know it is
> the public interface for the module "foo".  You don't have to wonder
> which of the hundred directories it might be in or what module it is.
>
> Yes, Eclipse CDT likes to make huge include paths.  (At least, that is
> my experience using many embedded toolchain packages based on Eclipse.)
>   It is a PITA.  It also has a painfully inefficient build system by
> default.  It's okay for tiny test projects - for anything serious, you
> want a different project organisation and a different build system
> (make, or whatever you like).  This has the extra advantage of making
> Eclipse CDT much faster and more convenient when you use it as an editor
> and IDE.
>
>
> Regarding the #define macros, put them all in a single header.  If it
> makes life easier, use the gcc option "-imacros <file>" to include it
> for all compilations.  A file of defines is simpler to read, edit,
> comment, change and maintain than a list of "-D..." options passed to
> the compiler.  It also gives you more flexibility, such as using
> conditional compilation to allow some macros to depend on others.
>
>
> Of course I don't know your project at all, and don't know how realistic
> these suggestions are, but hopefully you'll find them helpful.
>
> David
>

  reply	other threads:[~2022-09-23 20:55 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-20 16:02 mizo 91
2022-09-20 16:18 ` Richard Earnshaw
2022-09-20 17:17   ` mizo 91
2022-09-20 22:27     ` Tamar Christina
2022-09-21  2:42       ` fedor_qd
2022-09-21 15:27         ` mizo 91
2022-09-21 15:41           ` Tom Kacvinsky
2022-09-26  6:58           ` Re[2]: " fedor_qd
2022-09-22  6:44 ` LIU Hao
2022-09-22  7:35   ` mizo 91
2022-09-22  9:46     ` LIU Hao
2022-09-22 14:55       ` mizo 91
2022-09-22 16:04         ` LIU Hao
2022-09-22 16:50           ` mizo 91
2022-09-23 17:40             ` Xi Ruoyao
2022-09-23 21:11               ` mizo 91
2022-09-24  5:13                 ` Xi Ruoyao
2022-09-24  9:28                   ` mizo 91
2022-09-24  9:51                     ` Xi Ruoyao
2022-09-24 10:20                       ` Jonathan Wakely
2022-09-23 17:14         ` David Brown
2022-09-23 20:55           ` mizo 91 [this message]
2022-09-22  8:19   ` Jonathan Wakely
2022-09-22  8:42     ` Jonathan Wakely
2022-09-22  9:48       ` LIU Hao
2022-09-22  9:50       ` mizo 91

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAGt5VgGBbhXQ=dvM1Bt0ctGi6DtkGj5ZXjwHewsM4JRa=TSAaA@mail.gmail.com' \
    --to=mizo91@gmail.com \
    --cc=david@westcontrol.com \
    --cc=gcc-help@gcc.gnu.org \
    --cc=lh_mouse@126.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).