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

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

Imagen de Ricardo Costa

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

publicaciones de 7 / 0 nuevos
Último envío
Para obtener más información sobre las optimizaciones del compilador, consulte el aviso sobre la optimización.

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

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).

Imagen de Ricardo Costa

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.

 

Adjuntos: 

AdjuntoTamaño
Descargar testproject.zip128.97 KB

>>...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.

>>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.

>>...I will also provide a Visual Studio solution with two projects for Intel C++ and Microsoft C++ compilers.

Attached and take a look.

Adjuntos: 

AdjuntoTamaño
Descargar opengltestapp.zip157.7 KB

Inicie sesión para dejar un comentario.