unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* Emacs, ccls, LSP and C++
@ 2020-11-17 21:50 Alexandru-Sergiu Marton
  0 siblings, 0 replies; only message in thread
From: Alexandru-Sergiu Marton @ 2020-11-17 21:50 UTC (permalink / raw)
  To: help-guix

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-11-17 19:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-17 21:50 Emacs, ccls, LSP and C++ Alexandru-Sergiu Marton

unofficial mirror of help-guix@gnu.org 

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://yhetil.org/guix-user/0 guix-user/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 guix-user guix-user/ https://yhetil.org/guix-user \
		help-guix@gnu.org
	public-inbox-index guix-user

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.gnu.guix.user
	nntp://news.gmane.io/gmane.comp.gnu.guix.user


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git