[Kst] fixes for cdf datasource

Nicolas.Brisset at eurocopter.com Nicolas.Brisset at eurocopter.com
Fri Nov 5 10:46:12 CET 2004


George,

I have made a fresh install of kst (Oct. 6th snapshot as I can't download more 
recent snapshots as I wrote yesterday) on a Linux PC and found out the 
compilation problem there is. There are two header files called cdf.h : a 
local one from the datasource and the one that comes with the cdf 
distribution. Apparently, the local file was included twice. It still worked 
as the cdfdist.h file I also used (even though it is not installed by 
default) includes the cdf.h file from the cdf distribution itself.

To sum up, as I think it is not possible to change the name of the cdf.h file 
in the cdf distribution and I don't know of a reliable way to force "#include 
<cdf.h>" to pick the non-local file, I'd suggest doing the following:
1) rename cdf.h in the datasources/cdf/ dir to cdf_source.h and change the 
corresponding include in cdf.cpp (I know CVS makes it difficult to rename 
files, but we don't care about the revision history so much here anyway so it 
should be OK)
2) add the attached cdfdefs.h file to the same directory to avoid including a 
header that is not installed by default by cdf and changing the '#include 
<cdfdist.h>' to '#include "cdfdefs.h"' in cdf.cpp. cdfdefs.h is a 
stripped-down version of cdfdist.h wher I left some platform defines that may 
be relevant for some people and the minimum used by my datasource.

Hope you can commit this in time for 1.0.0 otherwise people will not be able 
to use the cdf datasource without some tweaking :-) By the way, we could 
register kst as one of the software able to deal with cdf files on the cdf 
site...

Nicolas

-------------- next part --------------
A non-text attachment was scrubbed...
Name: cdfdefs.h
Type: text/x-chdr
Size: 5346 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kst/attachments/20041105/af6b81b0/cdfdefs.bin


More information about the Kst mailing list