CppMT icon indicating copy to clipboard operation
CppMT copied to clipboard

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

Open yanmenglu opened this issue 8 years ago • 11 comments

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

yanmenglu avatar Jan 16 '17 03:01 yanmenglu

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

gnebehay avatar Jan 16 '17 14:01 gnebehay

ok,run done .Thank you very much.

yanmenglu avatar Jan 16 '17 15:01 yanmenglu

@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~

bxwang2016 avatar Apr 11 '17 13:04 bxwang2016

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

gloryer avatar Apr 21 '17 11:04 gloryer

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

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

yanmenglu avatar Apr 22 '17 01:04 yanmenglu

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

gloryer avatar Apr 22 '17 07:04 gloryer

@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

allensu0314 avatar May 04 '17 02:05 allensu0314

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

gloryer avatar May 20 '17 02:05 gloryer

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

allensu0314 avatar May 20 '17 02:05 allensu0314

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

allensu0314 avatar May 08 '18 08:05 allensu0314

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.

JimmyRaoUF avatar Oct 01 '18 17:10 JimmyRaoUF