Sysprogs forums › Forums › VisualGDB › Stray character in program.
Tagged: stray character
- This topic has 15 replies, 2 voices, and was last updated 6 years, 9 months ago by support.
-
AuthorPosts
-
February 15, 2018 at 15:58 #20111surahmanParticipant
Hi,
I’m working on the following rather basic tutorial to port a project to VGDB and I keep getting build errors:
Stray ‘/337’ in program.
But there are no stray/errant characters in the code.
Thanks
February 15, 2018 at 16:04 #20112surahmanParticipantFebruary 15, 2018 at 17:05 #20113surahmanParticipantI forgot to add this is the tutorial I am working with: https://visualgdb.com/tutorials/porting/lxss/
February 15, 2018 at 17:16 #20114supportKeymasterHi,
Please try removing the entire contents of the file and see if his helps the compilation. If it does, put half of the contents back and check again. Repeating this a few times, narrowing the scope each time should help pinpoint the location of the character.
Another option would be to try saving the file under a different encoding via File -> Save As (GCC may not support rare encodings that VS might be aware of).
February 16, 2018 at 00:08 #20119surahmanParticipantI’m now getting the following error when I try to “convert” an already built project to use VisualGDB:
VisualGDB version: 5.3.18.1973
—————— System.InvalidOperationException ——————
System.InvalidOperationException: Platform ‘VisualGDB’ referenced in the project file ‘Server’ cannot be found.
at Microsoft.Verify.FailOperation(String message, Object[] args)
at Microsoft.VisualStudio.Project.VisualC.VCProjectEngine.VCProjectShim.<AddPlatformNoEventsAsync>d__336.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Project.VisualC.VCProjectEngine.VCProjectShim.<>c__DisplayClass61_0.<<AddPlatform>b__0>d.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Project.VisualC.VCProjectEngine.ApartmentMarshaler.<>c__DisplayClass7_0.<<Invoke>b__0>d.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Threading.JoinableTask.CompleteOnCurrentThread()
at Microsoft.VisualStudio.Project.VisualC.VCProjectEngine.ApartmentMarshaler.Invoke(Func`1 method)
at Microsoft.VisualStudio.Project.VisualC.VCProjectEngine.VCProjectShim.AddPlatform(String platformName)
at mw.AddNewPlatformAndEnsureConfigurations(String b, String[] a)
at w9.b(qp1 f, IProjectEditContext e, t b, hj1 d, l g, Boolean c, a[] a)
at d61.c_2(v1 a, IProjectEditContext c, qp1 b, String d)
at jb1.NewLinuxConfiguration.Execute()February 16, 2018 at 05:05 #20122supportKeymasterHi,
Looks like you have accidentally deleted the VisualGDB MSBuild platform. Please try repairing VisualGDB via Control Panel -> Add/Remove Programs.
February 16, 2018 at 16:48 #20126surahmanParticipantThe problem persists, unfortunately.
February 16, 2018 at 18:15 #20128supportKeymasterHi,
Strange. Another option would be to uninstall VisualGDB, repair the VS installation via the VS Installer, and install VisualGDB back. If this still doesn’t help, please let us know which Visual Studio version you are using and where is it installed and we will provide more detailed steps on diagnosing MSBuild-related files.
February 16, 2018 at 20:14 #20129surahmanParticipantI uninstalled VisualGDB and that didn’t help. Repairing VS2017 Enterprise now…
Installation directory is the default one: C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE
- This reply was modified 6 years, 9 months ago by surahman.
February 16, 2018 at 20:44 #20131supportKeymasterHi,
Thanks for the update. Normally the VisualGDB platform should be installed to the following path:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\VC\VCTargets\Platforms\VisualGDB
Please double-check that this directory exists. If it doesn’t, please double-check that the VS installation path in registry is correct:
HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\VisualStudio\SxS\VS7\15.0
Below is an example of a correct value:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\
If you change the VS path in the registry, please uninstall and reinstall VisualGDB so that it can pick up the updated path.
February 16, 2018 at 23:07 #20132surahmanParticipantI can confirm that VGDB is installed in said directory and that the registry key is as specified. I ran a repair of VS2017 and a clean install of VGDB, but the problem still persists. Not sure what to try next.
February 17, 2018 at 02:12 #20139supportKeymasterHi,
Strange. Could you please try creating a new MSBuild-based VisualGDB Linux project from scratch and confirm that the problem still persists? If yes, what are the contents of the C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\VC\VCTargets\Platforms\VisualGDB folder?
February 17, 2018 at 06:45 #20140surahmanParticipantI can confirm that the MSBuild Project wizard works, but I can’t convert a ready-made project.
February 17, 2018 at 07:03 #20141supportKeymasterHi,
Thanks for confirming this. Then it looks like the project file itself is missing some of the elements the normal .vcxproj files should have. The easiest way to pinpoint this would be to use a diffing tool (e.g. KDiff3) to compare the 2 .vcxproj files side-by-side and try editing one of them to make it as close as possible to the other one. Once you encounter the step that causes this problem, you should be able to revert it on the other project to fix it.
February 17, 2018 at 16:06 #20142surahmanParticipantI think the issue might be that the project I’m trying to convert is one that was built using the VS Cross-platform wizard.
-
AuthorPosts
- You must be logged in to reply to this topic.