0

I´m doing some tests with c4droid on my phone (a galaxy s3 mini). Compiling using "g++ + Bionic", no have problems. However, when i use a Makefile, the "cstdio" library don´t recognize. ("cstdio": no such file or directory) I dont know i can include the library in Makefile. Follows under, my makefile:

GCC= $(CXX) 
CFLAGS= -c -Wall -lm -v -ldl -lz 
LDFLAGS=src (c4droid:CURSRCDIR)
SOURCES=main.c 
SOURCES+=src/Classe1.cpp
OBJECTS=$(SOURCES:.cpp=.o) $(SOURCES:.c=.o)
EXECUTABLE=ProjetoTeste

all: $(SOURCES) $(EXECUTABLE)

$(EXECUTABLE): $(OBJECTS)
$(GCC) $(LDFLAGS) $(OBJECTS) -o $@

.cpp.o:
$(GCC) $(CFLAGS) $< -o $@

Anybody have any idea?

sorry my english. thanks.

  • cstdio is C++ header, not C, gcc is for compiling C files – Dmitry Ginzburg Jun 28 '14 at 18:17
  • but when set "compilation settings" for "Compile every source code file as a program (default)" it´s work, and i use "g++ + Bionic" compiler. How i solve this case using MakeFile? It´s using wrong compiler? How i set correct compiler with makefile? I Alhead try GCC=$(CC) and don´t work... nothing work. – user3786450 Jun 28 '14 at 20:09

0 Answers0