octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MinGW build error: cannot convert 'STARTUPINFO*' to '_STARTUPINFOW*'


From: Philip Nienhuis
Subject: Re: MinGW build error: cannot convert 'STARTUPINFO*' to '_STARTUPINFOW*' ... etc
Date: Sun, 26 Aug 2012 11:06:39 -0700 (PDT)

Michael Goffioul wrote
> 
> On Sun, Aug 26, 2012 at 3:08 PM, Philip Nienhuis
> <address@hidden>wrote:
> 
>>
>> Michael Goffioul wrote
>> >
>> > On Sun, Aug 26, 2012 at 1:44 PM, Philip Nienhuis
>> > <address@hidden>wrote:
>> >
>> >>
>> >> Michael Goffioul wrote
>> >> >
>> >> > On Sat, Aug 25, 2012 at 1:12 PM, Philip Nienhuis
>> >> > <address@hidden>wrote:
>> >> >
>> >> >> Building on MinGW using Tatsuro's build stuff
>> >> >> (http://www.tatsuromatsuoka.com/octave/Eng/Win/)
>> >> >>
>> >> >> Build errors out in libgui/qterminal (I've made the actual error
>> bold
>> >> so
>> >> >> it
>> >> >> stands out between the many warning errors):
>> >> >>
>> >> >>
>> >> >>
>> >>
>> *../../../octave/libgui/src/../qterminal/libqterminal/win32/QWinTerminalImpl.cpp:632:30:
>> >> >> er
>> >> >> ror: cannot convert 'STARTUPINFO*' to '_STARTUPINFOW*' for argument
>> >> '9'
>> >> >> to
>> >> >> 'BOOL CreatePro
>> >> >> cessW(const WCHAR*, WCHAR*, _SECURITY_ATTRIBUTES*,
>> >> _SECURITY_ATTRIBUTES*,
>> >> >> BOOL, DWORD, voi
>> >> >> d*, const WCHAR*, _STARTUPINFOW*, _PROCESS_INFORMATION*)'*
>> >> >>
>> >> >
>> >> > Most probably -DUNICODE is required. I think it used to part of the
>> >> > compilation flags when using qmake, but was probably lost during the
>> >> > conversion to autotools. I didn't try to recompile under Windows
>> since
>> >> > then.
>> >> >
>> >>
>> >> Thanks Michael.
>> >>
>> >> I added -DUNICODE to CPPFLAGS (in configure options),
>> >> (export CPPFLAGS='-DUNICODE -I/x/Programs/gplibs/include
>> >> -I/x/Programs/OctaveLibs/include -I/x/programs/GnuWin32/include'
>> before
>> >> running configure)
>> >>
>> >> but now I get:
>> >>
>> >> :
>> >> libtool: compile:  g++ -shared-libgcc -DHAVE_CONFIG_H -I.
>> >> -I../../octave/liboctave -I.. -I
>> >> ../libgnu -I../../octave/libgnu -I../../octave/libcruft/misc -DUNICODE
>> >> -I/x/Programs/gplib
>> >> s/include -I/x/Programs/OctaveLibs/include
>> -I/x/programs/GnuWin32/include
>> >> -g
>> >> -O2 -mieee-fp
>> >>  -Ic:/Programs/gplibs/include/freetype2 -Ic:/Programs/gplibs/include
>> >> -IX:/Programs/gplibs/
>> >> include -Wall -W -Wshadow -Wold-style-cast -Wformat -Wpointer-arith
>> >> -Wwrite-strings -Wcast
>> >> -align -Wcast-qual -g -O2 -MT liboctave_la-file-ops.lo -MD -MP -MF
>> >> .deps/liboctave_la-file
>> >> -ops.Tpo -c ../../octave/liboctave/file-ops.cc  -DDLL_EXPORT -DPIC -o
>> >> .libs/liboctave_la-f
>> >> ile-ops.o
>> >> ../../octave/liboctave/file-ops.cc: In function 'std::string
>> >> octave_canonicalize_file_name
>> >> (const std::string&, std::string&)':
>> >> ../../octave/liboctave/file-ops.cc:752:70: error: cannot convert
>> 'const
>> >> char*' to 'const W
>> >> CHAR*' for argument '1' to 'DWORD GetFullPathNameW(const WCHAR*,
>> DWORD,
>> >> WCHAR*, WCHAR**)'
>> >> make[3]: *** [liboctave_la-file-ops.lo] Error 1
>> >> make[3]: Leaving directory `/home/Philip/octave/oct-3.7/liboctave'
>> >> make[2]: *** [all] Error 2
>> >> make[2]: Leaving directory `/home/Philip/octave/oct-3.7/liboctave'
>> >> make[1]: *** [all-recursive] Error 1
>> >> make[1]: Leaving directory `/home/Philip/octave/oct-3.7'
>> >> make: *** [all] Error 2
>> >>
>> >> "const WCHAR" in file-ops.cc tells me that -DUNICODE might have been
>> >> picked
>> >> up the wrong place. Obviously I'm doing something wrong.
>> >>
>> >> Would you have other suggestions?
>> >>
>> >
>> > You should only apply the -DUNICODE to the compilation of libqterminal,
>> > not
>> > the rest of octave.
>> >
>>
>> How do I get that together?
>>
>> Until now I used the usual configure / make sequence.
>> (I'm sorry I have little experience in complicated build systems like
>> that
>> of Octave.)
>>
> 
> You cant' achieve that without modifying the Makefile.am in gui/src/ to
> add
> the flags to the libqterminal target. But that would also require to link
> that with some tests in configure as it is not needed on all platforms.
> 
> Michael.
> 

I manually added -DUNICODE to "libqterminal_la_CPPFLAGS" in .\libgui\src and
indeed the build continues. So at least for MinGW configure tests are
probably warranted.

But the build breaks again, a bit further down:

:
libtool: compile:  g++ -shared-libgcc -DHAVE_CONFIG_H -I.
-I../../../octave/libgui/src -I../..
-IX:/programs/msys/home/Philip/qt4/qt-everywhere-opensource-src-4.7.4/include
-IX:/programs/msys/home/Philip/qt4/qt-everywhere-opensource-src-4.7.4/include/QtCore
-IX:/programs/msys/home/Philip/qt4/qt-everywhere-opensource-src-4.7.4/include/QtGui
-I../../../octave/libgui/src/../qterminal/libqterminal -DUNICODE
-I/x/Programs/gplibs/include -I/x/Programs/OctaveLibs/include
-I/x/programs/GnuWin32/include -g -O2 -mieee-fp
-Ic:/Programs/gplibs/include/freetype2 -Ic:/Programs/gplibs/include
-IX:/Programs/gplibs/include -Wall -W -Wshadow -Wold-style-cast -Wformat
-Wpointer-arith -Wwrite-strings -Wcast-align -Wcast-qual -g -O2 -MT
libqterminal_la-moc-QTerminal.lo -MD -MP -MF
.deps/libqterminal_la-moc-QTerminal.Tpo -c
../qterminal/libqterminal/moc-QTerminal.cc  -DDLL_EXPORT -DPIC -o
.libs/libqterminal_la-moc-QTerminal.o
In file included from
../qterminal/libqterminal/../../../../octave/libgui/qterminal/libqterminal/win32/QWinTerminalImpl.h:26:0,
                 from
../qterminal/libqterminal/../../../../octave/libgui/qterminal/libqterminal/QTerminal.h:29,
                 from ../qterminal/libqterminal/moc-QTerminal.cc:10:
../../../octave/libgui/src/../qterminal/libqterminal/QTerminalInterface.h:
In constructor
'QTerminalInterface::QTerminalInterface(QWidget*)':
../../../octave/libgui/src/../qterminal/libqterminal/QTerminalInterface.h:33:45:
warning:
declaration of 'parent' shadows a member of 'this'
In file included from ../qterminal/libqterminal/moc-QTerminal.cc:10:0:
../qterminal/libqterminal/../../../../octave/libgui/qterminal/libqterminal/QTerminal.h:
In
 constructor 'QTerminal::QTerminal(QWidget*)':
../qterminal/libqterminal/../../../../octave/libgui/qterminal/libqterminal/QTerminal.h:35:
13: warning: declaration of 'parent' shadows a member of 'this'
../qterminal/libqterminal/moc-QTerminal.cc: At global scope:
../qterminal/libqterminal/moc-QTerminal.cc:41:8: error: 'QUnixTerminalImpl'
has not been declared
../qterminal/libqterminal/moc-QTerminal.cc: In member function 'virtual
void* QTerminal::qt_metacast(const char*)':
../qterminal/libqterminal/moc-QTerminal.cc:59:12: error: 'QUnixTerminalImpl'
has not been declared
../qterminal/libqterminal/moc-QTerminal.cc: In member function 'virtual int
QTerminal::qt_metacall(QMetaObject::Call, int, void**)':
../qterminal/libqterminal/moc-QTerminal.cc:64:11: error: 'QUnixTerminalImpl'
has not been declared
../qterminal/libqterminal/moc-QTerminal.cc: In member function 'virtual
void* QTerminal::qt_metacast(const char*)':
../qterminal/libqterminal/moc-QTerminal.cc:60:1: warning: control reaches
end of non-void
function
make[4]: *** [libqterminal_la-moc-QTerminal.lo] Error 1
make[4]: Leaving directory `/home/Philip/octave/oct-3.7/libgui/src'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/home/Philip/octave/oct-3.7/libgui/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/Philip/octave/oct-3.7/libgui'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/Philip/octave/oct-3.7'
make: *** [all] Error 2

(FYI I have Qt4 version 4.7.4, QScintilla 2.6 and gcc 4.5.2)

Do you have a suggestion for getting past this error?

Philip




--
View this message in context: 
http://octave.1599824.n4.nabble.com/MinGW-build-error-cannot-convert-STARTUPINFO-to-STARTUPINFOW-etc-tp4643298p4643371.html
Sent from the Octave - Maintainers mailing list archive at Nabble.com.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]