OfxPD Compile error

Hey there,

Posted this in the OfxPD thread but haven’t recieved a reply so thought this was a better place to post.
Basically, I’m having trouble getting ofxpd to build.

I’m running a fresh install of Win7 and Code::Blocks + MinGW.

I followed the instructions for adding to an existing project and got an error that the compiler couldn’t find the pthread library. I managed to find the files needed for pthread online so copied them into the MinGW folder and renamed them to satisfy the compiler.

Now I’m getting a load of undefined references and I have no idea what’s causing them as everything seems to be ok?

Errors:

obj\Release\libs\libpd\libpd_wrapper\util\ringbuffer.o:ringbuffer.c|| undefined reference to `__sync_fetch_and_or_4'|
obj\Release\libs\libpd\libpd_wrapper\util\ringbuffer.o:ringbuffer.c|| undefined reference to `__sync_fetch_and_or_4'|
obj\Release\libs\libpd\libpd_wrapper\util\ringbuffer.o:ringbuffer.c|| undefined reference to `__sync_fetch_and_or_4'|
obj\Release\libs\libpd\libpd_wrapper\util\ringbuffer.o:ringbuffer.c|| undefined reference to `__sync_fetch_and_or_4'|
obj\Release\libs\libpd\libpd_wrapper\util\ringbuffer.o:ringbuffer.c|| undefined reference to `__sync_val_compare_and_swap_4'|
obj\Release\libs\libpd\libpd_wrapper\util\ringbuffer.o:ringbuffer.c|| undefined reference to `__sync_val_compare_and_swap_4'|
obj\Release\libs\libpd\libpd_wrapper\z_libpd.o:z_libpd.c|| undefined reference to `expr_setup'|
obj\Release\libs\libpd\pure-data\extra\fiddle~\fiddle~.o:fiddle~.c|| undefined reference to `pd_fft'|
obj\Release\libs\libpd\pure-data\extra\sigmund~\sigmund~.o:sigmund~.c|| undefined reference to `mayer_realfft'|
obj\Release\libs\libpd\pure-data\src\d_fft.o:d_fft.c|| undefined reference to `mayer_ifft'|
obj\Release\libs\libpd\pure-data\src\d_fft.o:d_fft.c|| undefined reference to `mayer_fft'|
obj\Release\libs\libpd\pure-data\src\d_fft.o:d_fft.c|| undefined reference to `mayer_realfft'|
obj\Release\libs\libpd\pure-data\src\d_fft.o:d_fft.c|| undefined reference to `mayer_realifft'|

Does anyone have a clue what’s wrong here? I should mention I have in no way shape or form a clue what I am doing here.

do you have the freshest of the fresh ofxPD?
it looks like the externals haven’t been referenced properly
I know that Dan updated this recently, so it might just be a case of getting a newer version of ofxPD

Hi there,

I re-freshened ofxpd by getting the latest from github. Trying to build the same project, I’m now getting this:

obj\Release\addons\ofxPd\libs\libpd\cpp\PdBase.o:PdBase.cpp|| undefined reference to `_imp__libpd_sysrealtime'|
obj\Release\addons\ofxPd\libs\libpd\cpp\PdBase.o:PdBase.cpp|| undefined reference to `_imp__libpd_sysex'|
obj\Release\addons\ofxPd\libs\libpd\cpp\PdBase.o:PdBase.cpp|| undefined reference to `_imp__libpd_midibyte'|
obj\Release\addons\ofxPd\libs\libpd\cpp\PdBase.o:PdBase.cpp|| undefined reference to `_imp__libpd_polyaftertouch'|
obj\Release\addons\ofxPd\libs\libpd\cpp\PdBase.o:PdBase.cpp|| undefined reference to `_imp__libpd_aftertouch'|
obj\Release\addons\ofxPd\libs\libpd\cpp\PdBase.o:PdBase.cpp|| undefined reference to `_imp__libpd_pitchbend'|
obj\Release\addons\ofxPd\libs\libpd\cpp\PdBase.o:PdBase.cpp|| undefined reference to `_imp__libpd_programchange'|
obj\Release\addons\ofxPd\libs\libpd\cpp\PdBase.o:PdBase.cpp|| undefined reference to `_imp__libpd_controlchange'|
obj\Release\addons\ofxPd\libs\libpd\cpp\PdBase.o:PdBase.cpp|| undefined reference to `_imp__libpd_noteon'|
obj\Release\addons\ofxPd\libs\libpd\cpp\PdBase.o:PdBase.cpp|| undefined reference to `_imp__libpd_symbol'|
obj\Release\addons\ofxPd\libs\libpd\cpp\PdBase.o:PdBase.cpp|| undefined reference to `_imp__libpd_float'|
obj\Release\addons\ofxPd\libs\libpd\cpp\PdBase.o:PdBase.cpp|| undefined reference to `_imp__libpd_bang'|
obj\Release\addons\ofxPd\libs\libpd\cpp\PdBase.o:PdBase.cpp|| undefined reference to `_imp__libpd_openfile'|
obj\Release\addons\ofxPd\libs\libpd\cpp\PdBase.o:PdBase.cpp|| undefined reference to `_imp__libpd_getdollarzero'|
obj\Release\addons\ofxPd\libs\libpd\cpp\PdBase.o:PdBase.cpp|| undefined reference to `_imp__libpd_clear_search_path'|
obj\Release\addons\ofxPd\libs\libpd\cpp\PdBase.o:PdBase.cpp|| undefined reference to `_imp__libpd_add_to_search_path'|
obj\Release\addons\ofxPd\libs\libpd\cpp\PdBase.o:PdBase.cpp|| undefined reference to `_imp__libpd_closefile'|
obj\Release\addons\ofxPd\libs\libpd\cpp\PdBase.o:PdBase.cpp|| undefined reference to `_imp__libpd_arraysize'|
obj\Release\addons\ofxPd\libs\libpd\cpp\PdBase.o:PdBase.cpp|| undefined reference to `_imp__libpd_write_array'|
obj\Release\addons\ofxPd\libs\libpd\cpp\PdBase.o:PdBase.cpp|| undefined reference to `_imp__libpd_process_raw'|
obj\Release\addons\ofxPd\libs\libpd\cpp\PdBase.o:PdBase.cpp|| undefined reference to `_imp__libpd_process_short'|
obj\Release\addons\ofxPd\libs\libpd\cpp\PdBase.o:PdBase.cpp|| undefined reference to `_imp__libpd_process_float'|
obj\Release\addons\ofxPd\libs\libpd\cpp\PdBase.o:PdBase.cpp|| undefined reference to `_imp__libpd_process_double'|
obj\Release\addons\ofxPd\libs\libpd\cpp\PdBase.o:PdBase.cpp|| undefined reference to `_imp__libpd_arraysize'|
obj\Release\addons\ofxPd\libs\libpd\cpp\PdBase.o:PdBase.cpp|| undefined reference to `_imp__libpd_blocksize'|
obj\Release\addons\ofxPd\libs\libpd\cpp\PdBase.o:PdBase.cpp|| undefined reference to `_imp__libpd_set_queued_printhook'|
obj\Release\addons\ofxPd\libs\libpd\cpp\PdBase.o:PdBase.cpp|| undefined reference to `_imp__libpd_set_concatenated_printhook'|
obj\Release\addons\ofxPd\libs\libpd\cpp\PdBase.o:PdBase.cpp|| undefined reference to `_imp__libpd_set_queued_banghook'|
obj\Release\addons\ofxPd\libs\libpd\cpp\PdBase.o:PdBase.cpp|| undefined reference to `_imp__libpd_set_queued_floathook'|
obj\Release\addons\ofxPd\libs\libpd\cpp\PdBase.o:PdBase.cpp|| undefined reference to `_imp__libpd_set_queued_symbolhook'|
obj\Release\addons\ofxPd\libs\libpd\cpp\PdBase.o:PdBase.cpp|| undefined reference to `_imp__libpd_set_queued_listhook'|
obj\Release\addons\ofxPd\libs\libpd\cpp\PdBase.o:PdBase.cpp|| undefined reference to `_imp__libpd_set_queued_messagehook'|
obj\Release\addons\ofxPd\libs\libpd\cpp\PdBase.o:PdBase.cpp|| undefined reference to `_imp__libpd_set_queued_noteonhook'|
obj\Release\addons\ofxPd\libs\libpd\cpp\PdBase.o:PdBase.cpp|| undefined reference to `_imp__libpd_set_queued_controlchangehook'|
obj\Release\addons\ofxPd\libs\libpd\cpp\PdBase.o:PdBase.cpp|| undefined reference to `_imp__libpd_set_queued_programchangehook'|
obj\Release\addons\ofxPd\libs\libpd\cpp\PdBase.o:PdBase.cpp|| undefined reference to `_imp__libpd_set_queued_pitchbendhook'|
obj\Release\addons\ofxPd\libs\libpd\cpp\PdBase.o:PdBase.cpp|| undefined reference to `_imp__libpd_set_queued_aftertouchhook'|
obj\Release\addons\ofxPd\libs\libpd\cpp\PdBase.o:PdBase.cpp|| undefined reference to `_imp__libpd_set_queued_polyaftertouchhook'|
obj\Release\addons\ofxPd\libs\libpd\cpp\PdBase.o:PdBase.cpp|| undefined reference to `_imp__libpd_set_queued_midibytehook'|
obj\Release\addons\ofxPd\libs\libpd\cpp\PdBase.o:PdBase.cpp|| undefined reference to `_imp__libpd_init_audio'|
obj\Release\addons\ofxPd\libs\libpd\cpp\PdBase.o:PdBase.cpp|| undefined reference to `_imp__libpd_set_printhook'|
obj\Release\addons\ofxPd\libs\libpd\cpp\PdBase.o:PdBase.cpp|| undefined reference to `_imp__libpd_set_concatenated_printhook'|
obj\Release\addons\ofxPd\libs\libpd\cpp\PdBase.o:PdBase.cpp|| undefined reference to `_imp__libpd_set_banghook'|
obj\Release\addons\ofxPd\libs\libpd\cpp\PdBase.o:PdBase.cpp|| undefined reference to `_imp__libpd_set_floathook'|
obj\Release\addons\ofxPd\libs\libpd\cpp\PdBase.o:PdBase.cpp|| undefined reference to `_imp__libpd_set_symbolhook'|
obj\Release\addons\ofxPd\libs\libpd\cpp\PdBase.o:PdBase.cpp|| undefined reference to `_imp__libpd_set_listhook'|
obj\Release\addons\ofxPd\libs\libpd\cpp\PdBase.o:PdBase.cpp|| undefined reference to `_imp__libpd_set_messagehook'|
obj\Release\addons\ofxPd\libs\libpd\cpp\PdBase.o:PdBase.cpp|| undefined reference to `_imp__libpd_set_noteonhook'|
obj\Release\addons\ofxPd\libs\libpd\cpp\PdBase.o:PdBase.cpp|| undefined reference to `_imp__libpd_set_controlchangehook'|
obj\Release\addons\ofxPd\libs\libpd\cpp\PdBase.o:PdBase.cpp|| undefined reference to `_imp__libpd_set_programchangehook'|
||More errors follow but not being shown.|

Switching the build target to debug, I’m getting the first error again. Any ideas?

EDIT:
Made a new project with the fresh ofxPD and just getting the original errors now. The only thing I’m not 100% I’ve done right is downloading the ‘pthread’ library and linking to it as I’ve had to do that manually. Would that be causing this?

EDIT2:
I have solved the issue! My problem was assuming that the project generator would make a project that would work - Adding the files and linking everything manually was eventually the key to success - although I had to add a couple of extra folders. Also, it helps to use pthread files all from the same version.

Now to actually go and write some code!