缺少complex.h用于编译具有复杂分析的C语言

时间:2018-04-07 18:21:13

标签: c xcode macos

如何在macOS High Sierra上使用复杂分析编译和运行C代码。没有< complex.h>在Xcode中可用。是否有可提供此功能的下载?

1 个答案:

答案 0 :(得分:1)

安装Xcode和命令行工具后,{p> complex.h 出现在xcode-select -p目录中。无需单独下载。

由于您已经安装了Xcode,因此需要检查是否安装了命令行工具。要检查是否已安装,请运行import { Component } from '@angular/core'; import { NavController } from 'ionic-angular'; import { AuthService } from '../../services/auth.service'; import { FirebaseProvider } from '../../providers/firebase/firebase'; import { LoginPage } from '../login/login'; import { Observable } from 'rxjs/Observable'; @Component({ selector: 'page-contact', templateUrl: 'contact.html' }) export class ContactPage { user: Observable<any>; constructor( public navCtrl: NavController, private auth: AuthService, private firebase: FirebaseProvider ) { this.auth.currentUserObservable.subscribe(() => { this.user = this.firebase.getUserInfo(this.auth.currentUserId); if (!this.auth.authenticated) { this.navCtrl.setRoot(LoginPage); } }); this.pushsetup(); } pushsetup() { this.firebase .getToken() .then(token => console.log(`The token is ${token}`)) .catch(error => console.error('Error getting token', error)); this.firebase .onTokenRefresh() .subscribe((token: string) => console.log(`Got a new token ${token}`)); } } 。如果安装,则返回值为2,如果是,则返回0。