LRN - Thanks for the help. Things are working better now.

"echo | [<gcc executable>] -E -v -" (ran from windows xp "command window") did 
help (some 
portions shown):

Target: i686-w64-mingw32
Configured with: ../../../src/gcc-4.8.1/configure --host=i686-w64-mingw32 
--build=i686-w64-mingw32 --target=i686-w64-mingw32 (goes on a lot more)
Thread model: posix
gcc version 4.8.1 (rev5, Built by MinGW-W64 project)

--------------------------------------------

FWIW, it also produced somewhat confusing output, like:

c:\sw\mingw-builds\x32-4.8.1-posix-dwarf-rev5\mingw32\bin\../lib/gcc/i686-w64-mingw32/4.8.1/include
 


and even:

c:\sw\mingw-builds\x32-4.8.1-posix-dwarf-rev5\mingw32\bin\../lib/gcc/i686-w64-mingw32/4.8.1/../../../../i686-w64-mingw32/include

--------------------------

But it's not a big deal. I don't have to configure this every day.

When I installed curses.h to the following directory, it worked fine. No great 
accomplishment. Just in case someone else chances on the post (or I forget):

C:\sw\mingw-builds\x32-4.8.1-posix-dwarf-rev5\mingw32\lib\gcc\i686-w64-mingw32\4.8.1\include

--------------------------

For some reason, LIBRARY_PATH went on and on and on (645 columns):

LIBRARY_PATH=c:/sw/mingw-builds/x32-4.8.1-posix-dwarf-rev5/mingw32/bin/../lib/gcc/i686-w64-mingw32/4.8.1/;c:/sw/mingw-builds/x32-4.8.1-posix-dwarf-rev5/mingw32/bin/../lib/gcc/;c:/sw/mingw-builds/x32-4.8.1-posix-dwarf-rev5/mingw32/bin/../lib/gcc/i686-w64-mingw32/4.8.1/../../../../i686-w64-mingw32/lib/../lib/;c:/sw/mingw-builds/x32-4.8.1-posix-dwarf-rev5/mingw32/bin/../lib/gcc/i686-w64-mingw32/4.8.1/../../../../lib/;c:/sw/mingw-builds/x32-4.8.1-posix-dwarf-rev5/mingw32/bin/../lib/gcc/i686-w64-mingw32/4.8.1/../../../../i686-w64-mingw32/lib/;c:/sw/mingw-builds/x32-4.8.1-posix-dwarf-rev5/mingw32/bin/../lib/gcc/i686-w64-mingw32/4.8.1/../../../

------------------------

So I ignored LIBRARY_PATH, and put libpdcurses.a (DOS version happened to be 
developed for 
pdcurses) here (in parallel with where the header file went) to make it work OK:

C:\sw\mingw-builds\x32-4.8.1-posix-dwarf-rev5\mingw32\lib\gcc\i686-w64-mingw32\4.8.1

The main point is now when I compile in test mode with long printf variants, it 
works, 
that was the reason I switched to mingw-w64.

Thanks,
Daniel

LRN wrote:
> 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.


------------------------------------------------------------------------------
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