gnebehay / CppMT

Other
313 stars 184 forks source link

when built the project ,Error: 'idx' : undeclared identifier . #45

Open yanmenglu opened 7 years ago

yanmenglu commented 7 years ago

the error is image the corresponding code is image if you know the reason,please tell me .Thank you !

gnebehay commented 7 years ago

seems related to this issue: https://github.com/gnebehay/CppMT/issues/6

yanmenglu commented 7 years ago

ok,run done .Thank you very much.

bxwang2016 commented 7 years ago

@yanmenglu How could you solve this problem? I have try many times,but it doesn't work. Would you like to tell me the details? Thank you~

gloryer commented 7 years ago

@yanmenglu The same issue here, would you please tell us how you solve the error? Thanks!

yanmenglu commented 7 years ago

@gloryer @bxwang2016 ,you can try this.Maybe it work.

t_index N = points.size(); int S[2N-1]; change to int S = new int[2*N-1];

gloryer commented 7 years ago

I notice that this change has been fixed in the CppMT. But I still get error for “idx” undelared identifier. I have run Cmake to create visual studio project file successfully. Any idea for solution, please. Thank you! @yanmenglu @gnebehay

allensu0314 commented 7 years ago

@gloryer Have you fixed this error? I have met the same error with the latest code. I'll be appreciated if you can tell me any idea, thank you! ---from HUST. :D

gloryer commented 7 years ago

@ChaselS314 Not fixed yet. Do you resolve the problem?

allensu0314 commented 7 years ago

@gloryer Maybe you can try it with release mode. Antway, I fixed it in this way.

allensu0314 commented 6 years ago

Finally, I review this code for some reason, and found this bug is caused by line endings setting in windows. You guys can fixed it by change the advanced save options of lien endsing to windows(CR LF) in Visual Studio. @gloryer @bxwang2016

JimmyRaoUF commented 5 years ago

I encountered this problem as well. It's like @Chen-Su has said, the line ending issue. You can solve this by downloading a small add in tool for Visual Studio named StripEm, you can easily google it out. Be sure to use it targeted at the error file and save it before rebuild it.