chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] qt-egg on windows


From: Daniel Sadilek
Subject: Re: [Chicken-users] qt-egg on windows
Date: Sat, 20 Jan 2007 01:00:04 +0100

apparently CHICKEN tries to load the compiled DLL as source code. Maybe
it doesn't contain the correct dynamic symbols to be loaded as an egg.
Guessing into the blue I would say this is a linker problem.

Hello,

this was the right hint, thanks. The qt.dll was compiled as executable
not as shared library. After running the linker command manually with
"-shared" it works fine. The hello world example and the egg-browser
are running great!

I am wondering, why it is not linked with "-shared", because actually
the TEMPLATE in qt.pro is set to "LIB".
So, the build of the qt egg under windows does not work out of the
box. I would like to help with that but I am not skilled enough in
this whole qmake, egg building process to provide a fully working
patch that does not break the build on other systems :)
So here is all I figured out:

qmake needs to be run with "-unix"; otherwise backslashes in the
Makefile break the build. The dll-file is created in the
release-subfolder of the egg-dir, so copying it to the egg-dir is
necessary. I have made this with the following patch:

==========================================================
--- qt.egg-dir.orig/qt.setup    Wed Jan  3 13:24:39 2007
+++ qt.egg-dir/qt.setup Fri Jan 19 23:19:21 2007
@@ -2,11 +2,13 @@
  (or (getenv "QTDIR")
      (error "please set the QTDIR environment variable") ) )

-(make (("Makefile" ("qt.pro") (run (,(make-pathname QTDIR
"bin/qmake") qt.pro)))
+(make (("Makefile" ("qt.pro") (run (,(make-pathname QTDIR
"bin/qmake") -unix qt.pro)))
       ("qt.so" ("prototypes.h" "main.cpp" "qt-base.c" "Makefile")
-       (run (make))
-       #+(not macosx)
-       (run (cp libqtb.so.1.0.0 qt.so)))
+       (run (make release))
+       #+(and (not macosx) (not windows))
+       (run (cp libqtb.so.1.0.0 qt.so))
+       #+windows
+       (run (cp release/qtb.dll qt.dll)))
       ("qt-base.c" ("qt-base.scm" "prototypes.h")
       (run (csc -t qt-base.scm -O2 -d1 -X easyffi)) ) )
  "qt.so")
==========================================================


The build does not find the Chicken includes and libraries
automatically, so I added them to qt.pro:

==========================================================
--- qt.egg-dir.orig/qt.pro      Fri Nov  3 08:06:28 2006
+++ qt.egg-dir/qt.pro   Fri Jan 19 18:53:59 2007
@@ -9,6 +9,7 @@
  TEMPLATE=lib
  TARGET=qtb
}
-unix:QMAKE_LFLAGS_DEBUG+=`csc -libs`
-unix:QMAKE_CFLAGS_DEBUG+=-w `csc -cflags`
QT+=opengl
+
+INCLUDEPATH=/c/programme/chicken/include
+LIBS=-L/c/programme/chicken/lib -lchicken
==========================================================


A call of "chicken-setup qt" builds only in the debug-subfolder. As I
wanted a release-version I called "make release-all" in the egg-dir. I
just copied the linker command from the make-stdout-output, added
"-shared" and ran it again.

I had to add the Chicken-bin and QT-bin directories to the Windows PATH.

This was just a quick'n'dirty solution. Much of the trouble seems to
come from using qmake. Wouldn't it be possible to go without it?

Best regards
Daniel Sadilek




reply via email to

[Prev in Thread] Current Thread [Next in Thread]