-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 06.10.2013 22:39, Daniel Goldman wrote:
> Context - I posted previously about compiling (or cross-compiling) a C curses 
> program.
> 
> I'm confused by the mingw-w64 directory structure and names. It seems well 
> thought and 
> organized, probably self-obvious to the developers. But I don't "get it" as a 
> user.

My usual advice, copied from the neighbouring thread:

Run `echo | [<gcc executable>] -E -v -' to see where it looks for headers.
Run `[<gcc executable>] -print-search-dirs' to see where it looks for
libs (replace [<gcc executable>] with the executable name).


> C:\sw\mingw-builds>\sw\unx-util\bin\find -name include -print
> .\x32-4.8.1-posix-dwarf-rev5\mingw32\i686-w64-mingw32\include
Cross-compilers have includes in <root>/<target-triplet>
"C:\sw\mingw-builds\x32-4.8.1-posix-dwarf-rev5\mingw32" is the root
directory (i.e. it's completely arbitrary).

> .\x32-4.8.1-posix-dwarf-rev5\mingw32\include
Native compilers have inlcudes in <root>/include

> .\x32-4.8.1-posix-dwarf-rev5\mingw32\lib\gcc\i686-w64-mingw32\4.8.1\include
> .\x32-4.8.1-posix-dwarf-rev5\mingw32\lib\gcc\i686-w64-mingw32\4.8.1\install-tools\include
Don't touch anything in <root>/lib/gcc

> .\x32-4.8.1-posix-dwarf-rev5\mingw32\opt\include
This doesn't have any intristic meaning, AFAIAA. But some toolchain
setups may look there for something. I don't know.

> 
> C:\sw\mingw-builds>\sw\unx-util\bin\find -name lib -print
> .\x32-4.8.1-posix-dwarf-rev5\mingw32\i686-w64-mingw32\lib
> .\x32-4.8.1-posix-dwarf-rev5\mingw32\lib
> .\x32-4.8.1-posix-dwarf-rev5\mingw32\lib\gcc\i686-w64-mingw32\lib
> .\x32-4.8.1-posix-dwarf-rev5\mingw32\opt\lib
Same thing for the libs.

> 
> I'm confused by the many include and lib directories. As an end user of gcc, 
> which 
> directory would be the locations for adding curses header and library files?
<root>/[lib or include] for native compilers.
<root>/<target-triplet>/[lib or include] for cross-compilers.


My guess (won't know for sure until you show the output of the commands
i listed at the top of the message) is that this toolchain is a
self-targetting cross-compiler (i.e. it runs on i686 and compiles for
i686, and behaves like a cross-compiler while doing so). This is due to
the way toolchains may be built.

- -- 
O< ascii ribbon - stop html email! - www.asciiribbon.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (MingW32)

iQEcBAEBAgAGBQJSUbvPAAoJEOs4Jb6SI2CwgbYH/3imc6IboVq4y3jJK/cxZSSp
RLvrxoYaXH2sWZzpRgcl4Qoy3h4uJyqEgx3Fd+uH1/HetfgEoMm03tpMGH9G3JOb
N6G24eaAPgY4YwDjKEjXhZxtYjrgpbPA9H5u1/IHP3MsFKV2zbsirUuErGt7rvh1
CwRHBFDmMRUvghk+VCJLuVdKifAlSJfvkSSkUpHNrsKWZiyESAZgaGGPOyBb5d/S
GR38EC6EKzW44bkcWCnkTvhOLM5wLM1eSeMokmvofDqqg1CUky3GcEhFyTySECv6
KFrMRNWFy5k/mBqOuxULoGiCerRDkmLPahF5p2E70BiNyY/aYX0SDhBz/+piqKA=
=l1Qh
-----END PGP SIGNATURE-----

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to