]> git.saurik.com Git - apple/dyld.git/blob - testing/test-cases/dylib-re-export.dtest/main.c
dyld-750.5.tar.gz
[apple/dyld.git] / testing / test-cases / dylib-re-export.dtest / main.c
1
2
3 // BUILD: $CC bar.c -dynamiclib -o $BUILD_DIR/libbar.dylib -install_name $RUN_DIR/libbar.dylib
4 // BUILD: $CC foo.c -dynamiclib $BUILD_DIR/libbar.dylib -sub_library libbar -install_name $RUN_DIR/libfoo.dylib -o $BUILD_DIR/libfoo.dylib
5 // BUILD: $CC main.c -o $BUILD_DIR/dylib-re-export.exe $BUILD_DIR/libfoo.dylib -L$BUILD_DIR
6
7 // RUN: ./dylib-re-export.exe
8
9
10 #include <stdio.h>
11
12 #include "test_support.h"
13
14 extern int bar();
15
16
17 int main(int argc, const char* argv[], const char* envp[], const char* apple[]) {
18 if ( bar() == 42 )
19 PASS("Success");
20 else
21 FAIL("Wrong value");
22
23 return 0;
24 }
25
26