Author Topic: How to change the project configuration profile for single file projects  (Read 1986 times)

rjpontefract

  • Senior Community Member
  • Posts: 250
  • Hero Points: 10
Hi

When creating a new C++ file without a project open, it is created as a single file project using the default profile.  Is it possible to change the profile for a single file project after it has been created?  I can edit the project properties manually but I can't find a way to choose a different profile.

Cheers
Rick

Dennis

  • Senior Community Member
  • Posts: 3960
  • Hero Points: 517
Re: How to change the project configuration profile for single file projects
« Reply #1 on: October 03, 2018, 06:03:23 PM »
Document > C/C++ Options > Single File Projects

rjpontefract

  • Senior Community Member
  • Posts: 250
  • Hero Points: 10
Re: How to change the project configuration profile for single file projects
« Reply #2 on: October 03, 2018, 08:15:27 PM »
Thanks for your reply.  I've played around with the settings and I'm still not sure how it's supposed to work.

I have 3 single file C++ test files, one of which was created when clang++ was the default profile for single file projects, one that was created when GNU C++ was the default and one when GNU C++ 8 was the default.

The clang++ file always compiles with clang++ no matter what I set the default to in the settings dialog, whereas the other two files compile with the current default compiler as set in that dialog.

How is this supposed to work?  Should all single C++ files compile with whatever I have set as the default?  Or should they compile with the default as it was when then they were created?  Why does changing the default compiler only affect some files and how would I change it for the file that always compiles with clang++?

Cheers
Rick

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6862
  • Hero Points: 528
Re: How to change the project configuration profile for single file projects
« Reply #3 on: October 04, 2018, 02:23:50 PM »
If you never modify the properties in your single file project, then changing the single file project default should change other single file projects too. Once you change the properties (I think setting a breakpoint counts), then that single file project is left alone. It would be nice if there was a GUI so you can easily delete single file projects. Right now, it's a bit hacky to do it yourself. They are stored in user.cfg.xml. When you edit it, make sure you haven't opened any single file projects (they are cached). Single file projects are opened as soon as you edit a C++ file.

Code: [Select]
<language.fileprojects n="language.c.fileprojects" version="1">

rjpontefract

  • Senior Community Member
  • Posts: 250
  • Hero Points: 10
Re: How to change the project configuration profile for single file projects
« Reply #4 on: October 04, 2018, 08:05:44 PM »
Thanks for clearing that up, it's appreciated.

I agree that a GUI for managing single file projects would be nice as I use them a lot for writing small test programs.