|
Hi, all,
In our previous C program (os: linux), we used Xlib to
implement a display
program in C to show a very huge image, The size of the image usually 200MB or more. And now, we need to add some widgets like menu, scroll bar, printing support etc to the image window which Xlib doesn't have. We decided to try Qt to do these kind of implementations.
(wrap my code into Qwidget subclass, let Qt create GUI, then use X11 to draw
into it, thanks Aaron and Lew for suggestion)
I've already include my C code into C++ framework successfully, ( I made some modifications to the display.c file, make sure that it can be compiled using g++, then I renamed the main function in display.c file, and created a very short display.cpp file, #include "display.c", in the main function in display.cpp file, I pass command lines arguments to renamed main function in display.c file. it compiles and runs successfully! ), This part is no relationship with Qt. When I was doing the above steps, I always
used my original makefile (please find it as attached, I just changed gcc
to g++ and file name from display.c to display.cpp)
But now, I want to wrap my xlib implementation into Qwidget subclass, I have to change my makefile to link them together. How can I do it? use qmake? (I tried but it tends to compiles all the c files and cpp files, and gives me lots of errors like undefined reference) or any other ideas? Thank you advance! Jane |
tempmakefile
Description: Binary data
