Build new project using ImportExport


I try to build a new project using ImportExport from OpenCascade. I created a new MFC project in VS 2005, set the include paths and insert "#include ". Then I started building and got the following error: "fatal error C1189: #error : 'Wrong compiler options has been detected. Add /DWNT option for proper compilation!!!!!'". What's the problem and what can I do?


Jan Brüninghaus's picture

"Add /DWNT option for proper compilation" <-- You have posted the solution...

pkoeppe's picture

Thanks for the reply. Ok, when I set this "/DWNT" in project properties=>Configuration=>C/C++=>Command line=>Extra options then I get 98 errors like:

- error C4430: Absent type specificator - int is assumed. Hint: "default-int" is not supported by C++.
- error C2143: Syntax error: A ',' before '&' is absent.
- ...

What's wrong I only created a new MFC project, included this one file "#include " and until now I have not inserted any code like "CImportExport::ReadIGES();". Can anybody help me?


Tom Beecher's picture

I was able to get things to build by suppressing error 4430

( Project Property Pages => Configuration Properties => C/C++ => Advanced => Disable Specific Warnings set to 4430 )

So far, everything seems to be working okay.

Good luck!


pkoeppe's picture

Thanks for the reply, but this does not work for me. Any other suggestions??? Waiting for help.


pkoeppe's picture

Maybe anybody can give me step by step instructions for creating a new MFC application and including ImportExport with VS 2005.

Here is the way I do it (unsuccessfully) at the moment:
1. Create a new MFC project and use all default settings. (Starting this works fine.)
2. Insert "#include " and add in project properties => configuration => C/C++ => general => extra include folders => "\samples\standard\mfc\Common;$(CASROOT)\inc". (Starting this results in $(CASROOT)\inc\standard_stream.hxx(5) : fatal error C1189: #error : "Wrong compiler options has been detected. Add /DWNT option for proper compilation!!!!!")
3. Adding "/DWNT" in project properties => configuration => C/C++ => command line => extra options. (Starting this results in 98 errors. Generally "absent type specificators" and "syntax errors". Some "new definition, different base types" and problems with overloads.)

Please help. I don't know what the problem is.


pkoeppe's picture

Has nobody an idea what the problem is?


P Dolbey's picture

These errors oftem appear when you haven't included all the necessary OCC headers in your source code. You need to ensure that there's an include file for OCC every class you use and the gotcha is often missing the extra "Handle_..." includes for those classes using the smart pointers - these in particular use the Handle() macro that can confuse the compiler. Check out some of the MFC demos for guidance.


LeeYin's picture


Mohammad's picture

use #include just before #include

Yogesh Gat's picture

Thanks Patrick Köppe san...It works..!