Samples2D don't work

Hello. I've downloaded cascade 4.0 with CVS. The Samples2D examples have a problem with the Aspect_GenericColorMap and can't build. I think the class v2d_viewer has changed and that's why this example won't compile. I'm still not very fluent in cascade or c++ and it would really help if I could make this example work. I've tried to include "aspect_GenericColorMap" but I get this message:

"error LNK2001: unresolved external symbol "public: class Handle_Aspect_GenericColorMap __thiscall V2d_Viewer::ColorMap(void)const " (?ColorMap@V2d_Viewer@@QBE?AVHandle_Aspect_GenericColorMap@@XZ)"

Can anyone help make this sample work. Thank's.

r-fortes's picture

Does Cascade work in Windows2000? When I try to execute any 2DSample I get a Runtime error. The Topology Samples work almost fine but even if I run A simple Wizard Viewer project the same error accurs. What should I do? I'm already using Cascade3.0. Should I stop using W2000 and turn to NT? Thank's

Mikael Aronsson's picture

Hi !

Open cascade works fine on Windows2000, check your environment variables, most of the time that OOC failes to run it's because you have set the envionment variables incorrect.

Mikael

r-fortes's picture

Hi Mikael. Thank's for your help but I'm pretty sure I got all variables right. If some variable was wrong the project coudn't compile rigth?? The error I get is a runtime error in the exe file. I also got some linker errors that I didn't understend. But as I said I'm not very fluent in c++. By the way, I often get an error message (not just in cascade) saying that "command in 0x8272f4 (some number) could not read or wrigth memory in adress 0x000000 (some number again). This kind of stuff is to much for my knoledge. Do you think it could have anything to do with a RAM problem? Thank's again

fabrizio's picture

Hi,

> Hi Mikael. Thank's for your help but I'm
> pretty sure I got all variables right. If
> some variable was wrong the project coudn't
> compile rigth?? The error I get is a runtime
> error in the exe file. I also got some
> linker errors that I didn't understend. But
> as I said I'm not very fluent in c++.

The linker error, that you explained in previous post, is probably due to linker not find the library in which is define the function report to error line. Yuo must check that your linker find all necessary library (.lib files).

> By the
> way, I often get an error message (not just
> in cascade) saying that "command in
> 0x8272f4 (some number) could not read or
> wrigth memory in adress 0x000000 (some
> number again). This kind of stuff is to much
> for my knoledge. Do you think it could have
> anything to do with a RAM problem??? Thank's
> again

I not think that you have a RAM problem (Is it possible but improbable!! ). The error message that you get is an error that occured when in your code you try to use a pointer that is not valid (Es. null or the object that it point is not the one who you expect). If you debug your program you can see the pointer value that cause error.

Fabrizio

Mikael Aronsson's picture

Hi !

Well, I meant the environment variables used by Open Cascade at runtime, one good example is the example that use the units library, if you try to run this without first setting CSF_UnitsLexicon and friend variables you will get a crash at runtime just like you did.

Could you be a bit more specific about the linker errors ?, if you get a linker errors, then your application is not linked correctley and you will not be able to run it.

Mikael