For all issues regarding the Forums use, please, refer to the Forum Rules.

Our Solutions

Need professional assistance?
Consider our:

Support Offerings

 

Need to speed up your development?
Have a look at our:

Samples & Tools

 

Need some functionality extending standard OCCT capabilities?
Check out our:

Adv. Components

Related pages

Using .hxx file on NT

Shawn Chang's picture
Forums: 

Hi everyone: I tried to include .hxx file into my program. I got a lot of error messages. One of errors is like MainFrm.obj : error LNK2001: unresolved external symbol "public: static void * __cdecl Standard::MAllocate(int)" (?MAllocate@Standard@@SAPAXH@Z). Is anyone can tell me what going on is? Does it relate with Project setting? Compared the setting in my program and 09_SampleImportExport is same. I think I may lose something before I start to include .hxx file. Thank you.

shawn

Paddy's picture

Hi,

its a linker problem. Do you have included OCC to your c++ enviroment and import the .lib files?

Shawn Chang's picture

Hi Paddy, I don't know what OCC is and where I can set it up. Thank you.

sincerely, shawn

Paddy's picture

Hi, I'm to lazy writing OpenCasCade :-)

Look at the FAQ for setting up the visual studio enviroment using OpenCasCade (includes etc.). The old samples include the lib files via libfiles.cpp. If you don't want to use such a file you have to include the libs in your project settings.

Shawn Chang's picture

Dear Paddy: I do not sure you mentioned about libfiles.cpp. Is the libfiles.cpp souces file in FileView(Visual C++)?? I did some simulations that are as same as the 03_SampleGeometry. It works fine. But I try to simulate 09_SampleImportExport. It fails. The problem is I posted. I also don't know what kind of file(maybe lib) have to be set in project settings. So far, I copied all setting(include in project setting and Tool/options/directories). Is there other places I have to set? By the Way, I am very appreciate for your help.

sincerely, shawn

Paddy's picture

Hi Shawn, the file 'libfiles.cpp' you've mentioned is the right. It shows you all the lib files you have to use for your project. But attention: you have to replace the 'opengl.lib' with 'tkopengl.lib'

hope I could help you.

Shawn Chang's picture

Dear Paddy: What is tkopengl.lib? And, What are differences between opengl.lib and tkopengl.lib? Your meaning to replace opengl.lib with tkopengl.lib is just to rename opengl.lib to tkopengl.lib. Why??

shawn

Paddy's picture

Hello again,

before CasCade 4.0d1 you have an "opengl.dll" in your dll-directory. This dll is now called "tkopengl.dll". That's all.

Regards, Paddy

Shawn Chang's picture

Hi Paddy: I am just curious. I can build and run perfectly 09_SampleImportExport. I still use Opengl.dll name. If I don't change opengl.dll to tkopengl.dll. Does it result any problem?

I also have one error message: error C2661: 'new' : no overloaded function takes 3 parameters. I know this meaning; but, I don't know how to solve it. The following sentence is taken from 09_SampleExportExport : myViewer = new V3d_Viewer(theGraphicDevice,a3DName.ToExtString(),"", 1000.0, V3d_XposYnegZpos, Quantity_NOC_GRAY30, V3d_ZBUFFER,V3d_GOURAUD,V3d_WAIT, Standard_True, Standard_False); Is new method specially for Open Cascade or for Visual C++?

shawn

Contact us

Attention: DO NOT use this form for all kind of request for the removal of your personal data. Please follow this link for such cases.