ofxOsc compile issues (of_0071_osx)

I tried ofxOSC in of_0071_osx, and got many errors:

And I realized that ofxOsc folder has been changed and this lib file is not there any more:
“ofxOsc/libs/oscpack/lib/osx/osc.a”

What should I do?

Yes we switched to including oscpack as source (which should get compiled with OF), so this lib file should not be there.
Where did you get your OF from? when does this error happen? do other examples work? do the osc examples in /examples/addons/ work?

Thanks bilderbuchi.

I checked the example projects and copied the header path setup to my project, and it now works!
(I downloaded the of_0071 from http://www.openframeworks.cc/download/ )

I think “install.xml” in ofxOsc folder must be updated.
The file still got the old settings.

Thank you, you’re correct. I filed a bug at https://github.com/openframeworks/openFrameworks/issues/1374

Hello folks.
I have the same issue.
I just pull the new version of OF from github, and i got some erros that i could solve by resetting the include and library paths.

But at linking i have some errors that i don’t know how to solve

1>ClCompile:
1> All outputs are up-to-date.
1> All outputs are up-to-date.
1>Link:
1> oscpack.lib(OscReceivedElements.obj) : MSIL .netmodule or module compiled with /GL found; restarting link with /LTCG; add /LTCG to the link command line to improve linker performance
1> Creating library bin\SARDrawing_vs2010.lib and object bin\SARDrawing_vs2010.exp
1>oscpack.lib(UdpSocket.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) protected: char const * __thiscall std::basic_string<char,struct std::char_traits,class std::allocator >::_Myptr(void)const " (__imp_?_Myptr@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IBEPBDXZ)
1>bin\SARDrawing_vs2010.exe : fatal error LNK1120: 1 unresolved externals
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:07.69
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Any help?

Hi guys.

I found how to solve the problem in VC2010

three steps need to be done:

  1. add in the solution explorer de new files for the osc pack

  2. Modify the project properties > C++ > additional include where we need to have four paths for this addon:

…\addons\ofxOsc\libs\oscpack\include\
…\addons\ofxOsc\libs\oscpack\include\ip
…\addons\ofxOsc\libs\oscpack\include\osc
…\addons\ofxOsc\src

  1. Modify the library path in properties> liker > additional library directories, and make the path:

…\addons\ofxOsc\libs\oscpack\lib\win32

I atached tree images to make it clearer.

Enjoy live…

![](http://forum.openframeworks.cc/uploads/default/2493/solution explorer.jpg)

![](http://forum.openframeworks.cc/uploads/default/2497/lib paths.jpg)

i just updated the install.xml, and i think a filename change recently should fix the vs problem above.

Hi Kyle, can you explain in NOOB language how i can use your updated install.xml file to fix this problem with the using ofxOSC addon in a new project? Im completely lost. Thanks.

Im using Xcode 3.2.6

easiest way to get the file is go to https://github.com/openframeworks/openFrameworks/blob/develop/addons/ofxOsc/install.xml ->raw ->save as… and replace the old one.
If this does not work, get the current OF develop version: https://github.com/openframeworks/openFrameworks/zipball/develop and either use it as a whole, or just pluck the /addons/ofxOsc folder out of it. this should work, if you are already on 0071 there shouldn’t be too many differences.

Yeah, I have the new install.xml and kyle’s ofxOSC code but the same error happens. How do i tell the compiler to notice the install.xml file? Is it something in terminal that i need to run.

I can add it to the project but it acts as if it was not there. Do i need to ‘run’ the install.xml file somehow… sorry if these are basic questions i just haven’t had to deal with this before.

Thanks.

sorry – the install.xml comment is a bit misleading.

right now, install.xml is not used by any tools, for anything. you can’t use it to update your OF projects. sorry :slight_smile: it’s there just because it might be used in the future at some point.

instead, i’ve included an ofxOsc project that works for me. hopefully it works for you too.

oscSenderExample.xcodeproj.zip

Ok thanks for clearing that up. I was able to get OSC working in my project by rebuilding the entire project ontop of a working OSC example, still not sure how to incorporate OSC in 0071 to existing projects without having to rebuild… hopefully the next version of oF can resolve this. Cheers.

Hi, I came across this issue the other day and the fix is really simple in xcode.
Go to the Project.xcconfig and add the following line
HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS) “…/…/…/addons/ofxOsc/libs/oscpack/src”

that’s all.

A fix to this so just the drag and drop would work in xcode would be to modify the #includes in oscpack to point to “networkingutils.h” instead of “ip/networkingutils.h” but I don’t know if modifying a library is permissible.

Regards

I did a replace all ‘#include "ip/’ with ‘#include "’ and it worked! Putting in the header ‘$(OF_PATH)…/…/…/addons/ofxOsc/libs/oscpack/src’ didn’t seem to make a difference.

1 Like

I found it out on Xcode but it should work on any IDE.
Add the following to your project’s header search paths :

  • $(OF_PATH)/addons/ofxOsc/libs/oscpack/src
  • $(OF_PATH)/addons/ofxOsc/src

Then you don’t have to change any code :slight_smile:

1 Like

Just setting HEADER_SEARCH_PATHS doesn’t work for me.

Anyway the error is not happening during the pre-compile stage (when it searches for headers) but when its compiling addons/ofxOsc/libs/oscpack/src/ip/posix/UdpSocket.cpp.

that file includes “ip/UdpSocket.h” and assumes that its grandparent folder is on the path. Not the header search paths, but the -I paths passed to compile

consequently, addons/ofxOsc/libs/oscpack/src/ is not included in the call to the compiler:

CompileC /Users/crucial/Library/Developer/Xcode/DerivedData/PlaySPLOM-gwpsbmgveykcqsheakzuilcqldtb/Build/Intermediates/PlaySPLOM.build/Debug/PlaySPLOM.build/Objects-normal/x86_64/UdpSocket.o /Users/crucial/code/idmx/of_v20151008_osx_release/addons/ofxOsc/libs/oscpack/src/ip/posix/UdpSocket.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
    cd /Users/crucial/code/idmx/of_v20151008_osx_release/apps/myApps/PlaySPLOM
    export LANG=en_US.US-ASCII
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c++ -arch x86_64 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=c++11 -stdlib=libc++ -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-return-type -Wno-non-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wno-unused-variable -Wno-unused-value -Wno-empty-body -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-constant-conversion -Wno-int-conversion -Wno-bool-conversion -Wno-enum-conversion -Wno-shorten-64-to-32 -Wno-newline-eof -Wno-c++11-extensions -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -fasm-blocks -fstrict-aliasing -Wdeprecated-declarations -Wno-invalid-offsetof -mmacosx-version-min=10.7 -g -mssse3 -Wno-sign-conversion -I/Users/crucial/Library/Developer/Xcode/DerivedData/PlaySPLOM-gwpsbmgveykcqsheakzuilcqldtb/Build/Intermediates/PlaySPLOM.build/Debug/PlaySPLOM.build/PlaySPLOMDebug.hmap -I/Users/crucial/code/idmx/of_v20151008_osx_release/apps/myApps/PlaySPLOM/bin/include -I../../../libs/openFrameworks -I../../../libs/openFrameworks/.settings -I../../../libs/openFrameworks/3d -I../../../libs/openFrameworks/app -I../../../libs/openFrameworks/communication -I../../../libs/openFrameworks/events -I../../../libs/openFrameworks/gl -I../../../libs/openFrameworks/graphics -I../../../libs/openFrameworks/math -I../../../libs/openFrameworks/sound -I../../../libs/openFrameworks/types -I../../../libs/openFrameworks/utils -I../../../libs/openFrameworks/video -I../../../libs/poco/include -I../../../libs/freetype/include -I../../../libs/freetype/include/freetype2 -I../../../libs/fmodex/include -I../../../libs/glew/include -I../../../libs/FreeImage/include -I../../../libs/tess2/include -I../../../libs/cairo/include/cairo -I../../../libs/rtAudio/include -I../../../libs/glfw/include -I../../../libs/boost/include -I../../../libs/utf8cpp/include -I../../../libs/openssl/include -Isrc -I/Users/crucial/Library/Developer/Xcode/DerivedData/PlaySPLOM-gwpsbmgveykcqsheakzuilcqldtb/Build/Intermediates/PlaySPLOM.build/Debug/PlaySPLOM.build/DerivedSources/x86_64 -I/Users/crucial/Library/Developer/Xcode/DerivedData/PlaySPLOM-gwpsbmgveykcqsheakzuilcqldtb/Build/Intermediates/PlaySPLOM.build/Debug/PlaySPLOM.build/DerivedSources -F/Users/crucial/code/idmx/of_v20151008_osx_release/apps/myApps/PlaySPLOM/bin -F/Users/crucial/code/idmx/of_v20151008_osx_release/apps/myApps/PlaySPLOM/../../../libs/glut/lib/osx -D__MACOSX_CORE__ -mtune=native -MMD -MT dependencies -MF /Users/crucial/Library/Developer/Xcode/DerivedData/PlaySPLOM-gwpsbmgveykcqsheakzuilcqldtb/Build/Intermediates/PlaySPLOM.build/Debug/PlaySPLOM.build/Objects-normal/x86_64/UdpSocket.d --serialize-diagnostics /Users/crucial/Library/Developer/Xcode/DerivedData/PlaySPLOM-gwpsbmgveykcqsheakzuilcqldtb/Build/Intermediates/PlaySPLOM.build/Debug/PlaySPLOM.build/Objects-normal/x86_64/UdpSocket.dia -c /Users/crucial/code/idmx/of_v20151008_osx_release/addons/ofxOsc/libs/oscpack/src/ip/posix/UdpSocket.cpp -o /Users/crucial/Library/Developer/Xcode/DerivedData/PlaySPLOM-gwpsbmgveykcqsheakzuilcqldtb/Build/Intermediates/PlaySPLOM.build/Debug/PlaySPLOM.build/Objects-normal/x86_64/UdpSocket.o

/Users/crucial/code/idmx/of_v20151008_osx_release/addons/ofxOsc/libs/oscpack/src/ip/posix/UdpSocket.cpp:37:10: fatal error: 'ip/UdpSocket.h' file not found
#include "ip/UdpSocket.h"
         ^
1 error generated.

I’m on nightly 9 : of_v20151008_osx_release

I added ofxOsc using the XCode plugin. This is probably what doesn’t work properly.

I never figured out how to add an addon by using addons.make That seems to be just for linux, not OS X.
This isn’t explained at all here: http://www.ofxaddons.com/pages/howto

I copied all the HEADER_SEARCH_PATHS from examples/addons/oscSenderExample and it does compile now. So I guess those paths are also sent to the compiler.

I’m not sure the example is the most succinct and correct list of headers, but it does work now.

1 Like

It worked for me! (Visual Studio 2017 – oF v0.9.8)

Thanks @crucialfelix ! :slight_smile:

Step by step / VS 2017:

Select your Project in the Solution Explorer. Right click > Properties. A dialog menu will open.

Go to Configuration Properties > VC++ Directories > General.
Click on Include Directories > Enter the dropdown (down arrow on the right side) > Select <Edit…>. A dialog menu will open.

Click on New Line (new folder icon), browse and select one by one the folders mentioned above.