vim version : 7.1 echo has ('cscope') : 1
vim版本:7.1 echo有(“cscope”):1
I am trying to integrate cscope environment with vim on windows. I am trying to create a new database through the following command
我正在尝试将cscope环境与windows上的vim集成在一起。我正在尝试通过以下命令创建一个新的数据库
cscope add C:\Path
cscope添加C:\路径
I get the error message E563: stat(C:\Path) error:2
我得到了错误消息E563: stat(C:\Path)错误:2。
I assume the error message is because cscope is unable to create the database file needed by it to perform it's operations. The path provided is a valid path.
我假设错误消息是因为cscope无法创建执行其操作所需的数据库文件。所提供的路径是一条有效路径。
What could be the possible reason for the following error ?
出现以下错误的可能原因是什么?
Thanks Gudge
由于Gudge
2 个解决方案
#1
2
Just to validate how you set it up ...
只是为了验证如何设置它……
-
Create the cscope database:
创建cscope数据库:
C:\Tools\src>c:\tools\bin\cscope.exe -bv .*.c .*.h
C:\ src \工具> C:\ \ bin \ cscope工具。exe bv。*。* . h c。
Generating Database ...
生成数据库……
-
Next you need to set the path to the cscope executible inside vim:
接下来需要设置到vim中可执行的cscope的路径:
se csprg=C:\tools\bin\csope.exe
se csprg = C:\ \ bin \ csope.exe工具
-
Then add the path (properly escaped) to your cscope database:
然后将路径(正确转义)添加到cscope数据库:
cs add C:\tools\src\
cs添加C:\ src \ \工具
-
Now you should be able to use cscope just fine.
现在您应该可以使用cscope了。
Note that I used vim 7.3.470 from the Cream site and my cscope is the native Win32 version hosted at Google code.
注意,我使用了来自Cream站点的vim 7.3.470,我的cscope是谷歌代码中托管的本地Win32版本。
#2
2
The reason for the error message is that you don't have a cscope database at all.
出现错误消息的原因是您根本没有cscope数据库。
In order to be able to do a successful :cs add
, you have to build the database before you try to add it.
为了能够成功地完成:cs add,您必须在尝试添加数据库之前构建数据库。
An example for building the database could be found in this Vim Tip:
Automatically create and update cscope database
在Vim技巧中可以找到一个构建数据库的示例:自动创建和更新cscope数据库
Once you built the database (say at C:/temp/cscope.out), you could open the connection to the database using :cs add C:/temp/cscope.out
一旦构建了数据库(比如在C:/temp/cscope.out),就可以使用:cs add C:/temp/cscope.out打开到数据库的连接
#1
2
Just to validate how you set it up ...
只是为了验证如何设置它……
-
Create the cscope database:
创建cscope数据库:
C:\Tools\src>c:\tools\bin\cscope.exe -bv .*.c .*.h
C:\ src \工具> C:\ \ bin \ cscope工具。exe bv。*。* . h c。
Generating Database ...
生成数据库……
-
Next you need to set the path to the cscope executible inside vim:
接下来需要设置到vim中可执行的cscope的路径:
se csprg=C:\tools\bin\csope.exe
se csprg = C:\ \ bin \ csope.exe工具
-
Then add the path (properly escaped) to your cscope database:
然后将路径(正确转义)添加到cscope数据库:
cs add C:\tools\src\
cs添加C:\ src \ \工具
-
Now you should be able to use cscope just fine.
现在您应该可以使用cscope了。
Note that I used vim 7.3.470 from the Cream site and my cscope is the native Win32 version hosted at Google code.
注意,我使用了来自Cream站点的vim 7.3.470,我的cscope是谷歌代码中托管的本地Win32版本。
#2
2
The reason for the error message is that you don't have a cscope database at all.
出现错误消息的原因是您根本没有cscope数据库。
In order to be able to do a successful :cs add
, you have to build the database before you try to add it.
为了能够成功地完成:cs add,您必须在尝试添加数据库之前构建数据库。
An example for building the database could be found in this Vim Tip:
Automatically create and update cscope database
在Vim技巧中可以找到一个构建数据库的示例:自动创建和更新cscope数据库
Once you built the database (say at C:/temp/cscope.out), you could open the connection to the database using :cs add C:/temp/cscope.out
一旦构建了数据库(比如在C:/temp/cscope.out),就可以使用:cs add C:/temp/cscope.out打开到数据库的连接