parse-community / parse-embedded-sdks

The Embedded SDKs for the Parse Platform
http://parseplatform.org
Other
246 stars 118 forks source link

Where I can find parse.h ? (From Quick Start for Raspberry Pi) #15

Closed scolin912 closed 9 years ago

scolin912 commented 9 years ago

I'm using Raspberry Pi and following the Quick Start for Raspberry Pi. https://www.parse.com/apps/quickstart#embedded/raspberrypi

When I create a new project, and Initialize my app by copy pasting the code in the main function of the main.c file. Next step I compiler main.c or key in "make". It show "fatal error: parse.h: No such file or directory compilation terminated. "

Where I can find parse.h ?

mtl2034 commented 9 years ago

Did you follow the step #3 from the Quick Start? the last line 'sudo make install' should install libraries and headers. Headers should be in /usr/include.

scolin912 commented 9 years ago

Hi mtl2034, Thanks for your reply.

I'm follow the step #3 from Quick start. I think something wrong when I build the SDK, maybe that is key issue, but I still don't know how to solve it.

When I finish './configure --prefix=/usr' , and key in 'make' ,the error show below . . . Makefile:393: recipe for target 'libparse_la-parse.lo' failed make[4]: * [libparse_la-parse.lo] Error 1 make[4]: Leaving directory '/home/pi/parse-embedded-sdks-1.0.0/unix/src' Makefile:461: recipe for target 'all-recursive' failed make[3]: * [all-recursive] Error 1 make[3]: Leaving directory '/home/pi/parse-embedded-sdks-1.0.0/unix/src' Makefile:275: recipe for target 'all-recursive' failed make[2]: * [all-recursive] Error 1 make[2]: Leaving directory '/home/pi/parse-embedded-sdks-1.0.0/unix' Makefile:318: recipe for target 'all-recursive' failed make[1]: * [all-recursive] Error 1 make[1]: Leaving directory '/home/pi/parse-embedded-sdks-1.0.0' Makefile:249: recipe for target 'all' failed make: *\ [all] Error 2

Next key in 'sudo make install', the error show below . . . Makefile:393: recipe for target 'libparse_la-parse.lo' failed make[3]: * [libparse_la-parse.lo] Error 1 make[3]: Leaving directory '/home/pi/parse-embedded-sdks-1.0.0/unix/src' Makefile:461: recipe for target 'install-recursive' failed make[2]: * [install-recursive] Error 1 make[2]: Leaving directory '/home/pi/parse-embedded-sdks-1.0.0/unix/src' Makefile:275: recipe for target 'install-recursive' failed make[1]: * [install-recursive] Error 1 make[1]: Leaving directory '/home/pi/parse-embedded-sdks-1.0.0/unix' Makefile:318: recipe for target 'install-recursive' failed make: * [install-recursive] Error 1

mtl2034 commented 9 years ago

What Raspberry Pi image do you use? Did you follow the step number 1):

sudo apt-get update sudo apt-get install autoconf automake libtool sudo apt-get install libcurl4-openssl-dev uuid-dev

can you also include the output of ./configure --prefix=/usr

scolin912 commented 9 years ago

Hi mtl2034, My image is "2015-02-16-raspbian-wheezy" I already follow step number 1.

When I key in "./configure --prefix=/usr" , the result shown below

checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /bin/mkdir -p checking for gawk... no checking for mawk... mawk checking whether make sets $(MAKE)... yes checking build system type... armv6l-unknown-linux-gnueabihf checking host system type... armv6l-unknown-linux-gnueabihf checking how to print strings... printf checking for style of include used by make... GNU checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking dependency style of gcc... gcc3 checking for a sed that does not truncate output... /bin/sed checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking for fgrep... /bin/grep -F checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B checking the name lister (/usr/bin/nm -B) interface... BSD nm checking whether ln -s works... yes checking the maximum length of command line arguments... 1572864 checking whether the shell understands some XSI constructs... yes checking whether the shell understands "+="... yes checking how to convert armv6l-unknown-linux-gnueabihf file names to armv6l-unknown-linux-gnueabihf format... func_convert_file_noop checking how to convert armv6l-unknown-linux-gnueabihf file names to toolchain format... func_convert_file_noop checking for /usr/bin/ld option to reload object files... -r checking for objdump... objdump checking how to recognize dependent libraries... pass_all checking for dlltool... no checking how to associate runtime and link libraries... printf %s\n checking for ar... ar checking for archiver @FILE support... @ checking for strip... strip checking for ranlib... ranlib checking command to parse /usr/bin/nm -B output from gcc object... ok checking for sysroot... no checking for mt... mt checking if mt is a manifest tool... no checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking for dlfcn.h... yes checking for objdir... .libs checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC -DPIC checking if gcc PIC flag -fPIC -DPIC works... yes checking if gcc static flag -static works... yes checking if gcc supports -c -o file.o... yes checking if gcc supports -c -o file.o... (cached) yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking dynamic linker characteristics... GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for gcc... (cached) gcc checking whether we are using the GNU C compiler... (cached) yes checking whether gcc accepts -g... (cached) yes checking for gcc option to accept ISO C89... (cached) none needed checking dependency style of gcc... (cached) gcc3 checking for curl_easy_perform in -lcurl... no checking curl/curl.h usability... no checking curl/curl.h presence... no checking for curl/curl.h... no checking for uuid_generate_random in -luuid... no checking uuid/uuid.h usability... no checking uuid/uuid.h presence... no checking for uuid/uuid.h... no configure: creating ./config.status config.status: creating Makefile config.status: creating unix/Makefile config.status: creating unix/src/Makefile config.status: creating common/Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands config.status: executing libtool commands

mtl2034 commented 9 years ago

Config shows that curl and uuid are missing. When you do sudo apt-get install libcurl4-openssl-dev uuid-dev what output do you get?

scolin912 commented 9 years ago

Hi mtl2034, I enter those 'sudo' command again on step 1, and I can get the response when I click the button, please see below.

pi@raspberrypi ~/parse-embedded-sdks-1.0.0/raspberry-pi-starter-project $ ./quickstart received push: '{"data":{"alert":"A test push from Parse!"},"time":"2015-04-14T07:25:28.889Z"}'

Thank you very much, I have some interesting idea to implement.

Cheers !

scolin912 commented 9 years ago

Hi mtl2034, Could I use this application on parse? raspberry pi-->parse server-->android phone.

Here is I mean: raspberry pi was trigger, sending a notification to parse server, and parse server push notification to android phone.

How can I implement? use parse java script or parse cloud code?

mtl2034 commented 9 years ago

Look at blink in https://github.com/ParsePlatform/parse-embedded-sdks/tree/master/unix/samples/blink and https://github.com/ParsePlatform/Anydevice. With these both you will be able to send events/messages between embedded device and a mobile device.