Jump to content

Welcome to eMastercam

Register now to participate in the forums, access the download area, buy Mastercam training materials, post processors and more. This message will be removed once you have signed in.

Use your display name or email address to sign in:

Problems w. VS 2008 and C-Hook Dev. Guide


Recommended Posts

Hi,

 

i'm having trouble with Visual Studio 2008 Standard Edition. If i write the "Simplest C-Hook" from CHook Dev. Guide i get some Compiler errors:

First: Error C1083, "UIEditReal.h" cannot be opened. I figured out to add the Path C:mcamxsdkinterfacesUICtrls to the Include Directories. The next i get is error C2664, i have to change 'Messagebox(0, "Hello from Mastercam ...' to 'Messagebox(0, L"Hello from Mastercam ..." and so on, this is because of UNICODE instead of Multi-Byte in the Default Projectproperties.

After that i get this 3 errors:

 

Fehler 2 error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""public: virtual __thiscall UIDataTip::~UIDataTip(void)" (??1UIDataTip@@UAE@XZ)" in Funktion ""public: virtual void * __thiscall UIDataTip::`scalar deleting destructor'(unsigned int)" (??_GUIDataTip@@UAEPAXI@Z)". CHookSample.obj CHookSample

Fehler 3 error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""public: virtual __thiscall UIErrorTip::~UIErrorTip(void)" (??1UIErrorTip@@UAE@XZ)" in Funktion ""public: virtual void * __thiscall UIErrorTip::`scalar deleting destructor'(unsigned int)" (??_GUIErrorTip@@UAEPAXI@Z)". CHookSample.obj CHookSample

Fehler 4 fatal error LNK1120: 2 nicht aufgelöste externe Verweise. Release/CHookSample.dll CHookSample

 

I think i need help here to finish the my first CHook with Visual Studio 2008.

Regards, Andreas

Link to comment
Share on other sites

You may be missing the library specification (I am not in a position to check which one) in your project. Assuming you have got it correctly, an explanation could be that Visual Studio 2008 differently "mangles" C++ symbols. The SDK libraries were created with Visual Studio 2005.

Link to comment
Share on other sites

Andreas,

 

Project Properties:

C++, General, Additional Include Directories

You must have the path to the UICtrls header files ->

C:McamX2-MR2SDKinterfacesuictrls

(Of course substitute the path to where the interfacesuictrls folder lives on your system)

 

And also this ->

Under Linker, Input, Additional Dependencies

UICtrls.lib must be listed to correct the these linker errors that refer to ‘UI’ items ->

error LNK2001: unresolved external symbol "public: virtual __thiscall UIDataTip::~UIDataTip(void)" (??1UIDataTip@@UAE@XZ) ChookExample.obj CHook

 

 

As for the UNICODE...

 

What is the setting on the General, Character Set?

This is normally -> 'Use Multi-Byte Character Set'

If you do have it set to 'Use Unicode Character Set', you will need to make some "adjustments" when using literal strings and the functions used when manipulating strings. Even though not absolutely necessary when using the Multi-Byte Character Set, I've gotten into habit of using the _T() macro and all string declarations.

 

See: Unicode Programming Summary

http://msdn2.microsoft.com/en-us/library/dybsewaf.aspx

Link to comment
Share on other sites
  • 1 month later...

"And also this ->

Under Linker, Input, Additional Dependencies

UICtrls.lib must be listed to correct the these linker errors that refer to ‘UI’ items ->

error LNK2001: unresolved external symbol "public: virtual __thiscall UIDataTip::~UIDataTip(void)" (??1UIDataTip@@UAE@XZ) ChookExample.obj CHook"

 

Ad what can I do, when I can't see the UICtrls.lib, as you wrote?

I try to go trough the samples with VS 2008, but... smile.gif

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.

Join us!

eMastercam - your online source for all things Mastercam.

Together, we are the strongest Mastercam community on the web with over 56,000 members, and our online store offers a wide selection of training materials for all applications and skill levels.

Follow us

×
×
  • Create New...