Add the lo_get_libmap() for this test app

This commit is contained in:
Tor Lillqvist 2012-04-09 22:40:58 +03:00
parent 0b67dd10f8
commit d25ef83c12
2 changed files with 33 additions and 4 deletions

View File

@ -15,6 +15,15 @@ APPDIR=build/Debug-$(PLATFORM)/$(APP).app
# Stuff lifted from solenv/gbuild/platform/IOS_ARM_GCC.mk
gb_OSDEFS := \
-D$(OS) \
-D_PTHREADS \
-DUNIX \
-DUNX \
-D_REENTRANT \
-DNO_PTHREAD_PRIORITY \
$(EXTRA_CDEFS) \
gb_OBJC_OBJCXX_COMMON_FLAGS := -fobjc-abi-version=2 -fobjc-legacy-dispatch -D__IPHONE_OS_VERSION_MIN_REQUIRED=40300 -g
gb_OBJCFLAGS := -x objective-c $(gb_OBJC_OBJCXX_COMMON_FLAGS)
gb_OBJCXXFLAGS := -x objective-c++ $(gb_OBJC_OBJCXX_COMMON_FLAGS)
@ -36,7 +45,7 @@ all: $(APPDIR)/$(APP) stuff
$(APPDIR)/$(APP): $(SRCS)
mkdir -p $(APPDIR)
$(CXX) -Wl,-map,$(APP).map.mangled -o $@ $(CFLAGS) $(gb_OBJCXXFLAGS) $(SRCS) $(LIBS)
$(CXX) -Wl,-map,$(APP).map.mangled -o $@ $(gb_OSDEFS) $(CFLAGS) $(gb_OBJCXXFLAGS) $(SRCS) $(LIBS)
c++filt <$(APP).map.mangled >$(APP).map && rm $(APP).map.mangled
stuff:

View File

@ -35,11 +35,32 @@
#include "cppunit/plugin/TestPlugIn.h"
//#include "cppunit/plugin/PlugInManager.h"
#include <osl/detail/ios-bootstrap.h>
#ifdef __cplusplus
extern "C" {
extern CppUnitTestPlugIn *cppunitTestPlugIn(void);
extern int lo_main(int argc, const char **argv);
#endif
extern CppUnitTestPlugIn *cppunitTestPlugIn(void);
extern int lo_main(int argc, const char **argv);
extern void * sc_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
const lib_to_component_mapping *
lo_get_libmap(void)
{
static lib_to_component_mapping map[] = {
{ "libsclo.a", sc_component_getFactory },
{ NULL, NULL }
};
return map;
}
#ifdef __cplusplus
}
#endif
int
main(int argc, char ** argv)
{
@ -160,4 +181,3 @@ didFinishLaunchingWithOptions: (NSDictionary *) launchOptions
@end
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */