I just had the following problem:
I have file.c and file.cpp in my project. So they have the same name with a different extension. Both gets compiled to file.o so one is overriding the other. Is their an option that distinguish file.c from file.cpp like file.c.o and file.cpp.o(there is one in codeblocks)? I know (and I actually did) renaming solves the problem. But I guess it is major problem when you want to mix c++ and c and it took me several hours to recognize this.
Thanks in advance
- Joshua
✓Mixing C and C++
-
- CodeLite Curious
- Posts: 3
- Joined: Wed Jun 25, 2014 7:11 pm
- Genuine User: Yes
- IDE Question: c++
- Contact:
✓Mixing C and C++
Last edited by JoshuaBehrens on Thu Jun 26, 2014 1:06 pm, edited 1 time in total.
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Mixing C and C++
Which version of codelite are you using?
codelite 6.0 always does that (appends the .o to the file name)
Please provide the information as described here:
http://forums.codelite.org/viewtopic.php?f=3&t=804
Eran
codelite 6.0 always does that (appends the .o to the file name)
Please provide the information as described here:
http://forums.codelite.org/viewtopic.php?f=3&t=804
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Curious
- Posts: 3
- Joined: Wed Jun 25, 2014 7:11 pm
- Genuine User: Yes
- IDE Question: c++
- Contact:
Re: Mixing C and C++
I am using 5.4, nothing selfcompiled. I just used a download package with mingw environment and I am running it on a Windows 7 64bit but I don't target 64bit. Didn't knew there was already a new version.
- Joshua
- Joshua
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Mixing C and C++
IIRC, there is also a flag to enable this functionality for 5.4.
Settings -> build settings -> compilers -> <your compiler> -> Advanced
'Object name same as file name' (or something similar)
Eran
Settings -> build settings -> compilers -> <your compiler> -> Advanced
'Object name same as file name' (or something similar)
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Curious
- Posts: 3
- Joined: Wed Jun 25, 2014 7:11 pm
- Genuine User: Yes
- IDE Question: c++
- Contact:
Re: Mixing C and C++
Aaah. I guess I didn't look right otherwise I would have seen this
- Joshua
- Joshua