Re: Compilation failures using qmake + mingw / msvc

Lorenzo Bettini <[email protected]> Wed, 18 Nov 2009 18:36:23 +0100
Newsgroups gmane.comp.gnu.source-highlight.general
Message-ID <[email protected]>
Matthias Pospiech wrote:
> Lorenzo Bettini schrieb:
>> Lorenzo Bettini wrote:
>>> Hi
>>>
>>> I'm working on this, and solving the autoconf generated files and 
>>> defines in the .pro files, it's taking me some time.
>>>
>>> Hope to have something ready soon :)
>>>
>>
>> OK, I made it, at least I can successfully build both source-highlight 
>> and source-highlight-qt under Linux with qmake, you can find these 
>> source tar balls here:
>>
>> http://gdn.dsi.unifi.it/~bettini/binaries/source-highlight-qmake-3.1.2.tar.gz 
>>
>> http://gdn.dsi.unifi.it/~bettini/binaries/source-highlight-qt-qmake-0.2.tar.gz 
>>
>>
>> I still haven't tried that on windows 'cause I need some sleep now :)
>>
> I have not included the regex libs, since they have a very long and 
> compiler specific name which is not included in your .pro file so far.
> However I tried to compile it to see if it finishes that step:
> 
> Here the errors that come with msvc: (I leave out the warnings)
> 
> .\stylescanner.cc(621) : fatal error C1083: Datei (Include) kann nicht 
> geƶffnet werden: "unistd.h": No such file or directory

by looking at that file (which is automatically generated by flex) I see

#ifndef YY_NO_UNISTD_H
/* Special case for "unistd.h", since it is non-ANSI. We include it way
  * down here because we want the user's section 1 to have been scanned 
first.
  * The user has a chance to override it with an option.
  */
#include <unistd.h>
#endif

thus it's possible to avoid to include unistd.h by adding

DEFINES += YY_NO_UNISTD_H

either in the .pro file, or, better to qmake command line; would you 
please try this?

thanks
	Lorenzo

P.S. it looks like building boost with msvc is fully supported: 
http://www.boost.org/doc/libs/1_41_0/more/getting_started/windows.html

-- 
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
ICQ# lbetto, 16080134     (GNU/Linux User # 158233)
HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com
http://www.myspace.com/supertrouperabba
BLOGS: http://tronprog.blogspot.com  http://longlivemusic.blogspot.com
http://www.gnu.org/software/src-highlite
http://www.gnu.org/software/gengetopt
http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net