Dear DAVID Community,

As you are probably aware, the entire DAVID company, team and product range has been integrated into HP Inc.
This forum is now read-only. Relevant content has been migrated to HP and merged into HP's Support Forums on November 1, 2016.

To start new discussions for 3D Scanning, please register and post your new topic at the HP Support Forums

Can't use SDK

Problems, solutions and discussion about scanning with a video projector and stripe patterns.

Can't use SDK

Postby davidhere40 » Wed Sep 21, 2016 10:55 pm

I've been struggling for hours to get anything about the SDK to work. The examples don't compile, the DLL or static library projects also don't compile unless you go through a lot of trouble to adjust them. I couldn't even use the ones from this website. I had to find someone else's version that comes with a cmake list to help compile it. Then even after getting them to compile, I created a project, linked them and get the following errors:

Please help me figure out how to use the SDK. Is it because I haven't gotten a license yet? I don't really want to pay $700 for a license until I know the software is going to work for my project. But I thought it would still work without a license, it just would have limited features.

1>Main.obj : error LNK2019: unresolved external symbol "public: __cdecl david::ClientJsonRpc::ClientJsonRpc(void)" (??0ClientJsonRpc@david@@QEAA@XZ) referenced in function main
1>Main.obj : error LNK2019: unresolved external symbol "public: virtual __cdecl david::ClientJsonRpc::~ClientJsonRpc(void)" (??1ClientJsonRpc@david@@UEAA@XZ) referenced in function main
1>Main.obj : error LNK2019: unresolved external symbol "public: struct david::ServerInfo __cdecl david::ClientJsonRpc::Connect(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,unsigned short)" (?Connect@ClientJsonRpc@david@@QEAA?AUServerInfo@2@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@G@Z) referenced in function main
1>Main.obj : error LNK2019: unresolved external symbol "public: virtual class david::IStructuredLightScanner & __cdecl david::ClientJsonRpc::sls(void)" (?sls@ClientJsonRpc@david@@UEAAAEAVIStructuredLightScanner@2@XZ) referenced in function main
1>Main.obj : error LNK2019: unresolved external symbol "public: virtual class david::IShapeFusion & __cdecl david::ClientJsonRpc::fusion(void)" (?fusion@ClientJsonRpc@david@@UEAAAEAVIShapeFusion@2@XZ) referenced in function main
1>Main.obj : error LNK2019: unresolved external symbol "public: virtual class david::ITurntable & __cdecl david::ClientJsonRpc::turntable(void)" (?turntable@ClientJsonRpc@david@@UEAAAEAVITurntable@2@XZ) referenced in function main
davidhere40
 
Posts: 4
Joined: Tue Apr 14, 2009 12:59 am

Re: Can't use SDK

Postby davidhere40 » Wed Sep 21, 2016 11:08 pm

I think what is causing it is the fact that the entire folder "jsonrpc" is missing. I tried adding it from a library I found here:
http://jsonrpc-cpp.sourceforge.net/inde ... n.Download

The file names matched, but maybe it wasn't a full match. All the errors mention jsonrpc. Anyone know why this code is missing from the sdk?
davidhere40
 
Posts: 4
Joined: Tue Apr 14, 2009 12:59 am

Re: Can't use SDK

Postby davidhere40 » Thu Sep 22, 2016 1:17 am

I got it partially working by downloading
https://github.com/InstitutMaupertuis/davidSDK
which almost compiles properly on visual studio 2013. But you have to use cmake to generate the visual studio solutions and then open the file Common.cpp and add this: "#pragma comment(lib, "Ws2_32.lib")"

Then, you have to switch the project type to static linked library, add your project that you want to use to the solution and then add the static linked library as a reference. I also selected "Use Library Dependency Inputs". That was the only way I could get it to recognize the location of the library. ugh... that was very painful.

Now I'm getting the following error:
"A buffer overrun has occurred in Examples.exe which has corrupted the program's internal state. Press Break to debug the program or Continue to terminate the program."
It is coming from "rpc["params"]["filename"] = filename;" in the following code:
void StructuredLightScannerJsonRpc::ExportMesh(const std::string& filename)
{
Json::Value rpc;
m_client->PrepareRpc(rpc, "david::sls::ExportMesh");
rpc["params"]["filename"] = filename;

Json::Value response;
m_client->ExecuteRpc(response, rpc);
}

Is this a license issue or something else?
davidhere40
 
Posts: 4
Joined: Tue Apr 14, 2009 12:59 am

Re: Can't use SDK

Postby davidhere40 » Thu Sep 22, 2016 5:19 am

I finally got it.

You have to be very careful to delete any of the original sdk header files to make sure the right header files are used with the statically linked library. At the top of the file, change the david.h include to #include "davidSDK-master/david.h"

I also found that you get an error on windows if you don't specify the full file location for the ExportMesh function. The example code does not do that.

this was far far harder than it really should have been to get working.
davidhere40
 
Posts: 4
Joined: Tue Apr 14, 2009 12:59 am


Return to Structured Light Scanning

Who is online

Users browsing this forum: No registered users and 1 guest

cron