Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

error PRJ0019: A tool returned an error code

Truong_N_
Beginner
777 Views

Hi,

I have been googling this error and found some threads regarding the solutions to fix this error. However, I could not fix it yet.

I am running VS2015 with Intel Fortran. When I compile, it gave me this error:

error PRJ0019: A tool returned an error code

The following is the build log:

Linking...

Link /OUT:"Debug\Console2.exe" /INCREMENTAL:NO /NOLOGO /MANIFEST:NO /DEBUG /PDB:"C:\Users\Truong\Desktop\DrAlekseenko_project\test_project\Console2\Console2\Debug\Console2.pdb" /SUBSYSTEM:CONSOLE /IMPLIB:"C:\Users\Truong\Desktop\DrAlekseenko_project\test_project\Console2\Console2\Debug\Console2.lib" -qm32 "Debug\mainpgm.obj"
link: extra operand '/NOLOGO'
Try 'link --help' for more information.

Console2 : error PRJ0019: A tool returned an error code

Console2 - 1 error(s), 0 warning(s)

 

I am not sure what the issue is. Please help. 

Thank you very much,

Truong

0 Kudos
5 Replies
mecej4
Honored Contributor III
777 Views

You probably have Cygwin or some Unix/Linux compatibility package installed, and the Unix Link utility (to create file links) is found before the VC linker (also called Link) on %PATH%.

0 Kudos
Truong_N_
Beginner
777 Views

Hi mecej4,

That is indeed true. I have cygwin installed. What would be your recommendation? Should I uninstalled it?

Thank you very much

Sincerely,

0 Kudos
Steven_L_Intel1
Employee
777 Views

While mecej4 is, I believe correct, normally this isn't an issue in Visual Studio because VS sets up its own PATH using the list found in Tools > Options > Intel Compilers and Tools > Visual Fortran > Compilers.  Since you're using VS2015, I think the ultimate cause of this is that when you installed VS2015 you let it take the defaults, which means no Visual C++ and no VS linker.

Rerun the VS2015 install, select Modify (or Change), and check the box for C++ language support. See https://software.intel.com/en-us/articles/installing-visual-studio-2015-for-use-with-intel-compilers for more details.

0 Kudos
Truong_N_
Beginner
777 Views

Thanks Steve and mecej4,

It works after I reinstall VS2015 with C++ language support.

Thank you very much again.

0 Kudos
Steven_L_Intel1
Employee
777 Views

By the way, the Intel install warns you of the problem, but lets you proceed anyway. I have argued with the install team that the install should just exit after noticing no C++ support was installed, even if you can fix it up later. My experience is that most users ignore the warning if the install can continue and then don't go back to fix the problem.

0 Kudos
Reply