Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android Studio can't compile ofxPd - Maybe be OF config issue #6251

Open
cerupcat opened this issue Mar 2, 2019 · 5 comments
Open

Android Studio can't compile ofxPd - Maybe be OF config issue #6251

cerupcat opened this issue Mar 2, 2019 · 5 comments

Comments

@cerupcat
Copy link
Contributor

cerupcat commented Mar 2, 2019

I'm trying to add ofxPd to project. I'm cross-posting here since the ofxPd developer and I think this could be a core issue. danomatika/ofxPd#70

Reproduction:

Download latest Android OF version from website
Clone ofxPD to addon folder
Use project generator to import pdExample
Open generated Android project pdExample
Build

Error
C compiler failed while compiling s_libpdmidi.c.

It appears if I add to the build.gradle file CFlags.addAll(addonCppFlags(abi, ofRoot())) after cppFlags.addAll(addonCppFlags(abi, ofRoot())) this particular error goes away. It does appear that not all CFlags/CPPFlags are getting set though.

It's hard to say if the build issue is related to ofxPd or changes in OF. Any insights would help.

@cuinjune
Copy link
Contributor

It seems like ADDON_CFLAGS doesn't work properly when the flags are assigned as a list.

It seems to work when I assign the flags like this instead:

    ADDON_CFLAGS = -DHAVE_UNISTD_H 
    ADDON_CFLAGS += -DUSEAPI_DUMMY
    ADDON_CFLAGS += -DPD
    ADDON_CFLAGS += -DLIBPD_EXTRA
    ADDON_CFLAGS += -DLIBPD_USE_STD_MUTEX

@danomatika
Copy link
Contributor

danomatika commented Nov 26, 2019

Ping @arturoc. If only the first define makes it through from the list but individual append lines work, this seems like parsing issue.

EDIT: I've applied @cuinjune's suggestion as a fix for now.

@arturoc
Copy link
Member

arturoc commented Nov 26, 2019

this is correct, in makefile syntax = overwrites the previous value while += adds to the previous value so that's the correct way to add more than one value.

going to close this as i think it's correct as it is but let me know if i'm missing something

@arturoc arturoc closed this as completed Nov 26, 2019
@danomatika
Copy link
Contributor

danomatika commented Nov 26, 2019 via email

@arturoc arturoc reopened this Nov 27, 2019
@arturoc
Copy link
Member

arturoc commented Nov 27, 2019

oh i see sorry i thought it didn't work when doing

    ADDON_CFLAGS = -DHAVE_UNISTD_H 
    ADDON_CFLAGS = -DUSEAPI_DUMMY
    ADDON_CFLAGS = -DPD
    ADDON_CFLAGS = -DLIBPD_EXTRA
    ADDON_CFLAGS = -DLIBPD_USE_STD_MUTEX

this is a bug in the android build system then

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants