Re: Compilation failures using qmake + mingw / msvc
Lorenzo Bettini <[email protected]> Tue, 17 Nov 2009 23:18:39 +0100
| Newsgroups | gmane.comp.gnu.source-highlight.general |
|---|---|
| Message-ID | <[email protected]> |
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 :) cheers Lore Matthias Pospiech wrote: > I have set up a qmake .pro file to make the libary without autoconf. > (file attached) > > You will see in the following issues, that moving away from autoconf and > to windows problems > arise that indicate that the code could be improved in its plattform > independence. > So I do not want to complain that it fails compilation, but want to give > hints to improve the > plattform independence. > > Using mingw I run into the following issues: > > /source-highlight-3.1/lib/srchilite/settings.cpp:11: config.h: No such > file or directory > /source-highlight-3.1/lib/srchilite/settings.cpp:37: error: > `ABSOLUTEDATADIR' was not declared in this scope > C:/Programme/Qt/SDK/2009.04/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/io.h:176: > error: too many arguments to function `int mkdir(const char*)' > /source-highlight-3.1/lib/srchilite/settings.cpp:90: error: at this > point in file > > so that complition is stopped at settings.cpp. > > Compling with msvc-2005 is more problematic: > > The following warnings are thrown very often > \source-highlight-3.1\lib\srchilite\fileutil.h(28) : warning C4290: C++ > exception specification ignored except to indicate a function is not > __declspec(nothrow) > \source-highlight-3.1\lib\srchilite\formatterparams.h(18) : warning > C4099: 'srchilite::FormatterParams' : type name first seen using 'class' > now seen using 'struct' > \source-highlight-3.1\lib\srchilite\sourcehighlighter.h(22) : see > declaration of 'srchilite::FormatterParams' > \source-highlight-3.1\lib\srchilite\eventgenerator.h(31) : warning > C4800: 'unsigned int' : forcing value to bool 'true' or 'false' > (performance warning) > > Here again config.h does not exist (which really does not exist in the > libary, nor mingw system header files). > Is this file generated by autoconf? > lib\srchilite\settings.cpp(11) : fatal error C1083: Cannot open include > file: 'config.h': No such file or directory > > The following error is much more problematic. > lib\srchilite\sourcehighlightutils.cpp(15) : fatal error C1083: Cannot > open include file: 'dirent.h': No such file or directory > > This is a header file _only_ existing in gcc derived compilers. > Wikipedia says about it "The function is not part of the C standard", > and it is not part of any Visual Studio compiler. This means that if you > use this header it binds the libary code to gcc. > I have seen other files where I expect that they only exist in gcc, for > example <sys/stat.h>, or rather only in unix systems. > > lib\srchilite\versions.cpp(18) : error C2065: 'VERSION' : undeclared > identifier > lib\srchilite\versions.cpp(22) : error C2065: 'LIBRARY_VERSION' : > undeclared identifier > This means that some Preprocessor Variables were not defined, probably > the same as ABSOLUTEDATADIR in the mingw compilation step. > Here porting from the old toolchain to the .pro file needs completed, > but I am missing the necessary information. > > You had asked why I want to compile using msvc and did not try your > mingw compiled binaries. > Well, it is because I have also projects which currently work only with > visual studio, and for my new project where this libary > would be included I do not want to limit myself to either mingw or msvc. > > Best Regards, > Matthias Pospiech > > > ------------------------------------------------------------------------ > > _______________________________________________ > Help-source-highlight mailing list > [email protected] > http://lists.gnu.org/mailman/listinfo/help-source-highlight -- 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