Article View: pl.comp.lang.c
Article #309718Re: Kompilowane nagłówki z GCC (i Clang)
From: Borneq
Date: Sat, 30 Jun 2018 09:06
Date: Sat, 30 Jun 2018 09:06
33 lines
2124 bytes
2124 bytes
Coś mi się nie zgadza: mam gch_header.h, #include "llvm-c/Analysis.h" #include "llvm-c/Initialization.h" #include "llvm/IR/Module.h" #include "llvm/IR/Verifier.h" #include "llvm/InitializePasses.h" #include "llvm/PassRegistry.h" #include "llvm/Support/raw_ostream.h" #include <cstring> wołam: gcc -xc++ gch_header.h -I/home/andrzej/devel/llvm/include/ -I/home/andrzej/devel/llvm/mybuilddir/include/ tym razem są błędy /usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/Scrt1.o: In function `_start': (.text+0x20): undefined reference to `main' /tmp/cc8wVfVm.o:(.data.rel+0x0): undefined reference to `llvm::EnableABIBreakingChecks' collect2: error: ld returned 1 exit status podczas gdy inny prosty header mający tylko #include<stdio.h> dawał 1.9 megowy .gch bez błędów. dlaczego tu chce linkować? natomiast gcc gch_header.h -I/home/andrzej/devel/llvm/include/ -I/home/andrzej/devel/llvm/mybuilddir/include/ bez -xc++ tworzy mi malutki .gch oraz daje błędy c++ Jestem więc zakleszczony, bo bez -xc++ przyjmuje język c zamiast c++, a z tym -xc++ przyjmuje że to plik C++ a nie nagłówek C++. jak by było -xhpp czy coś takiego...
Technical Details
Message-ID:
<ph7h77$igd$1@node2.news.atman.pl>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!newsfeed2.atman.pl!newsfeed.atman.pl!.POSTED!not-for-mailReferences:
<ph7d3u$em3$1@node2.news.atman.pl> <ph7d8k$em3$2@node2.news.atman.pl>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!newsfeed2.atman.pl!newsfeed.atman.pl!.POSTED!not-for-mail From: Borneq <borneq@antyspam.hidden.pl> Newsgroups: pl.comp.lang.c Subject: Re: Kompilowane nagłówki z GCC (i Clang) Date: Sat, 30 Jun 2018 11:06:47 +0200 Organization: ATMAN - ATM S.A. Lines: 33 Message-ID: <ph7h77$igd$1@node2.news.atman.pl> References: <ph7d3u$em3$1@node2.news.atman.pl> <ph7d8k$em3$2@node2.news.atman.pl> NNTP-Posting-Host: public-gprs630544.centertel.pl Mime-Version: 1.0 X-Trace: node2.news.atman.pl 1530349607 18957 5.184.6.81 (30 Jun 2018 09:06:47 GMT) X-Complaints-To: usenet@atman.pl NNTP-Posting-Date: Sat, 30 Jun 2018 09:06:47 +0000 (UTC) User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 In-Reply-To: <ph7d8k$em3$2@node2.news.atman.pl> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit