Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Files Extension (*.cpp) not added automatically by Eclipse IDE when they are created.
Files Extension (*.cpp) not added automatically by Eclipse IDE when they are created. [message #1847937] Sun, 14 November 2021 07:04 Go to next message
AHMED MOKHTAR is currently offline AHMED MOKHTARFriend
Messages: 2
Registered: November 2021
Junior Member
Files Extension (*.cpp) not added automatically by Eclipse IDE when they are created. Source file C++. extension *.cpp. !
Re: Files Extension (*.cpp) not added automatically by Eclipse IDE when they are created. [message #1847939 is a reply to message #1847937] Sun, 14 November 2021 15:13 Go to previous messageGo to next message
David VavraFriend
Messages: 1426
Registered: October 2012
Senior Member
What do you mean by "not added automatically"?

  • To the filename when created using File->New->Source File?
  • To the project when created using File->New->Source File?
  • To the project when created externally?
  • Something else?

Tell us what you've done and what you expected to happen.

Re: Files Extension (*.cpp) not added automatically by Eclipse IDE when they are created. [message #1847978 is a reply to message #1847939] Tue, 16 November 2021 02:15 Go to previous messageGo to next message
AHMED MOKHTAR is currently offline AHMED MOKHTARFriend
Messages: 2
Registered: November 2021
Junior Member
When you create C++ Source file, Eclipse IDE failed to append the right extension which is .cpp for LINUX instead it create a default file which you should manually append the .cpp extention to file so Eclipse can recognized it as a source file C++, depsite all options are set well in the Eclipse editor. I am using the Latest version 2021 of Eclipse IDE.

>After create C++ Project
> New > Source file.
> It create Text file but you have to append .cpp to make it C++ source file

[Updated on: Tue, 16 November 2021 02:20]

Report message to a moderator

Re: Files Extension (*.cpp) not added automatically by Eclipse IDE when they are created. [message #1847979 is a reply to message #1847978] Tue, 16 November 2021 04:48 Go to previous message
David VavraFriend
Messages: 1426
Registered: October 2012
Senior Member
I don't think it ever did.
.cpp isn't the only extent possible there's .cxx and .C for instance.
You can edit the templates but I'm not sure if you can edit the
filename with them.

Update
Other extents: https://stackoverflow.com/a/5171821
CDT Help: http://help.eclipse.org/2021-09/topic/org.eclipse.cdt.doc.user/getting_started/cdt_w_newcpp.htm?cp=10_1_4

The help actually tells you to add .cpp yourself
See the help To create a C++ file: Step (2)

[Updated on: Wed, 17 November 2021 02:32]

Report message to a moderator

Previous Topic:"No Toolchain found for Target Local" error when using Meson Project
Next Topic:Can't connect to remote host using remote debugging settings
Goto Forum:
  


Current Time: Fri Apr 19 18:07:15 GMT 2024

Powered by FUDForum. Page generated in 0.03317 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top