User forums > General (but related to Code::Blocks)
Bug? Swap header/source -> file does not exist yet
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++).
--- End quote ---
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.
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?
--- End quote ---
Ctrl+Shift+N
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?
--- End quote ---
Ctrl+Shift+N
--- End quote ---
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"?
Navigation
[0] Message Index
[#] Next page
Go to full version