Stray character in program.

Sysprogs forums Forums VisualGDB Stray character in program.

Viewing 15 posts - 1 through 15 (of 16 total)
  • Author
    Posts
  • #20111
    surahman
    Participant

    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

    #20112
    surahman
    Participant
    #20113
    surahman
    Participant

    I forgot to add this is the tutorial I am working with: https://visualgdb.com/tutorials/porting/lxss/

    #20114
    support
    Keymaster

    Hi,

    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).

    #20119
    surahman
    Participant

    I’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()

    #20122
    support
    Keymaster

    Hi,

    Looks like you have accidentally deleted the VisualGDB MSBuild platform. Please try repairing VisualGDB via Control Panel -> Add/Remove Programs.

    #20126
    surahman
    Participant

    The problem persists, unfortunately.

    #20128
    support
    Keymaster

    Hi,

    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.

    #20129
    surahman
    Participant

    I 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.
    #20131
    support
    Keymaster

    Hi,

    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.

    #20132
    surahman
    Participant

    I 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.

    #20139
    support
    Keymaster

    Hi,

    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?

    #20140
    surahman
    Participant

    I can confirm that the MSBuild Project wizard works, but I can’t convert a ready-made project.

    #20141
    support
    Keymaster

    Hi,

    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.

    #20142
    surahman
    Participant

    I think the issue might be that the project I’m trying to convert is one that was built using the VS Cross-platform wizard.

Viewing 15 posts - 1 through 15 (of 16 total)
  • You must be logged in to reply to this topic.