Build issue
Closed this issue · 9 comments
@Arsenic-ATG I'm facing this problem when I tried to run the project in Qt Creator just after cloning it
Problem Screenshot
After clicking on configure after ignoring that, some build errors are showing up :
Errors
@Karansemwal Hi!
I will need more info in order to help you.
Did you download qt via the online installer? because sometimes it does not include a compiler(which is what Im assuming from your screenshots).
@Karansemwal Hi! I will need more info in order to help you. Did you download qt via the online installer? because sometimes it does not include a compiler(which is what Im assuming from your screenshots).
I just cloned the repo, opened the project, configured and hit run but it didn't worked, errors are in ss
Yes I installed Qt from their website, does not include a compiler ?
@Karansemwal From my own experience, both offline and online installations does not include compiler.
It seems like a compiler issue since qt does not recognize the simple math functions.
I suggest reinstalling using the offline installer
There, make sure you include the mingw compiler(it might work with other compilers, but this is what I did).
I will try to reproduce the bug from another computer in case its something else.
It might also be the "build-Calculator_Unit_Testing-Desktop_x86_windows_msvc2019_pe_32bit-Profile" since this folder is configurated to the computer the project was built on(in this case, mine).
try to delete this folder and see if it changes anything.
Yes @ofekkr1, something is wrong with my Qt Creator. Its showing the same error with the previous committed project, which was working back then. I will tell you if it works or not after re-installing Qt Creator. I am on Windows btw.
@Karansemwal I found out the cause to the second screenshot that you sent.
It seems that my compiler assumed that math.h is included, which caused yours to raise these errors.
The solution was adding:
#include<math.h>
At the mainwindow
header.
I will make a pr fixing this right away.
#37 should fix the issue of the second screenshot, though I doubt it will solve the first one.
@Arsenic-ATG I'm facing this problem when I tried to run the project in Qt Creator just after cloning it Problem Screenshot
After clicking on configure after ignoring that, some build errors are showing up : Errors
sorry @Karansemwal for very late reply ( I was on a vacation so couldn't respond )
The first issue is most probably because you are trying to open entire directory in Qt-creator where it is expecting it to be a file, try opening the .pro
file instead.
The second issue, as already perfectly pointed out and fixed by @ofekkr1 is due to lack of math.h
c header in the source code, sometimes it just works as this header is often times included by some other internal headers by the language implementation which is not the case for you ( which is perfectly fine ), this one should be fixed after 6650a50
I guess we should tell qmake to enable some higher level compiler warnings when compiling the app so as to avoid such cases in future.
I'm closing the issue , since the PR fixed the issue.
Feel free to reopen if the problem still insists.