Hi qwt folks,
maybe this would be more adequate to post to the qwt mailing-list, I'll report here first anyway:
compiling 5.0.x or 5.2.x on Opensolaris 6/09 with Sun cc breaks at:
slow@os:~/qwt-5.0.2/src$ make
CC -c -O2 -mt -KPIC -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -DQT_SHARED -DQT_TABLET_SUPPORT -I/opt/csw/mkspecs/solaris-cc -I. -I/opt/csw//include -Imoc/ -o obj/qwt_plot_layout.o qwt_plot_layout.cpp
"qwt_plot_layout.cpp", line 815: Error: QMIN is not defined.
slow@os:~/qwt-5.0.2/src$ make
CC -c -O2 -mt -KPIC -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -DQT_SHARED -DQT_TABLET_SUPPORT -I/opt/csw/mkspecs/solaris-cc -I. -I/opt/csw//include -Imoc/ -o obj/qwt_plot_layout.o qwt_plot_layout.cpp
"qwt_plot_layout.cpp", line 815: Error: QMIN is not defined.
To copy to clipboard, switch view to plain text mode
Huh? Whats happening? There's not QMIN in qwt_plot_layout.cpp:
$ grep QMIN qwt_plot_layout.cpp
$
$ grep QMIN qwt_plot_layout.cpp
$
To copy to clipboard, switch view to plain text mode
So probably some prepoccessing going foobar?
slow@os:~/qwt-5.0.2/src$ grep QMIN *
qwt_math.h:#define qwtMin QMIN
slow@os:~/qwt-5.0.2/src$ grep QMIN *
qwt_math.h:#define qwtMin QMIN
To copy to clipboard, switch view to plain text mode
Ah! Line 815 is indeed calling qwtMin. But where's QMIN ?
slow@os:~/qwt-5.0.2/src$ grep QMIN /opt/csw/include/*.h
/opt/csw/include/qglobal.h:#define QMIN(a, b) ((a) < (b) ? (a) : (b))
/opt/csw/include/qglobal.h:#define QMIN(a, b) ((a) < (b) ? (a) : (b))
To copy to clipboard, switch view to plain text mode
It's another macro. Hm. Let's see what the preprocessor is doing for us:
slow@os:~/qwt-5.0.2/src$ CC -E -O2 -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -DQT_SHARED -DQT_TABLET_SUPPORT -I/opt/csw/mkspecs/solaris-cc -I. -I/opt/csw//include -Imoc/ qwt_plot_layout.cpp > qwt_plot_layout.i
slow@os:~/qwt-5.0.2/src$ grep QMIN *.i
qwt_plot_layout.i:length += QMIN
qwt_plot_layout.i:length += QMIN
slow@os:~/qwt-5.0.2/src$ CC -E -O2 -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -DQT_SHARED -DQT_TABLET_SUPPORT -I/opt/csw/mkspecs/solaris-cc -I. -I/opt/csw//include -Imoc/ qwt_plot_layout.cpp > qwt_plot_layout.i
slow@os:~/qwt-5.0.2/src$ grep QMIN *.i
qwt_plot_layout.i:length += QMIN
qwt_plot_layout.i:length += QMIN
To copy to clipboard, switch view to plain text mode
Ouch! It didn't get expanded twice! gcc does a better job:
slow@os:~/qwt-5.0.2/src$ g++ -E -O2 -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -DQT_SHARED -DQT_TABLET_SUPPORT -I/opt/csw/mkspecs/solaris-cc -I. -I/opt/csw//include -Imoc/ qwt_plot_layout.cpp > qwt_plot_layout.i
slow@os:~/qwt-5.0.2/src$ grep QMIN *.i
slow@os:~/qwt-5.0.2/src$ g++ -E -O2 -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -DQT_SHARED -DQT_TABLET_SUPPORT -I/opt/csw/mkspecs/solaris-cc -I. -I/opt/csw//include -Imoc/ qwt_plot_layout.cpp > qwt_plot_layout.i
slow@os:~/qwt-5.0.2/src$ grep QMIN *.i
To copy to clipboard, switch view to plain text mode
I'm currently also reading my way through the specs and documentation in order to get a clue.
Anybody?
-slow
Bookmarks