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:

SolidExtrusion geomsld.lib linker error


Recommended Posts

Hi,

I have been playing with the C-Hook SDK Introduction examples by Mick George - in particular the SolidExtrusion CHook. I swapped out the DoExtrude() function call in the main method with a call to the TestSolidExtrude function. I am now getting a linker error saying: cannot open file 'mcgeomsld.lib'.

In another application I am using the sld_extrude_from_chain() function and also am running into linker errors. The call in my other application looks identical to Mick's function call.

Any thoughts?

Thanks

Link to comment
Share on other sites

Which version of Mastercam?
"Linker error" without the actual message doesn't give much information to go on.

The sld_extrude_from_chain function is in the MCGeomSld.lib
Do you have that library included in your project? ->
Project properties - Linker - Input - Additional Dependencies
If you do have the correct libraries in the project and you're getting a Linker Error,
that's usually an incorrect function signature. Double check the parameters you are passing to that function.
 

Link to comment
Share on other sites

Hi Roger,

I have tried with Mastercam 2017 and x9. MCGeomSld.lib is included in project dependencies.

Here is the actual linker error:

LINK: fatal error LNK1104: cannot open file 'mcgeomsld.lib'

Here's how I'm using the function:

CHAINS *chains=nullptr;
if (chain_1("Select a chain", &chains)==CHAIN_OK){
  SLD_EXTRUDE_PARAMS params;
  InitExtrudeParams(params);
  result=sld_extrude_from_chain(chains,params,0,nullptr,_T("NewExtrude"));
}

Where the InitExtrudeParams function defines all of the members of params.

 

Link to comment
Share on other sites

After some tinkering, I was able to eliminate the Linker error #1104.

Now I am experiencing a different error:

 

Error	2	error LNK2001: unresolved external symbol "__declspec(dllimport) char __cdecl sld_extrude_from_chain(struct CHAIN *,struct SLD_EXTRUDE_PARAMS &,int,int *,char *)" (__imp_?sld_extrude_from_chain@@YADPEAUCHAIN@@AEAUSLD_EXTRUDE_PARAMS@@HPEAHPEAD@Z)	C:\Users\johnstonco\documents\visual studio 2013\Projects\CHookWizard3\CHookWizard3\main.obj	CHookWizard3

 

Link to comment
Share on other sites
sld_extrude_from_chain is in the MCGeomSld.lib

Have you included this library file in your project's Linker settings?

Place this in a CMD (BATch) file and use it to "find" the .LIB file a function resides in.

REM This will create a text file for each .LIB file (in the current folder)
REM containing a list of the exported functions in that .LIB
REM It must be run from a Visual Studio Developer Command Prompt window,
REM so that the 'DumpBin' will be found.
REM Then you can use 'Find in Files' from within Visual Studio to search
REM for the function name in question within the resulting text files.
@ECHO OFF
FOR %%f IN (*.lib) DO   (  
    ECHO Dumping exports from "%%f" 
    DumpBin /exports %%f > %%~f_Exports.txt
    )

 

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...