I am trying to create my C project using the Gtest static library ( gtest_main.a ). I have included IDE information about the library file and the corresponding path in the linker section, but I still get the following error:
******** Build of configuration Debug for project CPP_GTEST ****
**** Internal Builder is used for build ****
g ++ -LC: / UT_automation_tools / CPP_GTEST / lib -o CPP_GTEST.exe ut_src \ ut_asd.o mock_lib \ sgn \ sgn_asd.o asd \ asd.o -lgtest_main
c: / mingw / bin /../ lib / gcc / mingw32 / 4.6.2 /../../../../ mingw32 / bin / ld.exe: cannot find -lgtest_main
collect2: ld returned 1 exit status
Build error occurred, build is stopped
Time consumed: 750 ms. ****
I saved the linkter linker command line as it is by default present in eclipse ${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}
I searched for search queries to solve the problem, and I tried various methods that I come up with during the search, but could not solve the problem.
Thiru source share