tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] Include paths


From: David Mertens
Subject: Re: [Tinycc-devel] Include paths
Date: Thu, 22 Aug 2013 07:39:39 -0400

Anton -

I haven't dug into the source code for this, but I too have noticed that (1) I can move around a Windows compilation of tcc that was built using the build-tcc.bat file, but (2) I cannot move around a compilation built using ./configure. This has ramifications for the build recipe for Alien::TinyCC, which is why I know and care. :-)

If I were to hazard a guess, I would say that the Windows build procedure had to go this way because the binaries released on the tcc downloads page cannot know which directory they will eventually occupy. However, in the conventional ./configure && make && make install, you know where the binary is going to live at compile time, so I imagine it's just built into the system there. The configure-based install could probably be revised to be portable.

I would hypothesize that tcc you built at work was built with the unixish approach? ./cofigure, make, make install?

David


On Thu, Aug 22, 2013 at 6:51 AM, Anton Shepelev <address@hidden> wrote:
Thomas Preud'homme:

> > The manual says:
> >
> >   The default system include paths are: '/usr/
> >   local/include', '/usr/include' and  'PREFIX/
> >   lib/  tcc/include'.   ('PREFIX'  is  usually
> >   '/usr' or '/usr/local').
> >
> > But [what] is  PREFIX?   Is  it  an  environment
> > variable  or  some internal constant? How to de-
> > termine it if I'm on Windows?
>
> It's the path passed to configure via  the -- pre-
> fix  switch.  By default it's C:/Program Files/tcc
> on Windows and /usr/local for other systems.

Thank you very much.  I copied the include directory
to that path so that I now have:

          C:\Program Files\tcc\include and
          C:\Program Files\tcc\lib

yet  tcc still can't compile the program without the
-I and -L options.

What's more interesting, at my home PC tcc finds its
include and lib directories irregardless of where it
is located, as if it were looking them up relatively
to  the  location  of  the executable: I renamed its
parent directory (say, to TCC-2), and called it from
the root of the drive -- and it worked again.  I al-
so made sure that  it  was  the  local  (sibling  to
tcc.exe) include directory that was used by renaming
it.

--
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

_______________________________________________
Tinycc-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/tinycc-devel



--
 "Debugging is twice as hard as writing the code in the first place.
  Therefore, if you write the code as cleverly as possible, you are,
  by definition, not smart enough to debug it." -- Brian Kernighan

reply via email to

[Prev in Thread] Current Thread [Next in Thread]