Skip to content

Doesn't compile from command line. #2

@shmohawk

Description

@shmohawk

Mostly because ld can't find symbols. Adding a blueutil.h with following content fixed it for me:

//
//  blueutil.h
//  blueutil
//
//  Created by Brian Reiter on 4/27/15.
//
//

#ifndef blueutil_blueutil_h
#define blueutil_blueutil_h

int BTPowerState();
int BTSetPowerState(int powerState);
void BTStatus();

#endif

Now it compiles with clang -framework Foundation -framework IOBluetooth -o blueutil blueutil.c (or clang++ -framework Foundation -framework IOBluetooth -o blueutil blueutil.m for the ObjC version).

It may also be noted that if Bluetooth can't be activated via the control panel, neither can blueutil. But that's a different issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions