jaycetyle / vscode-gnu-global

Visual Studio Code GNU Global Extension
MIT License
33 stars 14 forks source link

isssues with global and windows ? #21

Closed nirdrang closed 4 years ago

nirdrang commented 4 years ago

I get the following while trying to list all refernces. Unable to open 'mavlink_messages.cpp': Unable to read file '\c\PX4\home\Firmware\src\modules\mavlink\mavlink_messages.cpp' (Error: Unable to resolve non-existing file '\c\PX4\home\Firmware\src\modules\mavlink\mavlink_messages.cpp').

I am curious why i see these unix like pathname "\c\PX4" instead of a relative path or a windows path. Thanks

jaycetyle commented 4 years ago

Hi,

One way to test your gnu global is to run it in the command prompt.

  1. Open windows command prompt.
  2. cd to your project. Make sure you have generated the GTAGS files.
  3. Run global command. (You may need to add it to your PATH environment variable). For example: C:\Users\JayceLin\e2fsprogs>global --encode-path " " -xaT DEBUG Please replace 'DEBUG' to any symbols in your project. Then you will get the output looks like: DEBUG 30 C:/Users/JayceLin/linux/e2fsprogs/contrib/spd_readdir.c #define DEBUG
  4. please check the output is windows style path.

If this method cannot find the problem, please provide your gnu global version, the settings of this extension in your project, and if you are using WSL or not to me.

Thanks!

nirdrang commented 4 years ago

c:\PX4\home\Firmware>global --encode-path " " -xaT VEHICLE_MODE_FLAG VEHICLE_MODE_FLAG 85 /c/PX4/home/Firmware/src/modules/commander/Commander.cpp typedef enum VEHICLE_MODE_FLAG { VEHICLE_MODE_FLAG 95 /c/PX4/home/Firmware/src/modules/commander/Commander.cpp } VEHICLE_MODE_FLAG;

I dont get windows style path names .... Any help will be appreciated. The global utils comes from msys2 64 bit. I am not using WSL. Thanks, Nir.

c:\PX4\home\Firmware>global --version global (GNU GLOBAL) 6.6.4 Powered by Berkeley DB 1.85. Copyright (c) 1996-2019 Tama Communications Corporation License GPLv3+: GNU GPL version 3 or later < http://www.gnu.org/licenses/gpl.html> This is free software; you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

"gnuGlobal.autoUpdate": "Default" "gnuGlobal.completion": "Enabled" "gnuGlobal.debugMode": "Disabled" "gnuGlobal.encoding": "utf-8" "gnuGlobal.globalExecutable": "global" "gnuGlobal.gtagsExecutable": "gtags" "gnuGlobal.gtagsForceCpp": "Disabled" "gnuGlobal.gtagSkipSymlink": "None" "gnuGlobal.libraryPath": [] "gnuGlobal.objDirPrefix": ""

nirdrang commented 4 years ago

Hi, I changed from msys2 binaries to the original binary from Jason hood web site and now i get correct path names.

c:\PX4\home\Firmware>global --encode-path " " -xaT VEHICLE_MODE_FLAG VEHICLE_MODE_FLAG 86 c:/PX4/home/Firmware/src/modules/commander/Commander.cpp typedef enum VEHICLE_MODE_FLAG { VEHICLE_MODE_FLAG 96 c:/PX4/home/Firmware/src/modules/commander/Commander.cpp } VEHICLE_MODE_FLAG;

Thanks, Nir.

On Sat, Sep 12, 2020 at 9:54 PM Nir Drang nirdrang@gmail.com wrote:

c:\PX4\home\Firmware>global --encode-path " " -xaT VEHICLE_MODE_FLAG VEHICLE_MODE_FLAG 85 /c/PX4/home/Firmware/src/modules/commander/Commander.cpp typedef enum VEHICLE_MODE_FLAG { VEHICLE_MODE_FLAG 95 /c/PX4/home/Firmware/src/modules/commander/Commander.cpp } VEHICLE_MODE_FLAG;

I dont get windows style path names .... Any help will be appreciated. The global utils comes from msys2 64 bit. I am not using WSL. Thanks, Nir.

c:\PX4\home\Firmware>global --version global (GNU GLOBAL) 6.6.4 Powered by Berkeley DB 1.85. Copyright (c) 1996-2019 Tama Communications Corporation License GPLv3+: GNU GPL version 3 or later < http://www.gnu.org/licenses/gpl.html> This is free software; you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

"gnuGlobal.autoUpdate": "Default" "gnuGlobal.completion": "Enabled" "gnuGlobal.debugMode": "Disabled" "gnuGlobal.encoding": "utf-8" "gnuGlobal.globalExecutable": "global" "gnuGlobal.gtagsExecutable": "gtags" "gnuGlobal.gtagsForceCpp": "Disabled" "gnuGlobal.gtagSkipSymlink": "None" "gnuGlobal.libraryPath": [] "gnuGlobal.objDirPrefix": ""

jaycetyle commented 4 years ago

Hi,

Has this issue been resolved? If so, I want to close it.

Thanks

nirdrang commented 4 years ago

yes its closed now ! Thanks

On Sun, Sep 13, 2020 at 4:10 PM Lin Chieh notifications@github.com wrote:

Hi,

Has this issue been resolved? If so, I want to close it.

Thanks

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jaycetyle/vscode-gnu-global/issues/21#issuecomment-691669671, or unsubscribe https://github.com/notifications/unsubscribe-auth/AICMV7VGKXM64C4JYWB5AWTSFTAFHANCNFSM4RG6HT7Q .