User forums > General (but related to Code::Blocks)

TPP file type and codeblocks application closing error.

<< < (3/3)

stahta01:

--- Quote from: 12345 on November 13, 2015, 03:47:03 pm ---I said that separating implementation and declaration causes many compiler errors. I also said that these problems could be solved putting implementation in a tpp file. But I only heard that. When I tried to do this I wasn't able to compile these files. And I am still, I did what you said, but codeblocks still can't compile them. I also said that when I close an application, sometimes codeblocks thinks it's still running and so doesn't let me compile anything. Also abort button doesn't work in this case.

--- End quote ---

Did you check to make sure your program is NOT still running?
On Windows, you can use the task manager to check this out.

Edit: For the tpp file issue; I suggest posting on a site that supports your compiler before any more time and effort is wasted on the idea on this site. Code::Blocks is NOT a compiler in case you did NOT know that.

Edit2: If I recall correctly, normally the tpp file is just included by the hpp file and the compiler or IDE does NOT have to anything special to use the tpp file.

Tim S.

oBFusCATed:
One easy way to see if the tpp issue is a cb problem or not is to rename the file to *.cpp and see if it solves your problem.
But if you're putting implementations of templates in this file then it won't solve the problem.

scarphin:

--- Quote from: 12345 on November 13, 2015, 03:47:03 pm ---I said that separating implementation and declaration causes many compiler errors. I also said that these problems could be solved putting implementation in a tpp file. But I only heard that. When I tried to do this I wasn't able to compile these files. And I am still, I did what you said, but codeblocks still can't compile them. I also said that when I close an application, sometimes codeblocks thinks it's still running and so doesn't let me compile anything. Also abort button doesn't work in this case.

--- End quote ---
Ok, I understand that you are trying to separate your declaration and implementation of your template. First of all this is a very bad programming practice unless you have a very good reason (and/or obligation) to do so. Second and more important, renaming your file's extension to .tpp will make absolutely no difference in terms of compiler (at least for gcc). So take obfuscated's advice and rename your .tpp files to .cpp and try building your project/template. If it does not build, I can assure you that it still won't with the same compiler options/switches even if cb compiled them automatically.

12345:
I understand. I'll put implementation in hpp file. In the first post I dealt with a codeblocks error. I find out when it occurs. If you want, you can try yourself. You run a console application, then you click on abort button to close cb_console_runner. The application will be closed, but codeblocks still thinks it's running. I used task manager and the application is still running in background. Is possible modify codeblocks source and so avoid it?

Navigation

[0] Message Index

[*] Previous page

Go to full version