Importing DLLs when building

Monkey Targets Forums/Windows 8/Importing DLLs when building

BinaryItch(Posted 2015) [#1]
I'm trying to integrate Flurry analytics into my Windows Phone 8 build. Flurry provide a dll to integrate into WP8 apps. I have written some 'glue' code to access functionality within the dll, but don't know how to specify that this dll should be included in the WP8 build.

Any ideas/pointers?


Pharmhaus(Posted 2015) [#2]
You can find the Visual Studio project in the "MonkeyXPro\targets\winrt_winphone8\template" folder (it's called MonkeyGame.sln).
Once open you can add your dll as a reference to the project (right click the "reference" treeview entry and select add reference).


BinaryItch(Posted 2015) [#3]
Great, thanks! I had the added issue of "a reference to a higher version or incompatible assembly cannot be added to the project", But that was resolved by unblocking the dll (right click - properties -> Unblock).

However, I'm still not able to access the functionality within the dll;

"error C2065: 'FlurryWP8SDK' : undeclared identifier (MonkeyGame.PhoneComponent.cpp)"

Generated from the following code within ...build\winrt_winphone8\monkeygame.cpp(:



I can see the FlurryWP8SDK namespace in the object browser...

Any ideas?


Pharmhaus(Posted 2015) [#4]
Well, I'm not certain about this but you could try to set the properties of the reference to "Copy To Local = True" (When you select the reference in the treeview)
It is probably required to add the reference to the cpp project too (right click the cpp project and choose properties->References->Add Reference) then edit monkeygame.cpp and add something like this: (depends on the namespace, you probably need to look this up)
#using <FlurryWP8SDK.???.dll>
using namespace FlurryWP8SDK::???