Intel® oneAPI Data Parallel C++
Support for Intel® oneAPI DPC++ Compiler, Intel® oneAPI DPC++ Library, Intel ICX Compiler , Intel® DPC++ Compatibility Tool, and GDB*

Trouble compiling MFC code

D_F
Beginner
1,035 Views

I'm having trouble compiling MFC code using Intel OneAPI DPC C++ compiler. I get multiple build errors. Attached is a sample MFC project that shows the build errors, I get different errors using the Intel Classic c++ compiler.  Typical errors are "non-static member function without an object argument". Seems to be a redefinition of some MFC defines??

0 Kudos
6 Replies
NoorjahanSk_Intel
Moderator
993 Views

Hi,

 

Thanks for posting in Intel Communities.

 

>>Typical errors are "non-static member function without an object argument"

You can remove these errors by defining a member function with the class object that it belongs to.

For example, we have made the below changes in PropertiesWnd.cpp file 

      ON_UPDATE_COMMAND_UI(ID_EXPAND_ALL, &CPropertiesWnd::OnUpdateExpandAllProperties)

      ON_COMMAND(ID_SORTPROPERTIES, &CPropertiesWnd::OnSortProperties)....

 

Please refer to the below screenshot for more details:

NoorjahanSk_Intel_0-1678356690400.png

 

Please try to make similar changes in your application as mentioned above and let us know If your issue still persists.

 

Thanks & Regards,

Noorjahan.

 

0 Kudos
D_F
Beginner
958 Views

Thanks, that did it. However I'm getting a few warnings (-Wunused-local-typedef ). How do I suppress these warnings with the Intel compiler?

0 Kudos
NoorjahanSk_Intel
Moderator
897 Views

Hi,


>>Thanks, that did it

Glad to know that it worked for you


>>How do I suppress these warnings with the Intel compiler?


You can suppress this warning by adding the/Wno-unused-local-typedef flag under


Properties -> C/C++ -> Command-line -> Additional-options.


Thanks & Regards,

Noorjahan.


0 Kudos
NoorjahanSk_Intel
Moderator
857 Views

Hi,


Has the information provided above helped? If yes, Could you please confirm whether we can close this thread from our end?


Thanks & Regards,

Noorjahan.


0 Kudos
D_F
Beginner
845 Views

Yes, thanks for the help.

0 Kudos
NoorjahanSk_Intel
Moderator
815 Views

Hi,


Thanks for the confirmation!


As this issue has been resolved, we will no longer respond to this thread. If you need any additional information, please post a new question


Thanks & Regards,

Noorjahan.


0 Kudos
Reply