Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Running Google Test in MacOS
Running Google Test in MacOS [message #1784492] Wed, 28 March 2018 15:59 Go to next message
Tuan Nam Truong is currently offline Tuan Nam TruongFriend
Messages: 11
Registered: September 2016
Junior Member
Problem: I can't use Google C++ Mocking Framework in my Eclipse Project.

I installed Google Test following a instruction from Stackoverflow (in File Attachments or https://stackoverflow.com/questions/15852631/how-to-install-gtest-on-mac-os-x-with-homebrew?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa).
And here is my example Code:
#include <iostream>
#include <gtest/gtest.h>

int main(int argc, char *argv[]){
	testing::InitGoogleTest(&argc, argv);

	//return RUN_ALL_TESTS();
	RUN_ALL_TESTS();
	return 0;
}

And I got 2 Errors from Eclipse:
make: *** [TestCPP] Error 1
symbol(s) not found for architecture x86_64	


I did search in the Internet, that these Problems are about : Undefined symbols:"_main". I have main() in my code and my data name is main.cpp.

Can anybody know what is the problem? Is there any Configurations I need to do with Eclipse?

Thank you for reading and helping.
Re: Running Google Test in MacOS [message #1784495 is a reply to message #1784492] Wed, 28 March 2018 16:39 Go to previous message
Tuan Nam Truong is currently offline Tuan Nam TruongFriend
Messages: 11
Registered: September 2016
Junior Member
Found answer here:
https://webcourse.cs.technion.ac.il/234122/Spring2012/en/faq_Working%20with%20Eclipse%20CDT.html
If anyone have same problem.
Previous Topic:[DSF-GDB] Extend FinalLaunchSequence Redo stepInitializeFinalLaunchSequence
Next Topic:Addeding -fxceptions flag to G++ Compiler
Goto Forum:
  


Current Time: Thu Sep 26 14:25:48 GMT 2024

Powered by FUDForum. Page generated in 0.03367 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top