BradyBrenot / huestacean

Philips Hue control app for desktop with screen syncing. C++ with Qt Quick GUI.
http://huestacean.com
Apache License 2.0
564 stars 54 forks source link

Failing Linking CXX executable huestacean - Make Error (Ubuntu) #144

Open 64n35h4 opened 4 years ago

64n35h4 commented 4 years ago

Hi, i'm having an issue in make process too..


[100%] Built target huestacean_autogen
[100%] Linking CXX executable huestacean
/usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/Scrt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
collect2: error: ld returned 1 exit status
CMakeFiles/huestacean.dir/build.make:111: recipe for target 'huestacean' failed
make[3]: *** [huestacean] Error 1
CMakeFiles/Makefile2:800: recipe for target 'CMakeFiles/huestacean.dir/all' failed
make[2]: *** [CMakeFiles/huestacean.dir/all] Error 2
CMakeFiles/Makefile2:807: recipe for target 'CMakeFiles/huestacean.dir/rule' failed
make[1]: *** [CMakeFiles/huestacean.dir/rule] Error 2
Makefile:205: recipe for target 'huestacean' failed
make: *** [huestacean] Error 2```
It looks like it could be a GCC issue, but i'm not sure..
Running Ubuntu 18.04
Any ideas what might be a solution?
toastard commented 4 years ago

I'm also having a similar issue on fedora when linking CXX executable. Hoping someone here can help.

[100%] Building CXX object CMakeFiles/huestacean.dir/huestacean_autogen/mocs_compilation.cpp.o
[100%] Linking CXX executable huestacean
/usr/bin/ld: /usr/lib/gcc/x86_64-redhat-linux/10/../../../../lib64/crt1.o: in function `_start':
(.text+0x24): undefined reference to `main'
collect2: error: ld returned 1 exit status
make[3]: *** [CMakeFiles/huestacean.dir/build.make:114: huestacean] Error 1
make[2]: *** [CMakeFiles/Makefile2:804: CMakeFiles/huestacean.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:811: CMakeFiles/huestacean.dir/rule] Error 2
make: *** [Makefile:208: huestacean] Error 2
toastard commented 4 years ago

So I figured it out. You need to git clone with the v2.6 tag, the current version only works with windows.

vorburger commented 3 years ago

125 seems to be about the same problem, and mentions https://stackoverflow.com/questions/11116399/crt1-o-in-function-start-undefined-reference-to-main-in-linux