linking protocols for external libraries?

   2351   4   1
User Avatar
Member
12 posts
Joined: Feb. 2012
Offline
Hi all, I'm writing an SOP that uses a third party library, which I link to. Now, when I load my plugin, I get:

Cannot load smoo.dll
Missing version information
When creating custom operators with the HDK ,remeber to
#include <UT/UT_DSOVersion.h>to define the required version information

I altered my PATH variable to include the directory with the DLL, but that error still comes up. Is there a way to link to a third party DLL?

cheers,
Easy3s
User Avatar
Member
7733 posts
Joined: July 2005
Offline
Are you building with the correct compiler flags? Run “hcustom -d MyFile.C” to see the flags that should be used. Offhand, it looks like you're missing -DMAKING_DSO but if you're missing that, you're probably missing others as well.
User Avatar
Member
12 posts
Joined: Feb. 2012
Offline
edward
Are you building with the correct compiler flags? Run “hcustom -d MyFile.C” to see the flags that should be used. Offhand, it looks like you're missing -DMAKING_DSO but if you're missing that, you're probably missing others as well.

These are the flags I'm using right now (line breaking for ease of reading):

—- SNIP —-
-TP -Zc:forScope
-DVERSION=“11.1.201”
-DI386
-DWIN32
-DSWAP_BITFIELDS
-D_WIN32_WINNT=0x0501
-DWINVER=0x0501
-MD
-EHsc
-GR
-DSESI_LITTLE_ENDIAN
-DNEED_SPECIALIZATION_STORAGE
-DSIZEOF_VOID_P=4
-DMAKING_DSO
—- SNIP —-

I do have MAKING_DSO specified. I should note that ‘smoo.dll’ is the third party DLL (I had copied it over to where my SOP's DLL is loading from).
User Avatar
Member
12 posts
Joined: Feb. 2012
Offline
easythrees
edward
Are you building with the correct compiler flags? Run “hcustom -d MyFile.C” to see the flags that should be used. Offhand, it looks like you're missing -DMAKING_DSO but if you're missing that, you're probably missing others as well.

These are the flags I'm using right now (line breaking for ease of reading):

—- SNIP —-
-TP -Zc:forScope
-DVERSION=“11.1.201”
-DI386
-DWIN32
-DSWAP_BITFIELDS
-D_WIN32_WINNT=0x0501
-DWINVER=0x0501
-MD
-EHsc
-GR
-DSESI_LITTLE_ENDIAN
-DNEED_SPECIALIZATION_STORAGE
-DSIZEOF_VOID_P=4
-DMAKING_DSO
—- SNIP —-

I do have MAKING_DSO specified. I should note that ‘smoo.dll’ is the third party DLL (I had copied it over to where my SOP's DLL is loading from).

I *think* I know why this is happening. The link in proper seems to only happen in release mode. When I switch to release mode (and use the specified flags), I get no error messages. Onward!
User Avatar
Member
30 posts
Joined: Oct. 2011
Offline
resurrecting an old thread (That saved me )… I was finally able to compile the sop_star example using visual studio 2015. What really through me off was not including -DMAKING_DSO in the command line on my project settings.

My question is why doesn't -DMAKING_DSO show up in the needed flags when using hcustom -c ?

hcustom -d “myFIle.cpp” will out put the exact same just with a -DMAKING_DSO -LD -Fo“myFIle.o”
I'm just a little confused what the difference between -d and -c are in hcustom.
Cheers
Alex
Edited by AlexLombardi - Aug. 16, 2016 18:16:42
  • Quick Links