I have Eclipse 3.4.1
I tried to get cppunit to work with it on MacOS X but unsuccessful.
I could see the archive file libCppUnitBuild.a with the following table of contents:
macbook$ ar -tv /workspace3/CppUnitBuild/Debug/libCppUnitBuild.a
rw-r--r-- 501/20 112724 Mar 13 04:03 2009 AdditionalMessage.o
rw-r--r-- 501/20 117724 Mar 13 04:03 2009 Asserter.o
rw-r--r-- 501/20 5384 Mar 13 04:03 2009 BeOsDynamicLibraryManager.o
rw-r--r-- 501/20 84532 Mar 13 04:03 2009 BriefTestProgressListener.o
rw-r--r-- 501/20 149532 Mar 13 04:03 2009 CompilerOutputter.o
rw-r--r-- 501/20 112324 Mar 13 04:03 2009 DefaultProtector.o
rw-r--r-- 501/20 86180 Mar 13 04:03 2009 DynamicLibraryManager.o
rw-r--r-- 501/20 90656 Mar 13 04:03 2009 DynamicLibraryManagerException.o
rw-r--r-- 501/20 120580 Mar 13 04:03 2009 Exception.o
:
:
rw-r--r-- 501/20 99616 Mar 13 04:04 2009 TextTestRunner.o
rw-r--r-- 501/20 79680 Mar 13 04:04 2009 TypeInfoHelper.o
rw-r--r-- 501/20 84724 Mar 13 04:04 2009 UnixDynamicLibraryManager.o
rw-r--r-- 501/20 5384 Mar 13 04:04 2009 Win32DynamicLibraryManager.o
rw-r--r-- 501/20 94344 Mar 13 04:04 2009 XmlDocument.o
rw-r--r-- 501/20 233576 Mar 13 04:04 2009 XmlElement.o
rw-r--r-- 501/20 300704 Mar 13 04:04 2009 XmlOutputter.o
rw-r--r-- 501/20 11008 Mar 13 04:04 2009 XmlOutputterHook.o
But when I tried building my project a sample test case, I get the errors:
**** Build of configuration Debug for project CppUnitDemo ****
make all
Building target: CppUnitDemo
Invoking: MacOS X C++ Linker
g++ -L/workspace3/CppUnitBuild/.libs -L/workspace3/CppUnitBuild/Debug -weak-lCppUnitBuild -o "CppUnitDemo" ./MoneyApp.o ./MoneyTest.o ./StdAfx.o -lCppUnitBuild
ld: in /workspace3/CppUnitBuild/Debug/libCppUnitBuild.a, archive has no table of contents
collect2: ld returned 1 exit status
make: *** [CppUnitDemo] Error 1
I get the same error even if -weak-l option is removed.
Any help is appreciated.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Gurus
I have Eclipse 3.4.1
I tried to get cppunit to work with it on MacOS X but unsuccessful.
I could see the archive file libCppUnitBuild.a with the following table of contents:
macbook$ ar -tv /workspace3/CppUnitBuild/Debug/libCppUnitBuild.a
rw-r--r-- 501/20 112724 Mar 13 04:03 2009 AdditionalMessage.o
rw-r--r-- 501/20 117724 Mar 13 04:03 2009 Asserter.o
rw-r--r-- 501/20 5384 Mar 13 04:03 2009 BeOsDynamicLibraryManager.o
rw-r--r-- 501/20 84532 Mar 13 04:03 2009 BriefTestProgressListener.o
rw-r--r-- 501/20 149532 Mar 13 04:03 2009 CompilerOutputter.o
rw-r--r-- 501/20 112324 Mar 13 04:03 2009 DefaultProtector.o
rw-r--r-- 501/20 86180 Mar 13 04:03 2009 DynamicLibraryManager.o
rw-r--r-- 501/20 90656 Mar 13 04:03 2009 DynamicLibraryManagerException.o
rw-r--r-- 501/20 120580 Mar 13 04:03 2009 Exception.o
:
:
rw-r--r-- 501/20 99616 Mar 13 04:04 2009 TextTestRunner.o
rw-r--r-- 501/20 79680 Mar 13 04:04 2009 TypeInfoHelper.o
rw-r--r-- 501/20 84724 Mar 13 04:04 2009 UnixDynamicLibraryManager.o
rw-r--r-- 501/20 5384 Mar 13 04:04 2009 Win32DynamicLibraryManager.o
rw-r--r-- 501/20 94344 Mar 13 04:04 2009 XmlDocument.o
rw-r--r-- 501/20 233576 Mar 13 04:04 2009 XmlElement.o
rw-r--r-- 501/20 300704 Mar 13 04:04 2009 XmlOutputter.o
rw-r--r-- 501/20 11008 Mar 13 04:04 2009 XmlOutputterHook.o
But when I tried building my project a sample test case, I get the errors:
**** Build of configuration Debug for project CppUnitDemo ****
make all
Building target: CppUnitDemo
Invoking: MacOS X C++ Linker
g++ -L/workspace3/CppUnitBuild/.libs -L/workspace3/CppUnitBuild/Debug -weak-lCppUnitBuild -o "CppUnitDemo" ./MoneyApp.o ./MoneyTest.o ./StdAfx.o -lCppUnitBuild
ld: in /workspace3/CppUnitBuild/Debug/libCppUnitBuild.a, archive has no table of contents
collect2: ld returned 1 exit status
make: *** [CppUnitDemo] Error 1
I get the same error even if -weak-l option is removed.
Any help is appreciated.