I’m so sorry to be posting such a stupid question, but I really cannot find any information anywhere on how to add an addon to Code::Blocks. The only guides that I have seen assume that I know a lot of things that I don’t. And they’re so far above my head that I don’t know how to search so that I can understand.
People write posts about a mythical “project generator” but I cant find anything like that anywhere, so I don’t know what people are talking about. Maybe it only exists for OSX?
I can open examples from addons that came with OF, but I cannot import new ones that I have downloaded. I need to work with ofxOMXPlayer, but I can’t get it to work from any guides that I’ve seen.
Please, please, please can someone help me. I’m so lost and frustrated, and I just really need this to work. There’s no information anywhere. Please help me. I’ve been banging my head against this issue for the past 2 days, just trying things and reading online.
I have copied ofxOMXPlayer to the addon folder in OF. I added the src and lib directories in the link search, then added files recursively to workspace. It throws errors and tells me that files are not there (but they’re not only there in the file structure, they’re also imported in my workspace).
first - don’t worry - we are here to help.
second, there is a project generator that ships with OF, it’s at the root level in a folder called “projectGenerator”
third, if you are adding files by hand there are three things you need to know:
a) first, you need to include all the src files that need to be compiled in the project
b) you need include all the “header search paths” – basically, where do you look for the .h files as it’s compiling. This might look like “…/…/…/addons/ofxOMPlayer/libs/includes” or something (I don’t have that addon in front of me, just spitballing)
c) you also need to do linking – any library that exists might need to be included for linking.
there some tips here:
I’d certainly try the OF project generator since this addon has a fair number of linking things to setup. (I just found https://github.com/jvcleave/ofxOMXPlayer/blob/master/addon_config.mk, which specifies some of the things it needs to do to make the project).
also, feel free to post errors and we’ll try to help you diagnose them.
finally, note that not all addons are designed to work on every platform and in some cases, you might need to ping the addon author directly by making an issue on their github.
also, there are no stupid questions around here !
Hey, thank you so much for your response. I really appreciate the help.
So I located the project generator, and gave that a try, adding the ofxOMXPlayer player to the addons section. Looking good, the addons show up now in the workspace. Before I add anything, I attempt to compile.
However I’m still getting an error while attempting to compile:
the error is on this file: “addons\ofxOMXPlayer\src\LIBAV_INCLUDES.h”
on this line: “#include < libswresample/swresample.h >”
“fatal error: libswresample/swresample.h: No such file or directory”
I checked the addon’s folder and swresample.h is definitely there. it’s also present in the codeblocks project window itself. I tried to manually add the directory with swresample.h to the search path, but that didn’t change anything, so I removed that search path.
Can you think of why it might not see it? Thanks again