cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

This product reached the end of support date on March 31, 2021.

Compiling Native ADK Demo (Helloworld.cpp)

henry_apletree
Inactive

Hi Community,

I am falling at the first hurdle with compiling the demo application which comes with the native ADK for 6.5!
After opening the Hello world demo application in C++, I am unable to build the solution with compilation errors for unresolved external symbols:

My understanding is that these are normally generated when a library file is missing on the include path, however hopefully as the below show the ADK lib directory has been included in the "Additional Include" options of Visual Studio

Could anyone wise in the ways of the ADK or wise in the ways of C++ give me some advice?

Regards,

Henry

P.s. reference links:
Instructions on running the sample apps from the docs:

https://community.dynatrace.com/community/display/...

A helpful video from Andreas Grabner and a partner on running applications with the ADK:

https://www.youtube.com/watch?v=UyZgFWcXcc8&list=P...

10 REPLIES 10

peter_karlhuber
Dynatrace Pro
Dynatrace Pro

Hi Henry,

please try the static library "dtadk-static-vs2015.lib". The newer Visual Studios have deprecated some system calls. Let me know if it works, best regards,

Peter

Hey Peter,
Using the -vs2015.lib worked perfectly for me! Thanks.

Do you think we could have this added to the documentation?

There is a section called "I can't compile or link my application" in the DT docs where this snippet might be very useful:

https://community.dynatrace.com/community/pages/viewpage.action?pageId=221381741#AgentDevelopmentKit(ADK)-Troubleshooting

do you know who would be the right person to ask to get this added to the docs?

Regards,

Henry

Yes, that should be in there, let's see if I have the permissions.

But more than that, I think that we should provide a valid .sln file for VS2015, ours was generated with VS2005. Let's see if I can find someone who can do this.

Even better, Thanks Peter.

actually I just tried the same thing on my box, but it did not work (yet).

what I tried:

  • VS 2010 and dtadk-static.lib -> works fine
  • VS 2015/2017 and dtadk-static.lib -> does not work (4 unresolved externals)
  • VS 2015/2017 and dtadk-static-vs2015.lib -> does not work (1 unresolved external still)

what finally worked for me: use the -vs2015.lib and add "Rpcrt4.lib" to the Linker -> Command Line.

so I agree with you Peter, we should add separate solutions and also separately built static libs.

Christian

abdullah_bulut
Newcomer

@Peter K.

Did you find anyone who can update the .sln file for the newer Visual Studio Versions (2015 or 2017 ) ?

Regards

Abdullah


Hi Abdullah,

as far as I can tell it was discussed internally but I don't see any concrete results of that discussion yet. Please use the workarounds as described above for now. Best regards,

Peter


I would love to do so...but none of the solutions above helped me solving my problem.

Still thanks for replying !


Whats the error message?


After tinkering around with VIsual Studio i did manage to get it running...not quiete sure tho what made it for me but i guess after including the "legacy_stdio_definitions.lib" library it works just fine now.

Still big thank you for trying to help !