Re: [Qt-creator] CONFIG variables not as expected

2020-01-02 Thread André Hartmann

Hi again Bob,

> Anyway, my remaining question is whether there is a straightforward
> way to detect in the .pro file which Microsoft compiler is being used?
> It used to be easy.

So you are saying, there is a regression in Qt 5.14 and you cannot 
detect the MSVC compiler anymore? Then please report that with a minimal 
reproducing example at bugreports.qt.io (and provide a link here so 
others can follow).


Thanks and regards,
André

Am 02.01.20 um 09:01 schrieb Bob Babcock:

=?UTF-8?Q?Andr=c3=a9_Hartmann?=  wrote in
news:c499ad3a-900e-da5a-aec4-19768014a...@iseg-hv.de:


In your first mail you talked about MinGW, now MSVC, so I still don't
get the full picture of your problem. You will need to provide some
more information.


I build with both, but don't mix them.  The MinGW part of my questions was
answered by your previous post.  I'm mostly a windows guy, but I have
written code that works in both Windows and Linux.


For C++ libraries, that's correct, you cannot mix MinGW and MSVC. For
libraries with pure C interface, it does not matter.
Note that MSVC2015 and 2017 are binary compatible, so you can exchange
libs.


I guess I knew that, but somehow it just feels wrong.  From a quick search,
looks like 2019, which I haven't touched yet, is also binary compatible.
Are they also compatible when you consider compilation flags, new C++
feature support, and bugs to work around? Those are some reasons why you
might want to detect which MSVC compiler is being used.

Anyway, my remaining question is whether there is a straightforward way to
detect in the .pro file which Microsoft compiler is being used?  It used to
be easy.

Thanks.

___
Qt-creator mailing list
Qt-creator@qt-project.org
https://lists.qt-project.org/listinfo/qt-creator


___
Qt-creator mailing list
Qt-creator@qt-project.org
https://lists.qt-project.org/listinfo/qt-creator


Re: [Qt-creator] CONFIG variables not as expected

2020-01-02 Thread Bob Babcock
=?UTF-8?Q?Andr=c3=a9_Hartmann?=  wrote in
news:c499ad3a-900e-da5a-aec4-19768014a...@iseg-hv.de: 

> In your first mail you talked about MinGW, now MSVC, so I still don't 
> get the full picture of your problem. You will need to provide some
> more information.

I build with both, but don't mix them.  The MinGW part of my questions was 
answered by your previous post.  I'm mostly a windows guy, but I have 
written code that works in both Windows and Linux.

> For C++ libraries, that's correct, you cannot mix MinGW and MSVC. For 
> libraries with pure C interface, it does not matter.
> Note that MSVC2015 and 2017 are binary compatible, so you can exchange
> libs. 

I guess I knew that, but somehow it just feels wrong.  From a quick search, 
looks like 2019, which I haven't touched yet, is also binary compatible.  
Are they also compatible when you consider compilation flags, new C++ 
feature support, and bugs to work around? Those are some reasons why you 
might want to detect which MSVC compiler is being used.

Anyway, my remaining question is whether there is a straightforward way to 
detect in the .pro file which Microsoft compiler is being used?  It used to 
be easy.

Thanks.

___
Qt-creator mailing list
Qt-creator@qt-project.org
https://lists.qt-project.org/listinfo/qt-creator


Re: [Qt-creator] CONFIG variables not as expected

2020-01-01 Thread André Hartmann

Hi Bob,


but detecting the compiler version is more awkward.

Why?


I can do
win32-msvc2015 { Do stuff... }
but not
win32-msvc2017 { Do stuff... }

The only way I see to tell that it's 2017 is to check if it isn't any other
MS compiler that I use.  Perhaps it's silly, but I try to maintain
compatibility with 2013, 2015 and 2017 and Qt back to 5.9x.


In your first mail you talked about MinGW, now MSVC, so I still don't 
get the full picture of your problem. You will need to provide some more 
information.



I use some 3rd party libraries that are built separately and it seems
safest to use libraries built with a matching compiler. 


For C++ libraries, that's correct, you cannot mix MinGW and MSVC. For 
libraries with pure C interface, it does not matter.


Note that MSVC2015 and 2017 are binary compatible, so you can exchange libs.

Regards, André


Less important, I include compiler version in my About screen and use > DEFINES 
to get that info into the code.



___
Qt-creator mailing list
Qt-creator@qt-project.org
https://lists.qt-project.org/listinfo/qt-creator


___
Qt-creator mailing list
Qt-creator@qt-project.org
https://lists.qt-project.org/listinfo/qt-creator


Re: [Qt-creator] CONFIG variables not as expected

2019-12-31 Thread Bob Babcock
=?UTF-8?Q?Andr=c3=a9_Hartmann?=  wrote in news:709647cd-
724b-693d-893a-7bed3bb43...@gmx.de:

>> but detecting the compiler version is more awkward.
> Why?

I can do
   win32-msvc2015 { Do stuff... }
but not
   win32-msvc2017 { Do stuff... }

The only way I see to tell that it's 2017 is to check if it isn't any other 
MS compiler that I use.  Perhaps it's silly, but I try to maintain 
compatibility with 2013, 2015 and 2017 and Qt back to 5.9x.

I use some 3rd party libraries that are built separately and it seems 
safest to use libraries built with a matching compiler.  Less important, I 
include compiler version in my About screen and use DEFINES to get that 
info into the code.

___
Qt-creator mailing list
Qt-creator@qt-project.org
https://lists.qt-project.org/listinfo/qt-creator


Re: [Qt-creator] CONFIG variables not as expected

2019-12-31 Thread André Hartmann

Hi Bob,


I'm using Qt 5.14.0 and the bundled Creator 4.11.0 under Windows 7.
In a new or previously existing project using qmake, I display the contents
of CONFIG by message($$CONFIG) in the .pro file.

For a msvc3015 project, I see win32-msvc2015 in the list values.

For a msvc2017 project, I do not see win32-msvc2017 or anything similar.

For a gcc project, I do not see debug_and_release like I do with msvc
projects.


That's probably the outcome from QTBUG-78445, which resulted in QTBUG-80792

There is work ongoing to *allow* separate Qt debug builds again, but the
official release will (most likely) only contain release DLLs with
separate debug information.

> I can add CONFIG *= debug_and_release so I get debug and release build
> subdirectories

I'm actually doing the other way round, as I'm always shadow-building,
so the additional only complicate things.

> but detecting the compiler version is more awkward.

Why?

Best regards,
André

https://bugreports.qt.io/browse/QTBUG-78445
https://bugreports.qt.io/browse/QTBUG-80792




___
Qt-creator mailing list
Qt-creator@qt-project.org
https://lists.qt-project.org/listinfo/qt-creator



___
Qt-creator mailing list
Qt-creator@qt-project.org
https://lists.qt-project.org/listinfo/qt-creator