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

ICL compiler error

abhijeet_thatte
Beginner
1,476 Views
I am building a big project and have been getting an error

icl: command line error: multiple sources; object output option must specify dir

Does anyone have any idea about the error.
0 Kudos
6 Replies
Judith_W_Intel
Employee
1,476 Views

This error occurs when you are trying to compile multiple files but you expect them to be compiled to one object file, i.e.:

!% icl -c t.c t2.c /Fofoo.obj
Intel C++ Compiler XE for applications running on IA-32, Version Mainline Bet
a Build x
Built Feb 11 2011 15:23:09 by jward4 on JWARD4-DESK in D:/workspaces/cfe/dev
Copyright (C) 1985-2011 Intel Corporation. All rights reserved.

icl: command line error: multiple sources; obj output option must specify dir


Microsoft gives this error:

!% cl -c t.c t2.c /Fofoo.obj
Microsoft 32-bit C/C++ Optimizing Compiler Version 14.00.50727.42 for 80x86
Copyright (C) Microsoft Corporation. All rights reserved.

cl : Command line error D8036 : '/Fofoo.obj' not allowed with multiple source fi
les
!%

0 Kudos
abhijeet_thatte
Beginner
1,476 Views
Hey,

Thanks for ur reply. However, I am not sure if that is a problem. I am not compiling 2 files into 1. This build works for Microsoft VC++. What is the meaning of "obj output option must specify dir"? Is there any way to get more information about error?

Thnx
0 Kudos
Judith_W_Intel
Employee
1,477 Views
I don't know of any way to get additional help for this option. We have a knowledge base for diagnostics but this one has not yet been filled in.

The /Fo optionsays in the help that it cantake a directory name if multiple files are used, i.e.:

/Fo[file]
name object file (or directory for multiple files; i.e. /FoMYDIR)

but I actually tried this and it doesn't seem to work.


Anyway, please supply a reproducer ... it sounds like a bug in our driverif it works with MSVC++.

thanks,
Judy
0 Kudos
abhijeet_thatte
Beginner
1,477 Views
Hey,

Is there any chance of getting this error even if we are not using two files to create an object file? I checked my logs and it looks like .obj file has been created by only one file. Please, let me know if such scenarios possible.

Thanks,
Abhi
0 Kudos
abhijeet_thatte
Beginner
1,477 Views
Hey,

Found the problem. It has nothing to do with compilation of source files. In every compilation of a source file, build was calling a perl script to check versions of files and that perl script had some problem. I removed invocation to that file and it worked.

Weird thing is kind of error message printed by the compiler. I am not sure why such weird error message was given.

Thanks,
Abhi
0 Kudos
chauhan__kajal
Beginner
1,477 Views

hey,

I am facing this problem when doing offloading on intel xeon phi coprocessor,it is comiler error

Give me solution as u are more aware with this

1>icl: : error #10036: unable to run 'C:\PROGRA~2\INTELS~1\COMPIL~1\windows\bin\intel64_mic\icc.exe'
1>icl: : error #10340: problem encountered when performing target compilation

0 Kudos
Reply