FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

QTD on Snow Leopard

 
Post new topic   Reply to topic     Forum Index -> QtD
View previous topic :: View next topic  
Author Message
mnemon



Joined: 18 Sep 2008
Posts: 9

PostPosted: Fri Nov 27, 2009 4:15 pm    Post subject: QTD on Snow Leopard Reply with quote

Tried to compile things under snow leopard.
I get the following error:

...rary/Frameworks/QtCore.framework/Headers/qglobal.h:283:2: error: #error "You are building a 64-bit application, but using a 32-bit version of Qt. Check your build configuration."

The arch flag is set i386 in CMAKE.

Somone knows whats wrong?

cheers
hagen
Back to top
View user's profile Send private message
eldar



Joined: 14 Jun 2008
Posts: 101
Location: Ufa, Russia

PostPosted: Wed Dec 16, 2009 2:14 pm    Post subject: Reply with quote

Sorry, neither of us have Mac OS X to support it. Here is some information on how to do it but I haven't checked it myself http://www.dsource.org/projects/qtd/ticket/37 . Sorry for the late reply.
Back to top
View user's profile Send private message
sonic



Joined: 23 Aug 2010
Posts: 1

PostPosted: Mon Aug 23, 2010 9:53 am    Post subject: multiple qtd compilation failures Reply with quote

Hello. Firstly, it's not hard to get the ball rolling on a snow leopard compilation. Just follow the existing Mac instructions about building qt:

http://www.dsource.org/projects/qtd/wiki/BuildMacOSX

Note that the dmd compiler patch is very simple and still works on v2.048 sources.

Now when you get to the step for compiling qtd, use the following modified cmake command from the build_dir to build 32bit:

cmake -DCMAKE_CXX_FLAGS:STRING=-m32 ../

Though things run for awhile, I eventually ran into a handful of problems in my attempt to get the full qtd compile working.

1) Two constructors in QGraphicsTextItem_shell.cpp seem to be invalid. The chained constructor line:

QtD_QObjectEntity(this, dptr)

Is no good both because the symbol dptr is doubly inherited and neither version can be cast to a void*. I replaced both with:

QtD_QObjectEntity(this, NULL)

crossed my fingers and kept going.

2) The file QPixmapCache_shell.cpp seems to have two identical methods:

extern "C" DLL_PUBLIC bool qtd_QPixmapCache_insert_string_QPixmap
(DArray key0,
void* pixmap1)

so comment one of the two out.

3) Many qt/d2/qt/core/*.d files have non-const opEquals methods. For any compiler errors, change signatures looking like:

bool opEquals(ref QRect r)

to

bool opEquals(ref const QRect r) const

These three patches got me through the generateor, dgen, and cpp_{core/gui/network/opengl/xml/svg/webkit}. But then I finally bomb out with errors in Signal.d that stumps me good:

/Users/tom/installs/qtd/trunk/qt/d2/qt/Signal.d(713): Error: Cannot interpret *cons at compile time
/Users/tom/installs/qtd/trunk/qt/d2/qt/Signal.d(713): Error: Cannot interpret *cons at compile time
/Users/tom/installs/qtd/trunk/qt/d2/qt/Signal.d(713): Error: Cannot interpret *cons at compile time
/Users/tom/installs/qtd/trunk/qt/d2/qt/Signal.d(714): Error: Integer constant expression expected instead of *cons , slotListCount
/Users/tom/installs/qtd/trunk/qt/d2/qt/Signal.d(714): Error: index 0 overflow for static array
/Users/tom/installs/qtd/trunk/qt/d2/qt/Signal.d(733): Error: __error isn't a template
Error: array index 1 is out of bounds lengths[0 .. 1]
/Users/tom/installs/qtd/trunk/qt/d2/qt/Signal.d(733): Error: __error isn't a template
Error: array index 2 is out of bounds lengths[0 .. 1]
/Users/tom/installs/qtd/trunk/qt/d2/qt/Signal.d(733): Error: __error isn't a template
/Users/tom/installs/qtd/trunk/qt/d2/qt/Signal.d(745): Error: foreach: _error_ is not an aggregate type
/Users/tom/installs/qtd/trunk/qt/d2/qt/Signal.d(745): Error: foreach: _error_ is not an aggregate type
/Users/tom/installs/qtd/trunk/qt/d2/qt/Signal.d(1121): Error: template instance qt.Signal.SignalHandler.emit!() error instantiating
make[5]: *** [CMakeFiles/qtdcore.dir/qtdcore0.o] Error 1

I think line 1121 of Signal.d:

mixin (SignalEmitter!(A)(signalType, name, index));

Is causing a compile time error in emit:

void emit(A...)(size_t signalId, A args)
[...]
auto cons = &connections[signalId];
[...]
// line 713 below
static const c = cons.slotListCount;

My guess is that my qt and/or dmd is too new. I'm running:

$ svn info
URL: http://svn.dsource.org/projects/qtd/trunk
Repository Root: http://svn.dsource.org/projects/qtd
Repository UUID: 1c76f9a9-97a6-433d-956c-bb6a2077f4c7
Revision: 331

$ dmd -v
Digital Mars D Compiler v2.048

$ qmake -v
QMake version 2.01a
Using Qt version 4.6.2 in /usr/local/Trolltech/Qt-4.6.2/lib

$ gcc -v
[...] gcc version 4.2.1 (Apple Inc. build 5646) (dot 1)

If anyone can give me some pointers or let me know if I've wondered off onto the wrong track, it would be appreciated.

<CS>
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> QtD All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group