hiking90 / aidl-cpp

AIDL compiler for C++ on Linux Desktop
Apache License 2.0
10 stars 11 forks source link

ld: library not found for -lbinder #3

Open wishma2013 opened 6 years ago

wishma2013 commented 6 years ago

I found "-lbinder" in CMakeFiles/aidl-cpp.dir/link.txt.The whole content is:

/Library/Developer/CommandLineTools/usr/bin/c++
-std=gnu++11 -fPIC -DPIC -Wno-unused-parameter -Wno-unused-function -Wl,-search_paths_first -Wl,-headerpad_max_install_names
CMakeFiles/aidl-cpp.dir/aidl.cpp.o CMakeFiles/aidl-cpp.dir/aidl_language.cpp.o ...... -o aidl-cpp -lbinder

but I find c++/g++ help page ,there isn't a "-l" options definition.How's this going?

wishma2013 commented 6 years ago

Run "ld -v binder" return that:

@(#)PROGRAM:ld PROJECT:ld64-305 configured to support archs: armv6 armv7 armv7s arm64 i386 x86_64 x86_64h armv6m armv7k armv7m armv7em (tvOS) Library search paths: /usr/lib /usr/local/lib Framework search paths: /Library/Frameworks/ /System/Library/Frameworks/ ld: file not found: binder

There really isn't a lib called binder in those paths.What's the binder?

wishma2013 commented 6 years ago

For fast,I just commented out the last line in CMakeLists.txt "target_link_libraries(aidl-cpp binder)",and an excutable file aidl-cpp occured.

$ ./aidl-cpp Expected 3 positional arguments but got 0. usage: aidl-cpp INPUT_FILE HEADER_DIR OUTPUT_FILE OPTIONS: -I

search path for import statements -d generate dependency file INPUT_FILE: an aidl interface file HEADER_DIR: empty directory to put generated headers OUTPUT_FILE: path to write generated .cpp code

I don't know if the work can be over?