libodbccp32.a
Charles S. Wilson
cwilson@ece.gatech.edu
Wed Aug 9 19:12:00 GMT 2000
Neil Lunn wrote:
>
> >#ifdef WIN32
> ># include "win32.h"
> >#endif
> >
> >That's "win32.h", not <win32.h>. There's a file in
> ><perl-src>/win32/win32.h, which is probably copied up to the toplevel
> >during a win32-native configure. (I'm just guessing here)
>
> That's about right!
>
> >
> >The correct fix is probably to replace the #ifdef statement with:
> >
> >#if defined(WIN32) && !defined(__CYGWIN__)
> >
>
> Agreed! or should win32.h copy in the perl build on cygwin? (read on)
No, I don't think so.
>
> >But the presence of that #include "win32.h" has never cause me any build
> >trouble; it's odd that it would only cause difficulties when building
> >DBD::ODBC but not other modules.
> >
> Bit of a guess, isn't this a perl guts thing when creating the bootstrap for
> the module?
>
> The typedefs in sqltype.h require windows.h so this include needs to be
> added to build of DBD::ODBC (Thus in Makefile.PL). Remembering this is the
> windows native ODBC driver manager being used and not a cygwin native.
>
But windows.h is already included:
if ($myodbc =~ /^MicroSoft ODBC/) {
print "\nBuilding for MicroSoft under CygWin32\n";
$opts{LIBS} = "";
print SQLH "#include <windows.h>\n";
print SQLH "#include <sql.h>\n";
print SQLH "#include <sqlext.h>\n";
$opts{dynamic_lib} = {OTHERLDFLAGS => "-lodbc32"};
}
Do you get the "Building for MicroSoft under CygWin32" message when
doing "perl Makefile.PL" ?
> Thus #ifdef WIN32 get's true. Unless there's another way to do it!
Sure. This is a major hack, but it ought to work:
--- Makefile.PL.orig Wed Aug 9 21:56:26 2000
+++ Makefile.PL Wed Aug 9 21:57:44 2000
@@ -79,6 +79,7 @@
$tmp_odbchome =~ s/^([A-Za-z]):*$/\/\/$1/;
$tmp_odbchome =~ s/\\/\//g;
$odbchome = $tmp_odbchome if (-e "$tmp_odbchome/odbc.ini")
+ $opts{DEFINE} = "-mno-win32";
}
unless ($odbchome) {
Alternatively, you could say "-U_WIN32 -UWINNT" instead of "-mno-win32".
--Chuck
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com
More information about the Cygwin
mailing list