Page 1 of 1

Classes are not recognized!

Posted: Sun Jun 07, 2015 7:46 pm
by hackYou
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.

Re: Classes are not recognized!

Posted: Sun Jun 07, 2015 9:00 pm
by DavidGH
Hi,
But after installing, it didn't find the g++ compiler
That's surprising. Did you (do you) definitely have the 'g++' package installed, rather than just the 'gcc' one?
I added a compiler manually from the settings in Codelite
Which one?

''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

Re: Classes are not recognized!

Posted: Sun Jun 07, 2015 9:36 pm
by hackYou
Did you (do you) definitely have the 'g++' package installed, rather than just the 'gcc' one?
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.
I added a compiler manually from the settings in Codelite


Which 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.

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.