Changed Compile to Link Function