Skip to content
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

MSVC compatability issue with %z format specifier in oni2pcd sample #146

Closed
strontium5 opened this issue Jun 20, 2013 · 12 comments
Closed

Comments

@strontium5
Copy link

In line 68 of pcl/tools/oni2pcd.cpp, the %zu format specifier is not compatible with the MSVC compiler. Changing to %lu resolves the issue for the MSVC compiler.

@rbrusu
Copy link
Member

rbrusu commented Jun 22, 2013

Can you please submit a patch through the pull request system?

@jspricke
Copy link
Member

jspricke commented Jul 6, 2013

Which MSVC is this? We are using %z all over the place so I doubt we can fix this easily. Some information on this: http://stackoverflow.com/questions/174612/cross-platform-format-string-for-variables-of-type-size-t

@aichim
Copy link
Member

aichim commented Jul 9, 2013

Ping, @strontium5 - could you reply to @jspricke 's question please? We have been using %zu for quite a while and never heard complaints. You might be using an exotically old version of MSVC.

@rbrusu
Copy link
Member

rbrusu commented Jul 9, 2013

I'm pretty sure now that %zu is not supported by MSVC.

@bouffa
Copy link
Contributor

bouffa commented Jul 9, 2013

I confirm that MSVC doesn't support %zu modifier which is part of C99 (MSVC doesn't support C99). A while ago, I've modified several %zu with %lu in PCL sources..

@rbrusu
Copy link
Member

rbrusu commented Jul 9, 2013

Does %lu have the same behavior with GCC/CLANG? If so, sed to the rescue for changing all PCL lines from one to the other.

@strontium5
Copy link
Author

Sorry for my late reply, but I was using the MSVC in visual studio 2010

On Tue, Jul 9, 2013 at 11:52 AM, aichim notifications@github.com wrote:

Ping, @strontium5 https://github.com/strontium5 - could you reply to
@jspricke https://github.com/jspricke 's question please? We have been
using %zu for quite a while and never heard complaints. You might be using
an exotically old version of MSVC.


Reply to this email directly or view it on GitHubhttps://github.com//issues/146#issuecomment-20684041
.

@rbrusu
Copy link
Member

rbrusu commented Sep 7, 2013

Is there an action item for this issue? If %zu is not supported by MSVC, then we need a patch/pull request in order to solve it.

@rbrusu
Copy link
Member

rbrusu commented Dec 16, 2013

Any follow up to this issue?

@rbrusu
Copy link
Member

rbrusu commented Dec 17, 2013

@bouffa is that an older version of MSVC? I believe newer ones handle it just fine, otherwise we would have heard more bug reports.

@rbrusu
Copy link
Member

rbrusu commented Jan 2, 2014

Closed due to lack of activity.

@rbrusu rbrusu closed this as completed Jan 2, 2014
@yangyanli
Copy link
Contributor

Well, I confirm that %zu doesn't work on VS2012. And this is very annoying...

Can someone confirm whether %lu works for other platforms?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants