c3242500b6
Reference OBJECT libraries for inclusion in targets that have no other sources to verify that the linker language propagates correctly from the object libraries. Test with a STATIC library, a SHARED library, and an EXECUTABLE target. Use the static and shared libraries each in executables that end up using the object library symbols. In VS 6, 7, and 7.1 add a dummy object file to convince the IDE to build the targets without sources. In Xcode add a dummy source file to convince it to build targets without sources.
23 lines
334 B
C
23 lines
334 B
C
#if defined(_WIN32) && defined(SHARED_B)
|
|
# define IMPORT_B __declspec(dllimport)
|
|
#else
|
|
# define IMPORT_B
|
|
#endif
|
|
extern IMPORT_B int b1(void);
|
|
extern IMPORT_B int b2(void);
|
|
#ifndef NO_A
|
|
extern int a1(void);
|
|
extern int a2(void);
|
|
#endif
|
|
int main(void)
|
|
{
|
|
return 0
|
|
#ifndef NO_A
|
|
+ a1()
|
|
+ a2()
|
|
#endif
|
|
+ b1()
|
|
+ b2()
|
|
;
|
|
}
|