what is reason behind below error when we execute make command ?
-
g++ -Wl,-O1 -o LaserModule -lQt5Gui -lQt5Core -lGLESv2 -lpthread
/usr/lib/gcc/arm-linux-gnueabihf/6/../../../arm-linux-gnueabihf/Scrt1.o: In function_start': (.text+0x44): undefined reference tomain'
collect2: error: ld returned 1 exit status
Makefile:125: recipe for target 'LaserModule' failed
make: *** [LaserModule] Error 1 -
g++ -Wl,-O1 -o LaserModule -lQt5Gui -lQt5Core -lGLESv2 -lpthread
/usr/lib/gcc/arm-linux-gnueabihf/6/../../../arm-linux-gnueabihf/Scrt1.o: In function_start': (.text+0x44): undefined reference tomain'
collect2: error: ld returned 1 exit status
Makefile:125: recipe for target 'LaserModule' failed
make: *** [LaserModule] Error 1@Qt-embedded-developer said in what is reason behind below error when we execute make command ?:
undefined reference to main'
Well, main() function is missing. Make sure you have a cpp file with main() function...
-
g++ -Wl,-O1 -o LaserModule -lQt5Gui -lQt5Core -lGLESv2 -lpthread
/usr/lib/gcc/arm-linux-gnueabihf/6/../../../arm-linux-gnueabihf/Scrt1.o: In function_start': (.text+0x44): undefined reference tomain'
collect2: error: ld returned 1 exit status
Makefile:125: recipe for target 'LaserModule' failed
make: *** [LaserModule] Error 1@Qt-embedded-developer said in what is reason behind below error when we execute make command ?:
g++ -Wl,-O1 -o LaserModule -lQt5Gui -lQt5Core -lGLESv2 -lpthreadFurther to @jsulm correctly stating that
mainfunction is missing. If you look at this link line it outputs toLaserModulebut it does not seem to have any input module of your own at all. For example, if you have amain.cppwe should be seeingmain.o, or if you have aLaserModule.cppwe should be seeingLaserModule.o, among the files being linked. So look at your project/how this line was generated.