Intel® oneAPI DPC++/C++ Compiler
Talk to fellow users of Intel® oneAPI DPC++/C++ Compiler and companion tools like Intel® oneAPI DPC++ Library, Intel® DPC++ Compatibility Tool, and Intel® Distribution for GDB*
671 Discussions

Getting "error MSB6006: "xilib.exe" exited with code 1" while building Static library in VS2019 wit

pankaj1982
Beginner
1,713 Views

Hello INtel Team,

I am trying to build  a static library (in VS2022 with Intel C++ oneApi DPC++ 2023 compiler as an extension added to VS2022 x64 bit version)

MS compiler generates the library without any issues.

When i try to generate the same library using Intel C++ 2023 compiler it gives me this error:

1>/<XFGHASHMAP>/: not a COFF object, bitcode, archive, import library or resource file
1>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Microsoft\VC\v170\Platforms\x64\PlatformToolsets\Intel C++ Compiler 2023\Toolset.targets(1191,5): error MSB6006: "xilib.exe" exited with code 1.

the file giving error is: Toolset.targets  (line 1191, <XILIB   )

 

find attached the file:  Toolset.targets

 

Can someone tell me what is the issue here?

Do i need to do some modifications in this file.

 

 

 

 

 

 

0 Kudos
3 Replies
RabiyaSK_Intel
Employee
1,684 Views

Hi,


Thanks for posting in Intel Communities.


Could you please provide a sample reproducer along with the steps to reproduce your issue? 


Could you also specify your Visual Studio 2022 sub version?


Thanks & Regards,

Shaik Rabiya



0 Kudos
pankaj1982
Beginner
1,674 Views

Thanks for taking a look.

I found the cause of this issue. This was due to a missing dependent dll file that xilib was not able to find (it was not generated separately).

I have a few questions about IntelOneApi DPC++ compiler though. Could you answer these questions for me:

 

1. How to disable specific warnings coming only for Intel C++ compiler.

ex. pragma unmanaged is used by MS VS C++ compiler, but its shown as warning during Intel DPC++ compilation:

FoundationEx\UI\SflToolBarEx.cpp(41,9): : warning : unknown pragma ignored [-Wunknown-pragmas]
1>#pragma unmanaged

How to suppress these warnings?

 

 

2. Can you tell me a #define which I can use for conditional compilation of some code for Intel C++ Compiler. (that works in MS VS2022)

all Intel Compiler Specific code I would like to enclose in these #ifdef ........  thing

ex. in windows we have _DEBUG.

#ifdef _DEBUG

  TRACE("DEBUG MESSAGE GOES HERE\N");

#endif

What should i use for Intel C++ compiler to wrap conditional compilation code in our library.

 

3. There is a warning coming when using MFC code in our library, shown below. Its a standard MFC based command

routing thing used by MFC framework.

FoundationEx\UI\SflToolBarEx.cpp(61,1): : warning : unused typedef 'ThisClass' [-Wunused-local-typedef]
1>BEGIN_MESSAGE_MAP(SFLToolBarEx, CMFCToolBar)
1>^
1>C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.35.32215\atlmfc\include\afxwin.h(1262,20): note: expanded from macro 'BEGIN_MESSAGE_MAP'
1> typedef theClass ThisClass; \
1> ^

please find attached the sample program (MFCApplication4.zip)  that can showcase this warning.

How to get rid of this warning?

 

We are trying to port our library code from MS VS compiler to support IntelOneApi compiler 2023 support.

Thanks in Advance,

Pankaj.

 

 

 

0 Kudos
RabiyaSK_Intel
Employee
1,640 Views

Hi,


Glad to know that your initial issue is resolved. Thanks for sharing the solution with us. As your initial query is solved could you please post your questions with sample reproducers on Intel oneAPI DPC++ compiler forum, as this thread will no longer be monitored by Intel? We would definitely assist you on your new thread.


Thanks & Regards,

Shaik Rabiya


0 Kudos
Reply