Merge cd80ab87ae5fc4d466bd7a844fe67e697adb2b98 into 1b96fa13f549387b7549cc89e1a785cf143a1a50

This commit is contained in:
Xiang Xiao 2025-11-14 12:18:32 +08:00 committed by GitHub
commit f16909a10d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -61,7 +61,7 @@ void loop() { RUN_ALL_TESTS(); }
GTEST_API_ int _tmain(int argc, TCHAR** argv) {
#else
GTEST_API_ int main(int argc, char** argv) {
extern "C" GTEST_API_ int main(int argc, char** argv) {
#endif // GTEST_OS_WINDOWS_MOBILE
std::cout << "Running main() from gmock_main.cc\n";
// Since Google Mock depends on Google Test, InitGoogleMock() is

View File

@ -58,7 +58,7 @@ GTEST_API_ int main() {
#else
// Normal platforms: program entry point is main, argc/argv are initialized.
GTEST_API_ int main(int argc, char **argv) {
extern "C" GTEST_API_ int main(int argc, char **argv) {
printf("Running main() from %s\n", __FILE__);
testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();