Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Eclipse, CDT, clang, Windows - Need help for install/configure
Eclipse, CDT, clang, Windows - Need help for install/configure [message #1797787] Tue, 06 November 2018 12:22
H R is currently offline H RFriend
Messages: 1
Registered: November 2018
Junior Member
I'm a newbie in the forum, hello everybody :o)

After trying to get things together with no success,
searching the internet for help I' m her finaly.

What i want is to develop c/c++ (OS: Windows 10/64bit) under Eclipse.
I also want to use clang as my "compiler-suite".
Don't know if mingw or cygwin is needed,
i would prefere it is not ..

So, what i have (installed) now is :

o Eclipse IDE for Java Developers/Version: 2018-09 (4.9.0)/Build id: 20180917-1800
o clang version 7.0.0 (tags/RELEASE_700/final)/Target: x86_64-pc-windows-msvc/
Thread model: posix/InstalledDir: C:\APP\LLVM\bin
o CDT : 9.5.4.201810050005
o MS-Visual Studio 14.0 (for headers etc)
o MS Windows Kits 10.0 for headers etc)

I try to build the most simple program existing :

-snip-
#include <stdio.h>
#include <stdlib.h>

int main(void) {
puts("Hello UPC World"); /* prints Hello UPC World */
return EXIT_SUCCESS;
}
-snip-

That's all i get (very frustrating !) :

13:18:31 **** Incremental Build of configuration Debug for project HELLO ****
Info: Internal Builder is used for build
clang "-IC:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.17763.0\\ucrt" "-IC:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\include" -O0 -emit-llvm -g3 -fsyntax-only -c -fmessage-length=0 -o "src\\HELLO.bc" "..\\src\\HELLO.c"
In file included from ..\src\HELLO.c:11:
In file included from C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt\stdio.h:13:
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt\corecrt_wstdio.h:187:14: warning: __declspec attribute 'allocator' is not supported [-Wignored-attributes]
_ACRTIMP _CRTALLOCATOR wchar_t* __cdecl _wtempnam(
^
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt\corecrt.h:54:38: note: expanded from macro '_CRTALLOCATOR'
#define _CRTALLOCATOR __declspec(allocator)
^

!!!! And many many warnings !!!!

It ends with :

38 warnings generated.
clang -v -o HELLO "src\\HELLO.bc"
clang version 7.0.0 (tags/RELEASE_700/final)
Target: x86_64-pc-windows-msvc
Thread model: posix
InstalledDir: C:\APP\LLVM\bin
"C:\\APP\\LLVM\\bin\\clang.exe" -cc1 -triple x86_64-pc-windows-msvc19.11.0 -emit-obj -mrelax-all -mincremental-linker-compatible -disable-free -disable-llvm-verifier -discard-value-names -main-file-name HELLO.bc -mrelocation-model pic -pic-level 2 -mthread-model posix -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -target-cpu x86-64 -dwarf-column-info -debugger-tuning=gdb -momit-leaf-frame-pointer -v -resource-dir "C:\\APP\\LLVM\\lib\\clang\\7.0.0" -fdebug-compilation-dir "V:\\DATA\\develop\\eclipse-workspace\\HELLO\\Debug" -ferror-limit 19 -fmessage-length 0 -fno-use-cxa-atexit -fms-extensions -fms-compatibility -fms-compatibility-version=19.11 -fdelayed-template-parsing -fobjc-runtime=gcc -fdiagnostics-show-option -o "C:\\Users\\44857\\AppData\\Local\\Temp\\1\\HELLO-858179.o" -x ir "src\\HELLO.bc"
clang -cc1 version 7.0.0 based upon LLVM 7.0.0 default target x86_64-pc-win32
"link.exe" -out:HELLO -defaultlib:libcmt -nologo "C:\\Users\\44857\\AppData\\Local\\Temp\\1\\HELLO-858179.o"
clang.exe: error: unable to execute command: program not executable
clang.exe: error: linker command failed with exit code 1 (use -v to see invocation)

13:18:32 Build Finished. 0 errors, 38 warnings. (took 912ms)



First of all, why do i need link.exe when there's a clang-linker ?

Can somebody who knows tell me what the steps are needed to "construct" a working develpment environment ?

Is something missing ?

Best regards and hoping for enlightment

Harry
Previous Topic:No source file named main.cpp
Next Topic:Debug of fork() crashes
Goto Forum:
  


Current Time: Fri Apr 19 13:03:30 GMT 2024

Powered by FUDForum. Page generated in 0.01982 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top