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