missing TKRBep.dll in my own project

Hi friend,
I create my own project Open cascade with ms 2010. but when i run it,it has a error.

My code :

// ReadStepFile.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include
#include
#include
#include
//#include
//#include
//#include

Standard_Integer _tmain()
{
STEPControl_Reader reader;
IFSelect_ReturnStatus stat = reader.ReadFile("");

Standard_Integer sti = reader.NbRootsForTransfer();

return 0;
}

Error :

The program can't start because TKBRep.dll is missing from your computer. Try re installing the program to fix this problem.

Hans's picture

Look at my "workaround"-Thread. Should help you

Hans's picture
Ear MongHeng's picture

Hi my senior Hans
After i get your advise, i can resolve my problem and suddenly i find other solution. i just copy all *.dll file in casroot into C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin(my path).
one question what is difference of this step and your step.

thank you in advanced.

Hans's picture

This step was described in my thread, too :)

The difference: With the *.bat files you setup an environment for VisualStudio and the systems searches for the *.dlls required by your *.exe in this evironment-parts.

Without those bats it searches for the required *.dll in the system-environment and in the location-folder of your *.exe.

I hope my description is some kind of correct. This is how i understand it :)

swarali kulkarni's picture

I am using Visual Studio 2019, vc 16, and getting errors for TKBrep.Dll not found,is it applicable for visual Studio 19 as well?

Dmitrii Pasukhin's picture

VS 2019 - vc142. No it should not be possible. Do you build DRAWEXE or your own application? If your - you need to specify PATH env variable or put *.dll in avaliable path.

Best regards, Dmitrii.