The directory name is no longer included in .o files #1410

Closed
Lyberta opened this Issue Sep 10, 2016 · 12 comments

Projects

None yet

2 participants

@Lyberta
Lyberta commented Sep 10, 2016

Previous versions of CodeLite had directory names added to .o files while latest version doesn't. I have foo.cpp and bar/foo.cpp and they both get compiled to foo.cpp.o which, of course, breaks everything.

@eranif
Owner
eranif commented Sep 11, 2016

Not a bug, a settings option.
Settings->Build Settings->Compilers->Your Compiler Name->Advanced
and uncheck the option: Object name is same as the file name

@eranif eranif closed this Sep 11, 2016
@Lyberta
Lyberta commented Sep 11, 2016

I've just checked and it is unticked. Please reopen.

@eranif
Owner
eranif commented Sep 11, 2016

I retested this and it works...
please provide more information

@eranif
Owner
eranif commented Sep 11, 2016 edited

try deleting ~/.codelite folder and try it again

@Lyberta
Lyberta commented Sep 11, 2016 edited

Tried it and still occuring, here's a part of my .project file:

<VirtualDirectory Name="src">
<VirtualDirectory Name="ALSA">
  <File Name="../../Src/ALSA/OutputDevice.cpp"/>
</VirtualDirectory>
<File Name="../../Src/OutputDevice.cpp"/>
</VirtualDirectory>

Previously I had Src_ALSA_OutputDevice.cpp.o and Src_OutputDevice.cpp.o now both of them are OutputDevice.cpp.o

@eranif
Owner
eranif commented Sep 11, 2016 edited

I will need a reproduction workspace to be able to look into this further.
I can't make it happen on Windows nor Linux.

@Lyberta
Lyberta commented Sep 11, 2016

Here's the full project: https://gitlab.com/ftz/midi
I will try to make a small test case.

@eranif
Owner
eranif commented Sep 11, 2016 edited

BTW, I see that you use CMake - you can enable this from CodeLite to use CMake as well...
Project Settings->General->Makefile Generator->CMake

For more info: http://codelite.org/LiteEditor/TheCMakePlugin

@Lyberta
Lyberta commented Sep 11, 2016

Well, I've made a hello world project but for some reason can't upload it on GitHub, this happens for other files too.

@eranif
Owner
eranif commented Sep 11, 2016

Can you send it to me directly? (my email can be found on my profile)

@Lyberta
Lyberta commented Sep 11, 2016

Done.

@eranif eranif pushed a commit that referenced this issue Sep 12, 2016
Eran Ifrah Fixed: #1410
    The directory name is no longer included in .o files
Updated version to 9.2.3
b451333
@eranif
Owner
eranif commented Sep 12, 2016

I fixed the object prefix generation function.
It did not work due to your unique workspace layout... the fix should handle this now (and any other layout in the future)

/bin/sh -c '/usr/bin/make -j4 -e -f  Makefile'
----------Building project:[ Test - Debug ]----------
make[1]: Entering directory '/home/eran/Downloads/test/IDE/CodeLite'
codelite-cc g++  -c  "/home/eran/Downloads/test/Src/Test/Main.cpp" -g -O0 -std=c++14 -Wall  -o ./Debug/up_up_Src_Test_Main.cpp.o -I. -I.
codelite-cc g++  -c  "/home/eran/Downloads/test/Src/Main.cpp" -g -O0 -std=c++14 -Wall  -o ./Debug/up_up_Src_Main.cpp.o -I. -I.
/usr/bin/g++ -o ./Debug/Test @"Test.txt" -L.
make[1]: Leaving directory '/home/eran/Downloads/test/IDE/CodeLite'
====0 errors, 0 warnings====
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment