Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
7 Views

error PRJ0019: A tool returned an error code

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
Highlighted
Black Belt
7 Views

You probably have Cygwin or

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
Highlighted
Beginner
7 Views

Hi mecej4,

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
Highlighted
7 Views

While mecej4 is, I believe

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.

Retired 12/31/2016
0 Kudos
Highlighted
Beginner
7 Views

Thanks Steve and mecej4,

Thanks Steve and mecej4,

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

Thank you very much again.

0 Kudos
Highlighted
7 Views

By the way, the Intel install

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.

Retired 12/31/2016
0 Kudos