Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ubuntu下编译存在错误 #4

Open
liangyunshan opened this issue May 13, 2020 · 1 comment
Open

Ubuntu下编译存在错误 #4

liangyunshan opened this issue May 13, 2020 · 1 comment

Comments

@liangyunshan
Copy link

编译存在以下错误:
1、VideoPlayer-master/src/Widget/ShowVideoWidget.h:14: error: base/FunctionTransfer.h: 没有那个文件或目录
ShowVideoWidget.h中第14行应该改成#include "Base/FunctionTransfer.h"

2、VideoPlayer-master/src/Widget/ShowVideoWidget.cpp:2: error: showVideoWidget.h: 没有那个文件或目录
ShowVideoWidget.cpp中第2行改为#include "ShowVideoWidget.h"
ShowVideoWidget.cpp中第3行改为#include "ui_ShowVideoWidget.h"

3、以上修改后再编译提示提示:-1: error: collect2: error: ld returned 1 exit status,看错误信息是:
/home/ts/Study/Source/build-VideoPlayer-Desktop_Qt_5_7_1_GCC_64bit-Debug/../VideoPlayer-master/src/AppConfig.cpp:38: `Sleep(long)'被多次定义
obj/Obj/types.o:/home/ts/Study/Source/build-VideoPlayer-Desktop_Qt_5_7_1_GCC_64bit-Debug/../VideoPlayer-master/module/VideoPlayer/src/types.cpp:16:第一次在此定义
Makefile:289: recipe for target '../VideoPlayer-master/bin64/VideoPlayer' failed
collect2: error: ld returned 1 exit status
make: *** [../VideoPlayer-master/bin64/VideoPlayer] Error 1
这里看就是AppConfig.cpp中的Sleep函数与types.cpp中的Sleep函数重定义了
其中任意一个函数修改函数名称后错误修复

@itopsoft
Copy link
Member

编译存在以下错误:
1、VideoPlayer-master/src/Widget/ShowVideoWidget.h:14: error: base/FunctionTransfer.h: 没有那个文件或目录
ShowVideoWidget.h中第14行应该改成#include "Base/FunctionTransfer.h"

2、VideoPlayer-master/src/Widget/ShowVideoWidget.cpp:2: error: showVideoWidget.h: 没有那个文件或目录
ShowVideoWidget.cpp中第2行改为#include "ShowVideoWidget.h"
ShowVideoWidget.cpp中第3行改为#include "ui_ShowVideoWidget.h"

3、以上修改后再编译提示提示👎 error: collect2: error: ld returned 1 exit status,看错误信息是:
/home/ts/Study/Source/build-VideoPlayer-Desktop_Qt_5_7_1_GCC_64bit-Debug/../VideoPlayer-master/src/AppConfig.cpp:38: `Sleep(long)'被多次定义
obj/Obj/types.o:/home/ts/Study/Source/build-VideoPlayer-Desktop_Qt_5_7_1_GCC_64bit-Debug/../VideoPlayer-master/module/VideoPlayer/src/types.cpp:16:第一次在此定义
Makefile:289: recipe for target '../VideoPlayer-master/bin64/VideoPlayer' failed
collect2: error: ld returned 1 exit status
make: *** [../VideoPlayer-master/bin64/VideoPlayer] Error 1
这里看就是AppConfig.cpp中的Sleep函数与types.cpp中的Sleep函数重定义了
其中任意一个函数修改函数名称后错误修复

收到,马上修复

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants