Hi,
Issue resolved. :)
Modified the make file:
all: singlehello.bc
singlehello.bc: hellomake.o hellofunc.o
$(CXX) $^ -o $@
hellomake.o: hellomake.c
$(CXX) -c $^ -o $@
hellofunc.o: hellofunc.c hellomake.h
$(CC) -c $< -o $@
Remember to set the environment before issue emmake command.
issue: ../emsdk_env.sh
confirm the path : echo $PATH
After this no need to issue commands(emcc,emmake,emconfigure etc) using ./
instead directly used as emcc
issue: emmake make(it will generate the singlehello.bc).
Using emcc, would generate the output js file.
emcc singlehello.bc -o output.js
Regards,
Raman
On Tuesday, September 15, 2015 at 6:48:16 PM UTC+5:30, Raman Sharma wrote:
>
> Hi,
>
> I am new with emscripten and makefiles and I have met some difficulties
> regarding emmake .
> I want to learn how to build a full c++ project in js with emscripten.
> I'm getting an error while using emmake:
> "Exception thrown when invoking Popen in make with
> args:"tests/sample_hello/makefile""
> Traceback (most recent call last):
> File "./emmake", line 37, in <module>
> shared.Building.make(sys.argv[1:])
> File
> "/home/raman_sharma/Yocto/raman/emscripten/emsdk_portable/emscripten/tag-1.34.8/tools/shared.py",
>
> line 1113, in make
> process = Popen(args, stdout=None if EM_BUILD_VERBOSE_LEVEL >= 2 else
> stdout, stderr=None if EM_BUILD_VERBOSE_LEVEL >= 1 else stderr, env=env,
> shell=WINDOWS)
> File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
> errread, errwrite)
> File "/usr/lib/python2.7/subprocess.py", line 1335, in _execute_child
> raise child_exception
> OSError: [Errno 13] Permission denied
>
> Makefile:
> CC=emcc
> CFLAGS=-I.
> DEPS = hellomake.h
>
> %.o: %.c $(DEPS)
> $(CC) -c -o $@ $< $(CFLAGS)
>
> hello: hellomake.o hellofunc.o
> emcc -o hello hellomake.o hellofunc.o -I.
> Note:if issue make command only in sample_hello folder, then able to
> generate hello binary file.But getting issue with emmake.
> My main motive is to generate js output from C/C++ using Emscripten
> Please help me out from this problem.
>
> Regards,
> Raman
>
>
--
You received this message because you are subscribed to the Google Groups
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.