back to C++ - namespace Question -

CodeLite installation/troubleshooting forum
glenenglish
CodeLite Enthusiast
Posts: 19
Joined: Sun Mar 30, 2014 11:59 am
Genuine User: Yes
IDE Question: C++
Contact:

back to C++ - namespace Question -

Post by glenenglish »

HI
I wrote alot of c++ in Codelite in 2016-2017, Have not written any c++ than a page since. written plenty of C.
But back to it in spades....

I humberly ask for a little namespace advice, as it seems some thing have changed since I last wrote any c++ -- this is not codelite specific (although it is what I use)

Previous I used GCC V4.7.2. I used Cstd11 ( -c++11) and codelite 9.0
I rebuilt a machine a year ago and now I have GCC10.2.1, codelite 15.0

The compiler complains that my class names etc can't be found, and maybe did I mean std: Cmyclass ?
and of course if I preface the reference to Cmyclass with std:: it find it.
It is like I have prefaced some of the code with using namespace std and it applies to everything..
I dont have using namespace std in my code.... (that I can find).
The compiler is now complaining <stddef.h> can't be found for pthreads.h
Did something change with C++ and treatment of namespaces / default namespaces ?
do I need to apply namespaces for all my source files ?

comments and advice happily accepted !
with thanks,
Glen.

glenenglish
CodeLite Enthusiast
Posts: 19
Joined: Sun Mar 30, 2014 11:59 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: back to C++ - namespace Question -

Post by glenenglish »

Update.

unsure about the namespaces still.

I think in the course of installing various things, I have corrupted the build-essential install. IE missing header files etc.

generating a new VM for Debian 11 and I will start from scratch.
of course previous projects are all 32 bit, this is a 64 bit world in this new image , although the code should all be pretty 32/64 int compatible. no long/int pointer confusion.
glen

glenenglish
CodeLite Enthusiast
Posts: 19
Joined: Sun Mar 30, 2014 11:59 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: back to C++ - namespace Question -

Post by glenenglish »

started with fresh linux VM..... all is fine.
corrupted install / corrupted probably something I loaded. installed in dev tools.

User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: back to C++ - namespace Question -

Post by eranif »

No, you don't need to apply namespaces, you can still write C++ as you did back in 2016-2017...

Make sure you have read the HOW TO POST thread
Post Reply