I'm working on documenting how to build a project natively in windows,
which first means figuring out the quirks myself and I ran into an issue
with g++ not being able to find headers with unix style paths
"/usr/local/include".

My environment:
Windows 7 32bit
mingw-w64 from win-builds.org
MSYS from the MinGW-w64 sourceforge page


The project requires wxWidgets which I have building and installing fine
with no tweaks. In order to determine C/CXX flags, linker requirements,
etc, wxWigets provides a script wx-config that provides them. My project is
cmake based (if it matters) and I'm using the built-in
FindWxWidgets/UseWxWidgets modules for library and inclide directory
detection (which uses wx-config on *nix systems).

The problem occurs when I try to build my project:

cd /C/Tools/Projects/freedv/src && /C/Tools/msys/opt/windows_32/bin/g++.exe
  -D
HAVE_CONFIG_H -DSVN_REVISION=\"1786M\" -D_FILE_OFFSET_BITS=64
-D_NO_AUTOTOOLS_ -
D__WXMSW__ -Wall -mthreads -g @CMakeFiles/freedv.dir/includes_CXX.rsp   -o
CMake
Files/freedv.dir/dlg_about.cpp.obj -c
/C/Tools/Projects/svn/freetel/fdmdv2/src/d
lg_about.cpp
c:/Tools/Projects/svn/freetel/fdmdv2/src/dlg_about.cpp:21:22: fatal error:
wx/ff
ile.h: No such file or directory
 #include <wx/ffile.h>
                      ^
compilation terminated.

The contents of includes_CSS.rsp:
-IC:/Tools/Projects/freedv -Ic:/Tools/msys/local/include -isystem
/usr/local/lib/wx/include/msw-unicode-static-3.0 -isystem
/usr/local/include/wx-3.0 -Ic:/Tools/msys/local/include/codec2
-IC:/Tools/Projects/svn/freetel/fdmdv2/src

As you can see, most of the includes use the windows path, "C:/Tools/..."
except the two wxWidgets entries use the unix style "/usr/local", however,
msys doesn't seem to have a problem:
$ file /usr/local/include/wx-3.0/wx/ffile.h
/usr/local/include/wx-3.0/wx/ffile.h: ASCII C++ program text, with CRLF
line terminators

If I change the /usr/local to c;/Tools/msys/local/include/wx-3.0 (and the
same for the other) then compilation completes without error.

Am I missing something obvious here? Isn't the whole point of msys is so
that you can use unix style paths?

Thanks,
Richard
------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls. 
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to