> From: Jorge Castillo <[email protected]>
> Date: Sat, Nov 1, 2014 at 11:09 PM
> Subject: OpenBSD MinGW Error: windows.h: No such file or directory
> To: [email protected]
> 
> 
> The following applies to OpenBSD 5.5 & 5.6, I didn't tried this with any
> previous release. I am runnig OpenBSD in VirtualBox.
> 
> This:
> /usr/local/share/doc/pkg-readmes/mingw-1.0.1p3
> 
> Says that all you have to do to compile an exe is:
> 
> $ export PATH=/usr/local/mingw32/bin:${PATH}
> $ g++ CreateFile.cpp -o CreateFile.exe
> 
> But I get a bunch of errors. After googling and trying a few things,
> I got this to work by doing it this way:
> 
> $ g++ -I/usr/local/mingw32/include CreateFile.cpp -o CreateFile.exe
> 
> I tested this solution with the provided test code in the pkg-readme &
> a very small non GUI program I did for a school assignment. The exes
> worked fine in a Windows7 x64 virtual machine.
> 
> Is this the obvious solution to the error or am I doing something wrong?

The diff below fixed the issue for me.
As found on http://www.mingw.org/wiki/HOWTO_Use_the_GCC_specs_file

oky?

Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/mingw/Makefile,v
retrieving revision 1.8
diff -u -p -u -p -r1.8 Makefile
--- Makefile    9 Nov 2014 16:25:17 -0000       1.8
+++ Makefile    11 Nov 2014 16:42:43 -0000
@@ -3,7 +3,7 @@
 COMMENT =      development environment for native Windows applications
 
 V =            1.0.1
-REVISION =     3
+REVISION =     4
 BASENAME =     x86-mingw32-build
 DISTNAME =     ${BASENAME}-${V}-sh
 PKGNAME =      mingw-${V}
Index: files/specs.diff
===================================================================
RCS file: /cvs/ports/devel/mingw/files/specs.diff,v
retrieving revision 1.1
diff -u -p -u -p -r1.1 specs.diff
--- files/specs.diff    2 Apr 2012 03:18:17 -0000       1.1
+++ files/specs.diff    11 Nov 2014 16:42:43 -0000
@@ -9,6 +9,16 @@
  
  *cpp_options:
  %(cpp_unique_options) %1 %{m*} %{std*&ansi&trigraphs} %{W*&pedantic*} %{w} 
%{f*} %{g*:%{!g0:%{!fno-working-directory:-fworking-directory}}} %{O*} %{undef}
+@@ -36,8 +36,8 @@
+ %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}} 
%1 %{!Q:-quiet} -dumpbase %B %{d*} %{m*} %{a*} %{c|S:%{o*:-auxbase-strip 
%*}%{!o*:-auxbase %b}}%{!c:%{!S:-auxbase %b}} %{g*} %{O*} %{W*&pedantic*} %{w} 
%{std*&ansi&trigraphs} %{v:-version} %{pg:-p} %{p} %{f*} %{undef} 
%{Qn:-fno-ident} %{--help:--help} %{--target-help:--target-help} 
%{!fsyntax-only:%{S:%W{o*}%{!o*:-o %b.s}}} %{fsyntax-only:-o %j} %{-param*}
+ 
+ *cc1plus:
++-I${LOCALBASE}/mingw32/include
+ 
+-
+ *link_gcc_c_sequence:
+ %G %L %G
+ 
 @@ -54,7 +54,7 @@
  %{mthreads:-lmingwthrd} -lmingw32 -lgcc -lmoldname -lmingwex -lmsvcrt
  

Reply via email to