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

Compilation under Xcode failed

mikhail_k_4
Beginner
742 Views

I have a file that could be successfully compiled with Xcode native compiler. My attempt to switch project to the ICC fails, because of all files complied in the following way:

CompileICC /Users/misha/Library/Developer/Xcode/DerivedData/system-gikqgxovhcwspiekxsybjzxtxlrn/Build/Intermediates/dcs.build/Debug/libdcsQt.build/Objects-normal-asan/x86_64/controls.o gui/qt/controls.cpp

    cd /Users/misha/SharedW/svn/soac/trunk/common/pc/dcs

    /usr/local/bin/icc-16.0 -x c++ -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -mmacosx-version-min=10.11 -g -O0 -w1 -fno-omit-frame-pointer -D_LIBRARY_ -D_OS_MACOSX_ -DDEBUG=1 -D_GUI_QT_ -DQT_GUI_LIB -DQT_CORE_LIB -DQT_WIDGETS_LIB -DQT_SHARED -stdlib=libc++ -fvisibility=default -fpascal-strings -I/Users/misha/Library/Developer/Xcode/DerivedData/system-gikqgxovhcwspiekxsybjzxtxlrn/Build/Intermediates/dcs.build/Debug/libdcsQt.build/libdcs-txt.hmap -F/Users/misha/Library/Developer/Xcode/DerivedData/system-gikqgxovhcwspiekxsybjzxtxlrn/Build/Products/Debug -F/Developer/Qt5/clang_64/lib -F/Library/Frameworks -I/Users/misha/Library/Developer/Xcode/DerivedData/system-gikqgxovhcwspiekxsybjzxtxlrn/Build/Products/Debug/include -I/opt/boost/include -I/opt/BDB/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include -Icore -I/Users/misha/SharedW/svn/soac/trunk/common/pc/dcs -I/Users/misha/SharedW/svn/soac/trunk/common/pc/dcs/.. -I/usr/local/include -I/System/Library/Frameworks/CarbonCore.framework/Headers -I/Developer/Qt5/clang_64/lib/QtCore.framework/Versions/5/Headers -I/Developer/Qt5/clang_64/lib/QtGui.framework/Versions/5/Headers -I/Developer/Qt5/clang_64/lib/QtWidgets.framework/Versions/5/Headers -I/Developer/Qt5/clang_64/mkspecs/macx-xcode -std=c++14 -pipe -pipe -fvisibility=hidden -c /Users/misha/SharedW/svn/soac/trunk/common/pc/dcs/gui/qt/controls.cpp -o /Users/misha/Library/Developer/Xcode/DerivedData/system-gikqgxovhcwspiekxsybjzxtxlrn/Build/Intermediates/dcs.build/Debug/libdcsQt.build/Objects-normal-asan/x86_64/controls.o -MMD -MT dependencies -MF /Users/misha/Library/Developer/Xcode/DerivedData/system-gikqgxovhcwspiekxsybjzxtxlrn/Build/Intermediates/dcs.build/Debug/libdcsQt.build/Objects-normal-asan/x86_64/controls.d

 

icc-16_0: command line warning #10121: overriding '-fvisibility=default' with '-fvisibility=hidden'

NOTE: Use of this header (bool_trait_def.hpp) is deprecated

NOTE: Use of this header (template_arity_spec.hpp) is deprecated

NOTE: Use of this header (template_arity_spec.hpp) is deprecated

Command /usr/local/bin/icc-16.0 failed with exit code 2

 

The same command in console successfully compiles file, but under Xcode I always have "Command /usr/local/bin/icc-16.0 failed with exit code 2" What does it mean?

0 Kudos
7 Replies
Erich_M_
Beginner
742 Views

Erich H. Machu

Sebastian-Brunner-Gasse 3, A 1130 Vienna, Austria,                                                April 29, 2016

erich.machu@hostprofis.at,             user name E1101E04D

Dear Sirs,

I have purchased the Intel XE 2016 Fortran developer software already some months ago but so far could not produce an executable code.

My problem: When in „Microsoft Developer Environment“ (MSDEV, also called “Fortran Power Station“), a certain Fortran code, consisting out of a main program called Starling_F90 + some 20 subroutines + common blocks, builds and executes without problems.

When in „Intel XE 2016 MS Visual Studio 2013”, exactly the same Fortran code, copied to directory .“..\Intel\Projects\Starling_F90“ does not build, due to an “error LNK2001: unresolved external symbol mainCRTStartup”, see log file below.

A „build error file“ is offered in „Microsoft Visual Studio“ but cannot be displayed. However there exists a „ file :///D:/INTEL/Projects/Starling_F90/Debug/BuildLog.htm “ which, when opened, reads as follows:

Build Log

 

 

 

 Build started: Project: Starling_F90, Configuration: Debug|Win32

Output

 

 

Linking...
Link /OUT:"Debug\Starling_F90.exe" /INCREMENTAL:NO /NOLOGO /MANIFEST /MANIFESTFILE: "Debug\Starling_F90.exe.intermediate.manifest" 
/MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:"D:\INTEL\Projects\Starling_F90\Debug\Starling_F90.pdb" /SUBSYSTEM:CONSOLE 
/IMPLIB:"D:\INTEL\Projects\Starling_F90\Debug\Starling_F90.lib" "Debug/DISCLAIMER.res"
Link: warning #10013: no objects specified for multi-file optimization
LINK : warning LNK4068: /MACHINE not specified; defaulting to X86
LINK : error LNK2001: unresolved external symbol mainCRTStartup
Debug\Starling_F90.exe : fatal error LNK1120: 1 unresolved externals
Starling_F90 - 2 error(s), 2 warning(s)
                 

 

My questions:

  1. What has to be done to execute program Starling_F90 in INTEL XDK + MS Visual Studio?
  2. How can the error “unresolved external symbol mainCRTStartup “ be repaired?
  3. How can the error file be displayed in MS Visual Studio?
  4. Do you see any other problems?

Thanking in advance for your help and kind regards, Erich H. Machu

0 Kudos
Kittur_G_Intel
Employee
742 Views

Hi Mikhail,
Pardon me the issue's transferred to the fortran forum for the second issue posted in your thread :-(  Well, the developers say they need a reproducer to investigate further as they can't do so with just the information you have in the description, appreciate much.
Kittur

Hi Folks,
I've transferred the second issue in this thread to the Fortran forum so support engineers for Fortran can address that and transfer back to C++ forum for the first issue if possible.
 

Kittur

0 Kudos
Kittur_G_Intel
Employee
742 Views

Hi Erich,
Instead, can you please file a new issue in this Fortran forum? That way I'll transfer the original thread on Mac issue back to the C++ forum, appreciate much.

Regards,
Kittur

0 Kudos
Kittur_G_Intel
Employee
742 Views

Hi Mikhail,
Can you attach a preprocessed file (use -P option to generate the .i file) so I can investigate further? The exit code could be due to any number of factors and hence need a reproducer, appreciate much.

Thanks,
Kittur

0 Kudos
Manfredo_d_
Beginner
742 Views

Was this issue solved? Or moved?

I am actually having a very similar error with ifort compilers in Xcode.

0 Kudos
Viet_H_Intel
Moderator
742 Views

Can you create a thread with a test case in https://software.intel.com/en-us/forums/intel-fortran-compiler-for-linux-and-mac-os-x?

 

0 Kudos
Reply