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

local addons errors, make, osx #4763

Open
thomasgeissl opened this issue Feb 1, 2016 · 4 comments
Open

local addons errors, make, osx #4763

thomasgeissl opened this issue Feb 1, 2016 · 4 comments
Milestone

Comments

@thomasgeissl
Copy link
Contributor

I try to use local addons in osx, using the makefile.
I have the following directory structure.

Thomass-MacBook-Pro-4:networkTcpClientExample thomasgeissl$ pwd
/Users/thomasgeissl/programming/of/ofTG/apps/localAddonsTest/networkTcpClientExample
Thomass-MacBook-Pro-4:networkTcpClientExample thomasgeissl$ ls 
Makefile    addons.make bin     local_addons    obj     src
Thomass-MacBook-Pro-4:networkTcpClientExample thomasgeissl$ cat addons.make 
./local_addons/ofxNetwork
Thomass-MacBook-Pro-4:networkTcpClientExample thomasgeissl$ ls local_addons/
ofxNetwork

when I try to compile, I get duplicate symbols errors:

duplicate symbol __ZN12ofxTCPClient10receiveRawEv in:
    obj/osx/Release/local_addons/ofxNetwork/src/ofxTCPClient.o
    /Users/thomasgeissl/programming/of/ofTG/apps/localAddonsTest/networkTcpClientExample/obj/osx/Release/addons/ofxNetwork/src/ofxTCPClient.o

This happens also when i try to compile opencvExample with ofxOpenCv included, I havent tested others. Trying to compile oscReceiveExample with ofxOsc locally, it includes ofxOsc/libs/oscpack/src/ip/win32/*

/Users/thomasgeissl/programming/of/ofTG/apps/localAddonsTest/oscReceiveExample/local_addons/ofxOsc/libs/oscpack/src/ip/win32/NetworkingUtils.cpp:39:10: fatal error: 'winsock2.h' file not found
#include <winsock2.h>   // this must come first to prevent errors with MSVC7
@arturoc arturoc added this to the 0.10.0 milestone Feb 5, 2016
@thomasgeissl
Copy link
Contributor Author

I just came across this again, it can be solved by adding this line to a config.make.
PROJECT_EXCLUSIONS=$(PROJECT_ROOT)/local_addons%
This also solves the windows includes for ofxOsc.

It would be nice if local addons get excluded automatically.

Another little note: PROJECT_EXCLUSIONS should be PROJECT_EXCLUDES.
We use already ADDON_LIBS_EXCLUDE and ADDON_INCLUDES_EXCLUDES.

@thomasgeissl
Copy link
Contributor Author

Could not we exclude everything but src (and libs) by default?

@arturoc
Copy link
Member

arturoc commented Feb 19, 2016

mmh, yes i think the makefiles, and the PG? include every folder in the project as source but probably it shouldn't be doing that and only include src which would solve this

@thomasgeissl
Copy link
Contributor Author

The PG excludes local addons, but it probably adds everything inside addon_root to the sources.
Qbs behaves like the makefiles and includes local addons twice.

I think only src should be added automatically.
And maybe libs could be added automatically too, the same way as for addons.

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

2 participants