NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Missing "main" running test in C++ library project

 
Post new topic   Reply to topic    NetBeans Forums -> C/C++ Users
View previous topic :: View next topic  
Author Message
androticus



Joined: 14 Apr 2017
Posts: 2

PostPosted: Fri Apr 14, 2017 2:45 am    Post subject: Missing "main" running test in C++ library project Reply with quote

I have created a C++ Library project, then added a test, both a CppUnit test and a Simple C++ test. In both cases, my tests compile, but won't run, complaining about a missing main, even though there is a main file. But it is not properly being linked in, ex (my test runner file is called VectorHelperTestRunner.cpp but is not linked in)

Code:
g++ -o build/Debug/GNU-MacOSX/tests/TestFiles/f1 build/Debug/GNU-MacOSX/src/engine/nparea_nomain.o build/Debug/GNU-MacOSX/src/engine/nppool_nomain.o build/Debug/GNU-MacOSX/src/engine/npprjn_nomain.o build/Debug/GNU-MacOSX/src/util/VectorHelper_nomain.o build/Debug/GNU-MacOSX/src/util/aapoint_nomain.o
Undefined symbols for architecture x86_64: "_main", referenced from: implicit entry/start for main executable ld: symbol(s) not found for architecture x86_64


I've searched the Internet, and the Netbeans IDE and project hieararchy in vain to try to find out why it is not linking the main so the test can run. Thanks for any help!
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> C/C++ Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo