unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Alexandru-Sergiu Marton <brown121407@posteo.ro>
To: help-guix@gnu.org
Subject: Emacs, ccls, LSP and C++
Date: Tue, 17 Nov 2020 23:50:02 +0200	[thread overview]
Message-ID: <87y2iz3b79.fsf@posteo.ro> (raw)

Hi,

I have some problems setting up a C++ development environment on Guix
System.

I'm using Emacs with lsp-mode and emacs-ccls. This setup works very well
for C projects, but ccls doesn't seem to like anything related to
C++. Take this simple program for example:

--8<---------------cut here---------------start------------->8---
#include <iostream>

int
main ()
{
  std::cout << "Hello, World!\n";
  return 0;
}
--8<---------------cut here---------------end--------------->8---

Both lsp-mode and eglot tell me that ccls reports: "no member named
'cout' in namespace 'std'".

I have gcc-toolchain installed and I can compile the project just
fine. I tried using bear to generate a compile_commands.json, from this
simple Makefile:

--8<---------------cut here---------------start------------->8---
all:
	g++ main.cpp -o main
--8<---------------cut here---------------end--------------->8---

but ccls still fails to recognize the members of the std
namespace. Irony seems to fail too (same problem), but I haven't tried
playing with it too much, I just tested the default Doom Emacs config.

One more thing: ccls also complains about this, and I don't know what to
make of it:

main.cpp error:20 unknown type name '_GLIBCXX17_DEPRECATED'

Do any of you have experience with setting up a C++ development
environment on Guix System in Emacs? Did you run into similar problems,
and if yes, how did you solve them?

Cheers,
Alexandru-Sergiu Marton


                 reply	other threads:[~2020-11-17 19:52 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y2iz3b79.fsf@posteo.ro \
    --to=brown121407@posteo.ro \
    --cc=help-guix@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).