PDA

View Full Version : Alternative Compiler



Rayven
25th May 2006, 20:45
I have been developing an application on Red Hat Linux using the commerical version of Qt4. When I first developed the user interfaces I used g++ along with qmake. However, I now must integrate my interfaces with code generated 10+ years ago using Fortran (Sun f77) and C (Sun cc). We have purchased new compilers (Portland Group pgCC, pgcc, pgf77) and are required to use these compilers (please dont ask why...I do not know). My interfaces compile fine when using QMake and g++, but I get lots of linker errors when I modify the generated Makefile (from qmake) to use the PG compilers. Does Qt support any other X11 compilers other than the opensource gcc/g++? Is there any documentation on creating your own makefile (with adding moc, no uic needed)? I have searched the posts on here, but could not find anything. Thanks!.

UPDATE: I suppose I should clarify the use of the Fortran code. The Fortran code is being called from within the C code directly, and is not a "stand alone" app (there is no main). All this works with the PG compilers, just not the Qt portion.

wysota
25th May 2006, 20:58
pgcc should be supported, at least I see files for it in qmake specs directory.

Try running qmake with -spec /path/to/qtdir/mkspec/linux-pgcc parameter. Alternatively you can set the QMAKESPEC environment variable to the path of linux-pgcc directory in your Qt installation.

Rayven
25th May 2006, 21:43
This looks like the solution. However, when I run make, all the Qt function calls cannot be found such as lbl->setBuddy() etc. Is this a problem with using #include <QLabel> instead of #include <QLabel.h> :confused:

Thanks wysota for the VERY quick response. :D

wysota
25th May 2006, 21:57
You might need to recompile Qt with the new compiler.