亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

objective-c 調用第三方c語言庫
PHP中文網(wǎng)
PHP中文網(wǎng) 2017-04-24 09:13:32
0
2
573

我想從object-c程序中,調用svn的api,實現(xiàn)版本控制的功能。
我先在mac上費了好大力氣,成功編譯了subversion的源碼。然后在xcode的build-settings里面的header path中加入了svn api的頭文件路徑。又在build-phases中將libsvn_client_1.a引入到了libraries里面。但編譯的時候報錯,代碼如下:

頭部引入

#import "svn_client.h"
- (void)tableViewSelectionDidChange:(NSNotification *)notification
{
    NSLog(@"select one row!");
    char* url = "http://***.***.com/svn/***/unity/****";
    //list_repo2(url);
    //listRepo(url);
    // 測試下
    svn_checksum_size(nil);
}

報錯的信息如下 :

Undefined symbols for architecture x86_64:
  "_svn_checksum_size", referenced from:
      -[ViewController tableViewSelectionDidChange:] in ViewController.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

拜托大家?guī)兔纯础?/p>

PHP中文網(wǎng)
PHP中文網(wǎng)

認證高級PHP講師

reply all(2)
阿神

The problem has been solved, please see my comment on @isteven

Ty80

Your static library does not support compilationx86_64對應的二進制。如果自己編譯的話,需要增加對x86_64. It doesn’t matter if it doesn’t support it. It just won’t run on the simulator and can only be run on a real machine.
In addition, when running on a real machine, an error will be reported if it is not supported amr64.
Set the compilation options, which are required if all CPUs are supported so far (the last two are used to support the simulator): armv7 armv7s arm64 x86 x86_64.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template