Wails由于项目中的C文件而出现错误。

huangapple go评论97阅读模式
英文:

Wails Giving Error due to c Files in Project

问题

我正在尝试在我的机器上(Ubuntu 22.04.2)运行 age-viewer 桌面应用程序(Go语言),但是当我在终端中运行以下命令时:

wails dev

它会显示以下错误:

Wails由于项目中的C文件而出现错误。

希望能得到帮助!

英文:

I am trying to run age-viewer desktop application (go) on my machine (ubuntu 22.04.2) but when I run:

wails dev

in the terminal it gives the following error:

Wails由于项目中的C文件而出现错误。

Any help would be appreciated!

答案1

得分: 2

agensgraph.c是Age-viewer-Go存储库中一个多余/不必要的文件,在通过wails build构建时会导致错误。

但是通过这个PR的合并,所有这些多余的文件都已经被移除了,你可以使用最新的更新更新你的本地存储库,这个问题将会得到解决。

英文:

agensgraph.c was a redundant/unnecessary file in the Age-viewer-Go repository, which is causing errors while building through wails build.

But with the merger of this PR all those redundant files have been removed, you can update your local repo with the latest updates and this problem will be solved.

答案2

得分: 2

“ageviewer-go”分支中有一些初始提交,其中包含“agensgraph.c”文件。但是随着当前桌面应用程序的开发,它不再需要。你可以删除那个文件,然后就可以继续进行了。
在将来的PR中,它将从存储库中删除,因为它会与go工作区产生冲突。

英文:

The ageviewer-go branch had some initial commits which contains agensgraph.c. But with the current development of the desktop application it's no longer needed.You can remove that file and be good to go.
In the future PR, it'll be removed from the repository as its conflicting in making go workspace as well.

答案3

得分: 2

你之所以会遇到这个错误,是因为go_viewer分支中存在一些旧文件,这些文件不属于AGE Viewer Desktop Go应用程序。这些文件包括(在项目根目录下):

  • agensgraph.c文件
  • sql目录
  • expected目录
  • age-viewer目录

这些文件将在即将提交的PR中被删除。现在,你可以直接删除这些文件和目录,然后再次尝试运行wails dev命令。

英文:

You're getting this error because there are some older files in the go_viewer branch which are not part of the AGE Viewer Desktop Go app.
These include the (at the project root):

  • agensgraph.c file
  • sql directory
  • expected directory
  • age-viewer directory

These would be removed in upcoming PRs. For now you can simply go ahead and remove these files and directories and try wails dev again.

答案4

得分: 0

你面临的错误是由于go_viewer分支中的一些过时文件引起的,例如agensgraph.csql目录和age-viewer目录。这些文件在最近的更新中已被删除。要解决此问题,你可以从本地代码库中删除这些文件和目录。一旦删除,运行上述命令将不会出现错误。

英文:

The error you are facing is due to some outdated files in the go_viewer branch, such as agensgraph.c, sql directory and age-viewer directory. <br>These files have been removed in recent updates. To resolve this, you can delete these files and directories from your local repository. Once removed, running the above command would cause no errors.

答案5

得分: -1

请尝试使用以下命令安装PostgreSQL开发库:

sudo apt-get install libpq-dev

另一种解决方法是验证是否已将postgresql.h添加到路径中。

英文:

Please, try to install the PostgreSQL development libraries by this following commands:

sudo apt-get install libpq-dev

Another way to solve this is verify if the postgresql.h is already in the path.

答案6

得分: -1

搜索postgres.h

find / -name "postgres.h" -print

并将其添加到您的路径中。

英文:

Search for postgres.h

find / -name &quot;postgres.h&quot; -print

and add to your path.

答案7

得分: -1

"postgres.h"头文件是必不可少的,但根据您遇到的错误,它并不存在。这个头文件是PostgreSQL开发包的一部分,对于成功开发和执行应用程序是必需的。

为了解决这个问题,您需要在Ubuntu计算机上设置PostgreSQL开发包。请按照以下步骤进行操作:

  1. 使用终端运行以下命令以更新软件包列表:

    sudo apt update
    
  2. 使用以下命令安装PostgreSQL开发包:

    sudo apt install libpq-dev
    

    这个命令将安装"postgres.h"头文件和其他必要的PostgreSQL开发文件。

  3. 安装完成后,运行"wails dev"命令,查看问题是否仍然出现。

安装"libpq-dev"包后,应该可以轻松获取所需的头文件,使应用程序能够无问题地构建和执行。

英文:

The "postgres.h" header file is essential but doesn't exist as shown by the error you are experiencing. This header file, which is a component of the PostgreSQL development package, is required for the successful development and execution of the application.

You must set up the PostgreSQL development package on your Ubuntu computer in order to fix this problem. To do this, take the following actions:

  1. Using the terminal to run the following command so that the package lists are updated:

    sudo apt update
    
  2. Use the command given below to install the PostgreSQL development package:

    sudo apt install libpq-dev
    

The "postgres.h" header and other essential PostgreSQL development files will be installed with this command.

  1. Run the 'wails dev' command once the installation is finished to see whether the issue still shows up.

The necessary header file should be readily available after installing the "libpq-dev" package, enabling the application to build and execute without any issues.

huangapple
  • 本文由 发表于 2023年4月22日 01:17:36
  • 转载请务必保留本文链接:https://go.coder-hub.com/76075399.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定