Skip to content

Commit 069195b

Browse files
committed
修改引用路径和 linker flag
1 parent 42d1020 commit 069195b

3 files changed

Lines changed: 32 additions & 0 deletions

File tree

CocoaPodsDemo/BSStaticLibraryOne/BSStaticLibraryOne.xcodeproj/project.pbxproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,7 @@
244244
buildSettings = {
245245
OTHER_LDFLAGS = "-ObjC";
246246
PRODUCT_NAME = "$(TARGET_NAME)";
247+
PUBLIC_HEADERS_FOLDER_PATH = LibOne;
247248
SKIP_INSTALL = YES;
248249
};
249250
name = Debug;
@@ -253,6 +254,7 @@
253254
buildSettings = {
254255
OTHER_LDFLAGS = "-ObjC";
255256
PRODUCT_NAME = "$(TARGET_NAME)";
257+
PUBLIC_HEADERS_FOLDER_PATH = LibOne;
256258
SKIP_INSTALL = YES;
257259
};
258260
name = Release;

CocoaPodsDemo/ShellProject/ShellProject.xcodeproj/project.pbxproj

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,8 +272,22 @@
272272
isa = XCBuildConfiguration;
273273
buildSettings = {
274274
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
275+
HEADER_SEARCH_PATHS = (
276+
"$PROJECT_DIR/../BSStaticLibraryOne/Build/Products/Debug-iphonesimulator/LibOne",
277+
"$(inherited)",
278+
);
275279
INFOPLIST_FILE = ShellProject/Info.plist;
276280
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
281+
LIBRARY_SEARCH_PATHS = (
282+
"$PROJECT_DIR/../BSStaticLibraryOne/Build/Products/Debug-iphonesimulator",
283+
"$(inherited)",
284+
);
285+
ONLY_ACTIVE_ARCH = NO;
286+
ORDER_FILE = "";
287+
OTHER_LDFLAGS = (
288+
"-ObjC",
289+
"-l\"BSStaticLibraryOne\"",
290+
);
277291
PRODUCT_BUNDLE_IDENTIFIER = baidu.ShellProject;
278292
PRODUCT_NAME = "$(TARGET_NAME)";
279293
};
@@ -283,8 +297,21 @@
283297
isa = XCBuildConfiguration;
284298
buildSettings = {
285299
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
300+
HEADER_SEARCH_PATHS = (
301+
"$PROJECT_DIR/../BSStaticLibraryOne/Build/Products/Debug-iphonesimulator/LibOne",
302+
"$(inherited)",
303+
);
286304
INFOPLIST_FILE = ShellProject/Info.plist;
287305
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
306+
LIBRARY_SEARCH_PATHS = (
307+
"$PROJECT_DIR/../BSStaticLibraryOne/Build/Products/Debug-iphonesimulator",
308+
"$(inherited)",
309+
);
310+
ORDER_FILE = "";
311+
OTHER_LDFLAGS = (
312+
"-ObjC",
313+
"-l\"BSStaticLibraryOne\"",
314+
);
288315
PRODUCT_BUNDLE_IDENTIFIER = baidu.ShellProject;
289316
PRODUCT_NAME = "$(TARGET_NAME)";
290317
};

CocoaPodsDemo/ShellProject/ShellProject/ViewController.m

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
//
88

99
#import "ViewController.h"
10+
#import "BSStaticLibraryOne.h"
11+
#import "BSStaticLibraryOne+Extension.h"
1012

1113
@interface ViewController ()
1214

@@ -16,6 +18,7 @@ @implementation ViewController
1618

1719
- (void)viewDidLoad {
1820
[super viewDidLoad];
21+
[[[BSStaticLibraryOne alloc] init] saySomething];
1922
// Do any additional setup after loading the view, typically from a nib.
2023
}
2124

0 commit comments

Comments
 (0)