Problem with compiling csharp sample

Albert's picture

I use VS2012 to rebuild occ, and there are some warnnings. Like "may cause data lost", but I think it`s ok.
So I try to build samples in Csharp, firstly, it appear errors with cannot find header files like "Standard_Boolean.hxx:No such file or directory", then I add /inc, /libd, /scr, to the project, it works ok. But secondly, I can run the sample with no error untill I click "new", or "About", this time it appears an error "Could not load file or assembly 'shell, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format."
I cannot figure out the reason.
Anyone can help, pls?!

abv's picture

Check your environment

Hello,

It looks like if you still have not well defined environment for building OCCT and samples. Normally it should work without a need to change settings in VS projects. First, check that environment variable VCVER is set to vc11 in your custom.bat file. Also check value of CASROOT variable. Make sure that you build OCCT and your application by the same version of VS and in the same mode (Debug or Release, 32- or 64-bit).

For the future, please post this kind of questions to http://www.opencascade.org/org/forum (the forum on dev portal is devoted to OCCT development rather than usage).

Andrey

Albert's picture

Thanks a lot, the problem is

Thanks a lot, the problem is I build example of csharp in debug mode, but I build my ooct in release mode.

www.opencascade.com

Copyright 2011-2017
OPEN CASCADE SAS
Contact us