Hi guys,
I'm new to Codelite and new to Linux.
I installed Codelite 8.0 on Linux Mint 17.1. Before I had installed g++ compiler but I couldn't write code without an IDE that's how I stumbled over Codelite. But after installing, it didn't find the g++ compiler only gcc and some c compilers were found. I added a compiler manually from the settings in Codelite and it kinda works except when I add new classes to a project the member functions of those classes are not recognized despite including the class headerfiles. Classes are in new files. I add them from the right click menu of Codelite i.e. right-click on the project > add new class.
Another thing, when I include the header files of some class it gives an option to autocomplete so it seems that the class name is found (recognized) by Codelite.
There's always the same error: " 'some_function' was not declared in this scope ".
Any help would be appreciated. Thank you.
Classes are not recognized!
-
- CodeLite Curious
- Posts: 2
- Joined: Sun Jun 07, 2015 7:34 pm
- Genuine User: Yes
- IDE Question: c++
- Contact:
-
- CodeLite Plugin
- Posts: 819
- Joined: Wed Sep 03, 2008 7:26 pm
- Contact:
Re: Classes are not recognized!
Hi,
''some_function' was not declared in this scope' usually means that you haven't #included the correct header, or not in the correct place. Could you paste or attach a minimal compilable sample that demonstrates this, and the error message that you get?
Regards,
David
That's surprising. Did you (do you) definitely have the 'g++' package installed, rather than just the 'gcc' one?But after installing, it didn't find the g++ compiler
Which one?I added a compiler manually from the settings in Codelite
''some_function' was not declared in this scope' usually means that you haven't #included the correct header, or not in the correct place. Could you paste or attach a minimal compilable sample that demonstrates this, and the error message that you get?
Regards,
David
-
- CodeLite Curious
- Posts: 2
- Joined: Sun Jun 07, 2015 7:34 pm
- Genuine User: Yes
- IDE Question: c++
- Contact:
Re: Classes are not recognized!
Yes, I do. I compiled C++ before installing Codelite. Like I said somehow even Codelite works. As long as I didn't do anything outside main.cpp it works fine. Except sometimes it doesn't offer to autocomplete.Did you (do you) definitely have the 'g++' package installed, rather than just the 'gcc' one?
Well, the g++ I guess. I'm pretty new to linux like I mentioned before. On windows I used visual studio and didn't have to deal with such issues as manually installing compilers or anything.I added a compiler manually from the settings in Codelite
Which one?
What I did is this: on codelite --> settings>Build settings>add compiler>add an existing compiler ... and then as the path I gave the whole /users/bin directory. After I did this it started working, save the Classes issue in separate files.
I'll see a little bit later and post some code because I'm working on something at the moment.
Thank You for your time.