kplato compile problem on windows
Pierre Stirnweiss
pstirnweiss at googlemail.com
Wed Jan 26 07:46:35 GMT 2011
Hi Dag,
sorry to nag you again. I have some questions related to the external (made
internal) dependency for the scheduler (librcps). Was there a reason to copy
the code inside our repository instead of linking to it as an external lib?
I have a couple of problems with it. The first problem, which is now solved
is that the files have a .c extension, although they are c++. I (locally)
renamed them. However, that fix might not be desirable, the code being from
external source. In that case I think there is the possibility to add a flag
to the CMakeList.txt. Tell me what you think is best.
The problem I am now stuck at is coming from this:
537 int job_compare(const void *a, const void *b) {
538 return a - b;
539 }
MSVC tells me that the size of const void* is unknown. On looking on the
web, I see people explaining that since the object type, and therefore size
is unknown you cannot (at least in msvc) do pointer math on these. There are
actually some quite heated discussions on the merit of msvc/gcc spawning
from this, funny.
Basically it seems that the consensus is to cast the pointer to a char* if
you want to do pointer arithmetic.
Now, I am not actually completely sure I understand what is wanted here, but
I assume this code is basically a: if(job a == job b) return 0 else return
!0. I guess then that casting the pointers to char* wouldn't affect the
logic, would it?
Any other suggestion for this? Should I contact the original author of the
lib?
Thanks,
PierreSt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/calligra-devel/attachments/20110126/8417d5b5/attachment.htm>
More information about the calligra-devel
mailing list