News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Bug? Swap header/source -> file does not exist yet

Started by Alturin, May 21, 2007, 09:15:42 PM

Previous topic - Next topic

Alturin

Steps to reproduce:
Create a new C project (not C++).
Create a new header file.
Right click and click "Swap header/source"
When a .c file should be created, instead a .cpp file is made.

This turned out to be a very annoying 'bug' for me to trackdown, because the compiler kept telling me about undefined functions, which I was sure were in the according .c file (which turned out later was a .cpp file!).

Is this an actual bug, or intentional?

Thank you for your time,

Alturin.

Biplab

Quote from: Alturin on May 21, 2007, 09:15:42 PM
Create a new C project (not C++).

Creating a C project doesn't ensure that all the files will be C file. That option is asked to copy the respective sample code during project creation.
Be a part of the solution, not a part of the problem.

Alturin

Is it possible to add an option somewhere in the "Create new file" dialog?
Cos at the moment I have to "rename file", "remove file from project", "add file to project" in order to fix it to it being a proper C file again.

mandrav

Quote from: Alturin on May 22, 2007, 01:50:13 AM
Is it possible to add an option somewhere in the "Create new file" dialog?

Ctrl+Shift+N
Be patient!
This bug will be fixed soon...

Alturin

Quote from: mandrav on May 22, 2007, 08:47:52 AM
Quote from: Alturin on May 22, 2007, 01:50:13 AM
Is it possible to add an option somewhere in the "Create new file" dialog?

Ctrl+Shift+N

I mean the dialog you get after you hit "Swap header / source" -> "Error: The file does not exist. Do you want to create it?" -> Yes -> "Do you want this new file to the active project?" -> Yes -> "Select all" -> Ok.
Somewhere in that chain, there might could be an option "Create as CPP file / Create as C file"?

Biplab

Use File > New > File... and then select C/C++ Source option.
Be a part of the solution, not a part of the problem.