Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.

XE 2013 and VS 2012: problem with linker's additional dependencies path

Ricardo_Costa
Beginner
387 Views

Hello,

 

I'm using Parallel Studio XE 2013 and VS 2012 RTM. It seems Intel C++ linker, unlike MSVC, does not accept relative paths in additional dependencies specifications for .lib files.

 

For example, in my project I have set the following project properties:

 

Under Linker -> Input -> Additional Dependencies: folder1/lib1.lib; folder2/lib2.lib; etc

 

And under Linker -> General -> Additional Library Directories: C:\rootfolder

 

Such that "C:\rootfolder\folder1\lib1.lib" would be the full lib path.

 

However, Intel C++ gives "lib file not found" messages when compiling. It only works if I put each subfolder under the Additional Library Directories and keep the filenames only in Additional Dependencies.

 

I would suggest it to behave the same way as MSVC linker.

 

Thanks,

Ricardo Costa

0 Kudos
6 Replies
Mark_S_Intel1
Employee
387 Views
Ricardo, It would be a time saver if you could send me your test case so I could reproduce the problem rather than trying to create one from scratch. Would you be able to send me a test case? Thanks, --mark
0 Kudos
SergeyKostrov
Valued Contributor II
387 Views
You need to step up for one level in order to make it working and please try to use dots in these paths: ../folder1/lib1.lib; ../folder2/lib2.lib; etc Relative paths could be considered as a fundamental property of any operating system and it can not be considered as something that belong to Visual Studio 2012. However, additional verification is needed, because errors are possible in new products, and you can ask the same question on a Microsoft's forum(s).
0 Kudos
Ricardo_Costa
Beginner
387 Views

Hi Mark,

 Sorry for taking so long. Here is the test case attached. TestProject project folder contains another folder GL\lib with the glut32.lib referenced in the project as follows:

Under Linker -> Input -> Additional Dependencies: lib\glut32.lib

And under Linker -> General -> Additional Library Directories: $(ProjectDir)\GL

It works and compile fine with MSVC, but when you switch to ICL, it throws an error that the .lib file could not be found.

Sergey, I couldn't make it work with your workaround, i.e. changing it to ..\GL\lib\glut32.lib in the attached test project. The same error happens.

 

0 Kudos
SergeyKostrov
Valued Contributor II
387 Views
>>...I couldn't make it work with your workaround, i.e. changing it to ..\GL\lib\glut32.lib in the attached test project. The same >>error happens. Thank you for the test project and I'll let you know results of verification.
0 Kudos
SergeyKostrov
Valued Contributor II
387 Views
>>However, Intel C++ gives "lib file not found" messages when compiling. It only works if I put each subfolder under the >>Additional Library Directories and keep the filenames only in Additional Dependencies. >> >>I would suggest it to behave the same way as MSVC linker. Intel C++ compiler is compatible with Microsoft C++ compiler for many-many years. There are No any problems with Intel C++ compiler when linking OpenGL libraries and take a look at Glut.h header file at lines 66, 67 and 68. As you can see all OpenGL libraries are used ( defined ) already with #pragma comment ( lib, ... ) directives. I will also provide a Visual Studio solution with two projects for Intel C++ and Microsoft C++ compilers.
0 Kudos
SergeyKostrov
Valued Contributor II
387 Views
>>...I will also provide a Visual Studio solution with two projects for Intel C++ and Microsoft C++ compilers. Attached and take a look.
0 Kudos
Reply