-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Definition of ssize_t in FmqDefines.h clashes with definition in osconfig.h of DCMTK #178
Comments
Is it possible to use long instead of int64_t?
Edit: |
Actually, ssize_t depends on the platform. |
Yes, unfortunately different libraries define
As DCMTK is included first it sets the stage in our project. So
and recompile everything. Afterwards compiling and linking both libraries work. Maybe a solution like in OpenSSL with another define works to keep things separated. What do you think? |
Do you compile for 32 bit platform or 64? |
Both |
This is the definition for size_t in the windows header vcruntime.h // Definitions of common types So, size_t is different on the platforms. This should also be for ssize_t. I would define ssize_t in finalmq as: #if !defined(ssize_t) I think, DCMTK should also fix it the same way. But in case, they will not fix it, we could do the following solution: #if !defined(ssize_t) I would also define FINALMQ_WIN64_SSIZE_AS_32BIT as an cmake option. This will solve your problem. |
Perfect. I will have a look into the DCMTK repository if this has been already changed in the dev branch and contact the authors if it hasn't. |
I got the response of the DCMTK team. They added it to their issue tracker: They have a valid point: The above fix is only for WIN64. Other 64bit systems that might have not defined SSIZE_T will still use the wrong type. |
osconfig.h in DCMTK (a widely used DICOM Toolkit) already defines ssize_t as long:
When used in combination with finalmq the following error occurs in FmqDefines.h (Visual Studio 2022, SDK 19041):
The text was updated successfully, but these errors were encountered: