Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 1

Qt-interest Archive, May 2008
Re: AW: using 32bit and 64bit QT

Pages: Prev | 1 | 2 | Next

Message 1 in thread

If I need to run both 64bit and 32bit configs on the same machine,
the problems with Qt and VC8 projects are:

- "qmake -t vcapp" does not generate a 64bit config, even when the 64bit
  command line environment is used.
  The build consequently fails, since the Qt libraries are 64bit, but the
  project itself is built in 32bit.
  I know I can manually create the 64bit configs after the fact,
  but doing that for 20 projects in the workspace is counter-productive.

- If the VC8 projects are created manually, using the Qt's VC8 integration
  plugins, the "QTDIR" variable is still set globally for the workspace.
  The "QTDIR" variable has to be different for 32bit and 64bit configs 
though,
  since the Qt libraries themselves cannot be built in the same 
directory tree.

- There does not seem to be a way to organize the header/cpp files into 
subfolders
  when generating the VC8 projects, which makes the generated VC8 
projects hard
  to use if you got more than a couple of source files in the same project.

Are there solutions known for these problems?
Especially a solution how to set the QTDIR variable per configuration in 
VC8
would allow to use manually maintained VC projects for both 64bit and 
32bit Qt.
Surprisingly that seems to be hard to achieve in Visual Studio.

Regards,
- DavidF

Peter Prade wrote:
> Since Qt 4.3.2, Qt does support VS for open source:
> http://labs.trolltech.com/blogs/2007/09/18/qtwindows-open-source-edition-to-support-vs-express/
>
> Cheers,
> Peter
>   
>> -----Ursprüngliche Nachricht-----
>> Von: Naja Melan [mailto:najamelan@xxxxxxxxx] 
>> Gesendet: Donnerstag, 24. April 2008 20:15
>> An: qt-interest@xxxxxxxxxxxxx
>> Betreff: Re: using 32bit and 64bit QT
>>
>> Well... considering eclipse is not a compiler... but a dev 
>> environment, I would think it would be tied to which compiler 
>> and OS platform your using
>>
>> Ok,
>>
>> let me reformulate that question. As Qt doesn't support VS 
>> for open source development, what is the status of compiling 
>> 64 bits on windows for open source developers?
>>
>> naja
>>
>>
>>     
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/
>
>
>
>   


Message 2 in thread

Hi,

> If I need to run both 64bit and 32bit configs on the same machine,
> the problems with Qt and VC8 projects are:
> 
> - "qmake -t vcapp" does not generate a 64bit config, even when the 64bit
>   command line environment is used.

I understand there are both 32-bit and 64-bit libraries on this system. Which 
"qmake" are you using? The one from the 32-bit or 64-bit version of Qt?

Are you really sure the 64-bit command line environment is used? Can you 
provide a dump of environment variables under this 64-bit command line 
environment? Use "set".

-- 
 [ signature omitted ] 

Message 3 in thread

I am using the 64bit qmake, that is why I get the "conflicting 
architectures" error
when trying to compile and link the generated VC8 project, which only 
provides
a 32 bit configuration.

When generating the VC project I am using the x64 command line environment
in the VC8 Start Menu, as recommended for building 64bit Qt.

Is qmake supposed to be able to create Visual Studio projects for 64bit 
configs?

- DavidF

Dimitri wrote:
> Hi,
>
>> If I need to run both 64bit and 32bit configs on the same machine,
>> the problems with Qt and VC8 projects are:
>>
>> - "qmake -t vcapp" does not generate a 64bit config, even when the 64bit
>>   command line environment is used.
>
> I understand there are both 32-bit and 64-bit libraries on this 
> system. Which "qmake" are you using? The one from the 32-bit or 64-bit 
> version of Qt?
>
> Are you really sure the 64-bit command line environment is used? Can 
> you provide a dump of environment variables under this 64-bit command 
> line environment? Use "set".
>

--
 [ signature omitted ] 

Message 4 in thread

Hi,

> I am using the 64bit qmake, that is why I get the "conflicting 
> architectures" error
> when trying to compile and link the generated VC8 project, which only 
> provides
> a 32 bit configuration.
> 
> When generating the VC project I am using the x64 command line environment
> in the VC8 Start Menu, as recommended for building 64bit Qt.
> 
> Is qmake supposed to be able to create Visual Studio projects for 64bit 
> configs?

I'm afraid I'm not sure about VC projects.

As far as I know (I'm usually not working on Windows) qmake generates Windows 
Makefiles that do not specify a 32- or 64-bit build. Whether the resulting 
binaries are 32- or 64-bit depends on the environment. At least this is true 
for Makefiles and calling nmake from the command line.

Now I'm not sure how it works within Visual Studio. Isn't it possible to chose 
32- or 64-bit targets when launching Visual Studio?

As far as I remember, it had been suggested to be able to specify 32- or 
64-bit targets on Windows, independently of the current environment. I don't 
know a status or task number for this, sorry.

Yes, I know... I don't know much on this issue, maybe I should have refrained 
from answering in the first place :-)

-- 
 [ signature omitted ] 

Message 5 in thread

qmake generating 32bit and 64bit configs for VC projects would be a neat 
feature,
combined with the ability to organize the source files into subfolders.

A VC plugin which sets the QTDIR dependent on the chosen configuration
would be the most comfortable solution though,
unless someone knows a way to do that in Visual Studio without having to 
write
a plugin.

Another way is to create a couple of .bat files to set the QTDIR environment
variable and start Visual Studio IDE in that environment.
Not as comfortable as automatic switching of QTDIR inside the IDE, but it
would probably work.

- DavidF

Dimitri wrote:
> Hi,
>
>> I am using the 64bit qmake, that is why I get the "conflicting 
>> architectures" error
>> when trying to compile and link the generated VC8 project, which only 
>> provides
>> a 32 bit configuration.
>>
>> When generating the VC project I am using the x64 command line 
>> environment
>> in the VC8 Start Menu, as recommended for building 64bit Qt.
>>
>> Is qmake supposed to be able to create Visual Studio projects for 
>> 64bit configs?
>
> I'm afraid I'm not sure about VC projects.
>
> As far as I know (I'm usually not working on Windows) qmake generates 
> Windows Makefiles that do not specify a 32- or 64-bit build. Whether 
> the resulting binaries are 32- or 64-bit depends on the environment. 
> At least this is true for Makefiles and calling nmake from the command 
> line.
>
> Now I'm not sure how it works within Visual Studio. Isn't it possible 
> to chose 32- or 64-bit targets when launching Visual Studio?
>
> As far as I remember, it had been suggested to be able to specify 32- 
> or 64-bit targets on Windows, independently of the current 
> environment. I don't know a status or task number for this, sorry.
>
> Yes, I know... I don't know much on this issue, maybe I should have 
> refrained from answering in the first place :-)
>

--
 [ signature omitted ] 

Message 6 in thread

What I don't understand, and maybe its me oversimplifying the issue, is
this.

You set your QMAKESPEC env to point to win64-msvc2005 and you create
that file inside the mkspecs directory (if it doesn't exist already, I
only use win32 for now)  and make sure it set the proper variables for
the compile and link lines... (its pretty straight forward to follow,
just a project include file really)

You set the path to point to the correct qmake (the qmake associated
with the mkspecs/win64-msvc2005) as you do today... You create the
VCPROJ, and sln if it's a subdirs type poroject file.

Then you should be done...

Am I missing something?

Scott

> -----Original Message-----
> From: David Forstenlechner [mailto:dforsten@xxxxxxxxxx]
> Sent: Monday, May 05, 2008 2:28 PM
> To: Dimitri
> Cc: qt-interest@xxxxxxxxxxxxx
> Subject: Re: AW: using 32bit and 64bit QT
> 
> qmake generating 32bit and 64bit configs for VC projects would be a
> neat
> feature,
> combined with the ability to organize the source files into
subfolders.
> 
> A VC plugin which sets the QTDIR dependent on the chosen configuration
> would be the most comfortable solution though,
> unless someone knows a way to do that in Visual Studio without having
> to
> write
> a plugin.
> 
> Another way is to create a couple of .bat files to set the QTDIR
> environment
> variable and start Visual Studio IDE in that environment.
> Not as comfortable as automatic switching of QTDIR inside the IDE, but
> it
> would probably work.
> 
> - DavidF
> 
> Dimitri wrote:
> > Hi,
> >
> >> I am using the 64bit qmake, that is why I get the "conflicting
> >> architectures" error
> >> when trying to compile and link the generated VC8 project, which
> only
> >> provides
> >> a 32 bit configuration.
> >>
> >> When generating the VC project I am using the x64 command line
> >> environment
> >> in the VC8 Start Menu, as recommended for building 64bit Qt.
> >>
> >> Is qmake supposed to be able to create Visual Studio projects for
> >> 64bit configs?
> >
> > I'm afraid I'm not sure about VC projects.
> >
> > As far as I know (I'm usually not working on Windows) qmake
generates
> > Windows Makefiles that do not specify a 32- or 64-bit build. Whether
> > the resulting binaries are 32- or 64-bit depends on the environment.
> > At least this is true for Makefiles and calling nmake from the
> command
> > line.
> >
> > Now I'm not sure how it works within Visual Studio. Isn't it
possible
> > to chose 32- or 64-bit targets when launching Visual Studio?
> >
> > As far as I remember, it had been suggested to be able to specify
32-
> > or 64-bit targets on Windows, independently of the current
> > environment. I don't know a status or task number for this, sorry.
> >
> > Yes, I know... I don't know much on this issue, maybe I should have
> > refrained from answering in the first place :-)
> >
> 
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with
> "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/

--
 [ signature omitted ] 

Message 7 in thread

Hi,

> You set your QMAKESPEC env to point to win64-msvc2005 and you create
> that file inside the mkspecs directory (if it doesn't exist already, I
> only use win32 for now)  and make sure it set the proper variables for
> the compile and link lines... (its pretty straight forward to follow,
> just a project include file really)

Yes, I suppose that's what could be implemented in a future version of Qt, for 
example win32-msvc2005-64 and win32-msvc2005-32 in addition to win32-msvc2005, 
just like there's linux-g++-32 and linux-g++-64 in addition to linux-g++.

-- 
 [ signature omitted ] 

Message 8 in thread

Hi,

> Another way is to create a couple of .bat files to set the QTDIR 
> environment
> variable and start Visual Studio IDE in that environment.
> Not as comfortable as automatic switching of QTDIR inside the IDE, but it
> would probably work.

As far as I know, this is how it is supposed to be done, and that's how it's 
done by Trolltech developers themselves. This way you can switch between 
different versions of Qt, not only 32- and 64-bit versions but also Qt 4.4, Qt 
4.3, Qt 4.2, etc.

You don't set QTDIR though, instead you set PATH so that the correct 
qmake/moc/uic/... executables are found.

-- 
 [ signature omitted ] 

Message 9 in thread

w00t - I found the solution!

It is called User Macros,
they are not available in the regular VC project properties,
you have to create a separate property sheet, then the option appears as
second entry in the General Properties category.

Each user macro you add has a checkbox to make it available as environment
variable on build, which gives me what I want,
a way to set the QTDIR in VC automatically per configuration,
without having to resort to system environment variables, batch files or 
plugins.

- DavidF
 Very happy camper.

Dimitri wrote:
> Hi,
>
>> Another way is to create a couple of .bat files to set the QTDIR 
>> environment
>> variable and start Visual Studio IDE in that environment.
>> Not as comfortable as automatic switching of QTDIR inside the IDE, 
>> but it
>> would probably work.
>
> As far as I know, this is how it is supposed to be done, and that's 
> how it's done by Trolltech developers themselves. This way you can 
> switch between different versions of Qt, not only 32- and 64-bit 
> versions but also Qt 4.4, Qt 4.3, Qt 4.2, etc.
>
> You don't set QTDIR though, instead you set PATH so that the correct 
> qmake/moc/uic/... executables are found.
>

--
 [ signature omitted ] 

Message 10 in thread

When compiling my projects with Qt 4.4.0 on the VC8 compiler I am getting
a lot of these warnings in the QtConcurrency library:

q:\qt\64_static\include\qtcore\../../src/corelib/concurrent/qtconcurrentiteratekernel.h(71) 
: warning C4512: 'QtConcurrent::BlockSizeManager': Zuweisungsoperator 
konnte nicht generiert werden
q:\qt\64_static\include\qtcore\../../src/corelib/concurrent/qtconcurrentiteratekernel.h(53): 
Siehe Deklaration von 'QtConcurrent::BlockSizeManager'

Appearantly the assignment operator for QtConcurrent::BlockSizeManager 
could not be created.

I can patch the Qt release locally to avoid those warnings, could we 
have those fixed for Qt 4.4.1 please?

Cheers,
- DavidF

--
 [ signature omitted ] 

Message 11 in thread

On Thursday 08 May 2008 00:10:12 David Forstenlechner wrote:
> I can patch the Qt release locally to avoid those warnings, could we
> have those fixed for Qt 4.4.1 please?

please send your patch to qt-bugs@tt 
I think i remember somone saying qtconcurrent won't support msvc at all :P




-- 
 [ signature omitted ] 

Message 12 in thread

wtf?
No QtConcurrent on VC?
That would be horrible, I have been looking forward to using that feature.

- DavidF

Arvid Ephraim Picciani wrote:
> On Thursday 08 May 2008 00:10:12 David Forstenlechner wrote:
>   
>> I can patch the Qt release locally to avoid those warnings, could we
>> have those fixed for Qt 4.4.1 please?
>>     
>
> please send your patch to qt-bugs@tt 
> I think i remember somone saying qtconcurrent won't support msvc at all :P
>
>
>
>
>   


Message 13 in thread

Hi,

> I think i remember somone saying qtconcurrent won't support msvc at all :P

Not at all, QtConcurrent will of course be supported under MSVC:
http://doc.trolltech.com/4.4/supported-platforms.html#supported-features

Older compilers such as MSVC 6 are not supported.

-- 
 [ signature omitted ] 

Message 14 in thread

I am glad to hear that QtConcurrent is available under the newer MSVC 
compilers.

I am also pleased to hear that MSVC 6 is no longer supported.
Trying to develop modern, cross platform C++ applications using the buggy,
pre-standard MSVC 6 libraries on Windows is insane.

It was quite a fast IDE though, but its time to move on, and leave MSVC 
97 to history.

- DavidF

Dimitri wrote:
> Hi,
>
>> I think i remember somone saying qtconcurrent won't support msvc at 
>> all :P
>
> Not at all, QtConcurrent will of course be supported under MSVC:
> http://doc.trolltech.com/4.4/supported-platforms.html#supported-features
>
> Older compilers such as MSVC 6 are not supported.
>

--
 [ signature omitted ] 

Message 15 in thread

Hi,

> I can patch the Qt release locally to avoid those warnings, could we 
> have those fixed for Qt 4.4.1 please?

Report bugs to Trolltech so that they can be fixed in an upcoming version of Qt:
	http://doc.trolltech.com/4.4/bughowto.html
	http://trolltech.com/developer/task-tracker

-- 
 [ signature omitted ] 

Pages: Prev | 1 | 2 | Next