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

HELP: Open Cascade 7.3 (latest version) Installed successfully, getting errors during compilation using "MS Visual C++"

VINOTHKUMAR THANGAVEL's picture

Hi everyone, (req. special  attn: Mr. Kirill Gavrilov )

I'm getting build errors (Attached), while trying to build Latest version of Open Cascade (7.3)  by "Building with MS Visual C++".

I followed the step below:

Step 1:

     I downloaded "Open Cascade 7.3 : Windows installer VC++ 2010 64 bit:" .exe package, and installed it.

Step 2:

     I'm using Microsoft Visual Studio 2013, so downloaded all required VC12_64 bit 3rdparty components from "https://www.opencascade.com/content/3rd-party-components"

Step 3:

     Then I configured custom.bat as "VCVER = vc12" and "ARCH=64", and verified the 3rd party version numbers corresponding to custom.bat file. (everything is perfect)

Step 4:

    I opened the Microsoft Visual Studio 2013 using "msvc.bat", then I started building the solution file "OCCT.sln" .

Step 5:

   During compilation, I got 35 errors (attached).

I request everyone to suggest me some option to solve this issue, struggling for the last 2 weeks.

Thank you for the support and advice.

Kirill Gavrilov's picture

It is better following instructions of and using source package of OCCT instead of installer with pre-built binaries for one of another VS versions
(sure, it is possible using installer as well, but then you should be more careful about mess up in development environment).
https://dev.opencascade.org/doc/overview/html/occt_dev_guides__building....

For example, custom.bat is expected to be a generated file, not modified manually (thus, I suppose that you don't follow guide for building OCCT).

VINOTHKUMAR THANGAVEL's picture

Hi Sir,

Thanks a lot for the prompt reply, I'll try as per your advice. 

Andrey BETENEV's picture

Make sure you have Windows SDK installed (perhaps this can be managed by option like "support of native applications" in Visual Studio installer)

VINOTHKUMAR THANGAVEL's picture

Thank you Mr. Andrey BETENEV,

                 I've already installed Windows SDK on my DESKTOP, Windows 7 (attached), even though getting these error while compiling OPEN CASCADE 7.3. However, in the same PC environment, I've compiled the OPEN CASCADE 7.2, it worked fine. 

Additionally, I followed the same compilation procedure mentioned above on my laptop having WINDOWS 10 OS, and there is no compilation error on Open Cascade 7.3, its working good.

                Problems starts when I try to compile in Windows 7,  I think there are some windows libraries (helping for visualization) missing during compiling the toolkit TKService Project in OCCT.sln,  because as you can see in previous error attachments, the errors were generating only from these following 3 out of 60 modules, other 57 modules were successfully compiled.

1. TKService .

2. TKIVthDraw.

3. TKDraw.

Thank you for the support.

Attachments: 
Kirill Gavrilov's picture

The functions like DefWindowProcW in your TKService error log are exported by User32 library, which is not listed within TKService dependencies for some reason.
Try adding CSF_user32 to src/TKService/EXTERNLIB, regenerate projects and rebuild OCCT to see if it helps.

VINOTHKUMAR THANGAVEL's picture

PROBLEM SOLVED:

(To install  "Windows installer VC++ 2010 64 bit: opencascade-7.3.0-vc10-64.exe (232 975 560 bytes)" in Windows 7 )

Thanks to Mr. Kirill Gavrilov and Mr. Andrey BETENEV,

Here is the solution for the attached errors:

1. Follow first three steps in this thread, and there is small modification in (STEP 4)

This the modification in  Step 4: (modified)

    I opened the Microsoft Visual Studio 2013 using "msvc.bat", then add the following libraries (*.lib)in the corresponding OCCT.sln Projects (attached),

TKDraw : (Folder: Draw)

      user32.lib (already included)

      kernel32.lib

      shell32.lib

TKIVtkDraw: (Folder: Draw)

      kernel32.lib

      user32.lib

TKService: (Folder: Visualization)

       kernel32.lib

       user32.lib

       advapi32.lib

then I started building the solution file "OCCT.sln", I could compile all the 60 projects very smoothly without errors.

Thank you for the great support.

To reply Mr. Kirill Gavrilov, 

          In my Microsoft Visual Studio 2013, I couldn't find this macro "CSF_user32", so I included as (*.lib)s

Thanks again to Mr. Kirill Gavrilo.

Attachments: 
Kirill Gavrilov's picture

Could you please go to "TKService project settings -> Linker -> Input -> Additional Dependencies -> Edit" and check the list in "Inherited values"?
On my system it includes user32.lib, so this is why OCCT builds well on common Visual Studio installations:

kernel32.lib
user32.lib
gdi32.lib
winspool.lib
comdlg32.lib
advapi32.lib
shell32.lib
ole32.lib
oleaut32.lib
uuid.lib
odbc32.lib
odbccp32.lib

I believe that your VS installation on Windows 7 workstation has been messed up at some step (due to installation errors / edition of configuration files / etc.).
If this is the case, maybe you may recall what was the cause for these modifications?

VINOTHKUMAR THANGAVEL's picture

Hi Mr. Kirill Gavrilov,

          Sorry for the delayed reply.

In my,

Desktop PC: Windows 7: I didn't have the any *.lib in inherited values, (attached)

Laptop:  Windows 10: I have the inherited values (attached)

As you mentioned that is the issue, "the missing inherited values cause errors", but I followed the same procedure for both PCs. I don't understand how *.libs are missing only in my Desktop.

Thank you for the great support.