Code::Blocks

User forums => General (but related to Code::Blocks) => Topic started by: FocusedWolf on October 10, 2005, 05:10:52 am

Title: .inl file extension... What are the gcc alternatives?
Post by: FocusedWolf on October 10, 2005, 05:10:52 am
i need a solution that works in vs.net to...

Over there i did what others suggested and used a .inl file format, to hold the implementation of a templated class...where at the bottom of that classes header file i #include the .inl, so the templated class compiles right.

.cpp and .cxx don't work because vs.net, and probably codeblocks to, tries to compile them (if anyone knows some #define trick to make the compiler skip the code at the right time so i can keep the implementation in a .cpp file, please let me know), resulting in a bunch of errors.

.hxx is a potential solution (better then .h implementation in one header file, and declaration in another header file is kinda conussing), that seems to be ok, but i'm just wondering if this is "ok", and not against some cosmic c++ lay about where function implementations should not go?  :lol:
Title: Re: .inl file extension... What are the gcc alternatives?
Post by: mandrav on October 10, 2005, 08:45:41 am
Two options:

1) You can still use .inl. Did you try and faced problems?
2) You can disable the .cpp file from compiling and linking.
Title: Re: .inl file extension... What are the gcc alternatives?
Post by: FocusedWolf on October 10, 2005, 03:24:00 pm
i think my code had other reasons for not compiling, but i just would like .inl to fall under the source folder and not the "others" folder :p
Title: Re: .inl file extension... What are the gcc alternatives?
Post by: mandrav on October 10, 2005, 04:06:23 pm
i think my code had other reasons for not compiling, but i just would like .inl to fall under the source folder and not the "others" folder :p

Golden Tip Of The Day:
Go to "Project->Project tree->Edit file types & categories" and add "*.inl;*.INL" (without quotes) in the sources mask ;)
Title: Re: .inl file extension... What are the gcc alternatives?
Post by: FocusedWolf on October 10, 2005, 06:03:12 pm
Thx that worked out :P