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

Is it possible to run an application with out installing opencascade...

suman's picture
Forums: 

Hi ...
I have a problem in converting an STL File to IGES file.I deserve that you can solve my problem...

The Problem is when I have developed an application to convert an STL file to IGES by using openCascade API and VC++6.0.

It's working in the machine in which opencascade softwares has been instaled.But I want to run the application with out installing OpenCascade softwares.Is it Possible?If it's possible..Please help me out in this regard..

I'm in a hurry to deliver this product...
I hope You can help me...If it's not possible,give me some guidelines to use the application with less installation burden by the customer...

Thanks in Advance
Suman

Bearloga's picture

Hi Suman,
In the VC++ product you can find the program depends.exe. It helps to determine all dlls that are necessary to run your application. Just distribute all needed dlls with your program. Also you may need to copy UnitsAPI and StdResource folders from ros/src of OCC. To launch the application, create a batch file that sets all needed variables.
Bearloga

suman's picture

Hi Bearloga,

Thanks for your sharp reply...

I'm new to VC++..So please tell me where to copy these UnitsAPI and StdResource folders...
And one more thing where I have to create a batch file...

If I do this,Again do I need to install Opencascade softwares..Please give me some clear explanation...

I'm always waiting for your reply...

Thanks in Advance
Suman

suman's picture

Hi Bearloga,

Thanks for your sharp reply...

I'm new to VC++..So please tell me where to copy these UnitsAPI and StdResource folders...
And one more thing where I have to create a batch file...

If I do this,Again do I need to install Opencascade softwares..Please give me some clear explanation...

I'm always waiting for your reply...

Thanks in Advance
Suman

Dmitry's picture

I have the same problem, but a lit bit other application architecture.
All dependences were found, but....
My application consists of 3 "level"

1. C++ "normal" compiled -> c.lib + c.dll; linked with occ.lib
2. C++ compiled with /crl:oldsyntax -> net.dll; linked with occ.lib & c.lib
3. DOT.NET Project linked with c.dll + net.dll + occ.dll

1 Wrapper-> C++ not managed (Wrapper & tools für OCC Instance)

public class C_V3d_View
{
public:
Handle_V3d_View itsV3d_View;

public:
C_V3d_View(Handle_V3d_View theView)
{
itsV3d_View = new V3d_View();
}
....
};

C++ managed Class:

namespace OCC
{
public __gc class NET_V3d_View
{
public:
C_V3d_View *itsV3d_View;

public:
NET_V3d_View()
{
this->itsV3d_View = new C_V3d_View();
}
...
};
}

3. DON NET
...
NET_V3d_View aView = new NET_V3d_View();
...

The same problem:
I can not start it on the other computer.
(with or without install of OpenCascade).

If I copy all the dll in the application's order, it#s does not help.

May be this question is not the question for this forum.
But I allow me to ask:
what have I to do, to start the application on other comp ?
Thank you

Paul Jimenez's picture

OCC is quite problematic to get working right when you want to distribute it. In my case, I have a DLL developed in C++ that makes use of OCC, and a Delphi application that makes use of that DLL (actually it's quite a lot of fun getting them both to talk nicely). The easiest way to get it working is to copy all OCC DLLs, the C++ DLL and the Delphi app in the same directory. Have in mind that environment variables specific to OCC may interfere. Also, in a PC without OCC installed, I was able to have the Delphi app in one directory and all DLLs in another one. By using a BAT file I add the DLLs directory to the PATH and then call the Delphi app. However, in the PC where I have OCC installed, that setup does NOT work.

If you really need to get it working quickly, just try copying everything in a single directory and run the executable from there. Try that in a PC without OCC installed.

Dmitry's picture

OK, I wil try to deinstall the OpenCascade on the test PC.
does it work, deinstall ? I think it#s more difficult to deinstall as to install ;)

suman's picture

Dear Dmitry Khabi,

Funny...Yes..I do agree..It's difficult to deinstallatin rather than installation..
Thanks for taking charge of my pain...
And please let me know the status of the opencascade applicatin with out installation f openascade..

Thanks in Advance
suman

Paul Jimenez's picture

What about renaming all OCC specific environment variables in the meanwhile, while also removing OCC from the PATH? That would surely take way less time than uninstalling and then reinstalling.

Dmitry's picture

Step 1 was done
The deinstalling has worked. Theres are no enviroments variable (I hope).

Dmitry's picture

"Debug" application did not work.
May be realised ?

suman's picture

Hello Paul Jimenez,

Yes,I got it...........
Thanks alot...........
I'm getting it with out installing opencascade.....
Thanks
suman

Hesham Nasif's picture

Suman
Would you tell me your exact procedure to let opencascade applications works without installing it on the target machine
Thanks for your consideration
Hesham

Roman Lygin's picture

Hesham,
If this is still relevant, you can check this post - http://opencascade.blogspot.com/2009/03/distributing-your-software.html - where I described this.

Hope it helps.
Roman
---
opencascade.blogspot.com - the Open CASCADE blog

Hesham Nasif's picture

Dear Roman
Thank alot about your reply. Everything is working unless the adding of STEPCAF control writer into the code, it give File IO exception. Do you think it is a limitation on the free library or i have to take care and include some namespaces from the System
Thanks for your consideration

Hesham Nasif's picture

Dear Roman Lygin
Thanks for your considerations about this topic. I will try to make it
Best
Hesham

Pawel's picture

Don't forget to install VC++ Redistributable if you compiled your app with VS2005 or higher.

Pawel

Dmitry's picture

there is installed VC++ on the computer.
I get allways "FILELOADEXCEPTION...", wenn I am trying to start the program;(

Pawel's picture

Hi Dmitry,

for your managed/unmanaged application make sure:

- you have the corresponding .NET Framework installed
- you have VC++ Redistributable installed
- your application sees the OCC dlls (you can use a batch file to set up the environment)

Pawel

Dmitry's picture

1.
- you have the corresponding .NET Framework installed
It#s installed (I have made a little managed application and successful installed it)
2.
- you have VC++ Redistributable installed
I have (see 1.)
3. - your application sees the OCC dlls (you can use a batch file to set up the environment)
The dlls are in same directory and / or in OpenCascade distrubution #s directory

Dmitry's picture

and thank you Pawel ;)

Roman Lygin's picture

Hi Suman,

If you have experience of distributing any simple software to user machine, it won't be a problem for you to redistribute OCC.

Distribution of OCC-based apps does not require installing OCC on a destination machine (I mean run its install procedure). What you basically have to do is to copy OCC dlls (take all to make sure you did not miss anything), a few resources (located in %CASROOT%/src) and set a few environment variables (including PATH to where OCC dlls are located).
To get a clue what you have to do, take a look at %CASROOT%/env.bat. Take all src subdirectories mentioned there (e.g. UnitsAPI, StdResource, etc).

Also do not forget to take VC run-time libraries.

Hope this helps.
Roman

---
opencascade.blogspot.com - blog on Open CASCADE

suman's picture

Hi Roman

Thanks for your kind reply...

Yes..It worked by copying all Dll's in another folder and setting an environmental variable to that Dll directory...
Once again I'm conveying y heartful thanks to spare your time....

Thanks
suman