Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

Bug: Advanced compiler options resets certain values after quitting

<< < (2/2)

Miguel Gimenez:
If CB is installed under Program Files in Windows (the default location) then the OS blocks any modification of files in CB's folder or below.

You can try running CB as an administrator, change the setting and rerun as normal user, or follow Obfuscated's advice about editing the file options_clang.xml (also as an administrator)

oBFusCATed:
@Miguels: If cb fails because it cannot override files in program files then this is a bug. The changes to the compiler settings are either saved in the config file or in the share folder in the config folder. But I think that running as administrator won't help much.

Mad David:
Sorry for the late response.
I am using Code::Blocks 17.12, LLVM 6.0.0-Win64.
Both are installed into sub-folders of E:\Compilers, because I hate installing things to my C-drive and avoid it when possible.
BlueHazzard:  I was not aware that "Save Everything" was necessary to save global compiler settings, but it doesn't help anyway.
stahta01:  Putting " " in the Link Library slot causes it to put quotes around the full file name and search for " kernel32.lib", etc., which it can't find.

Following oBFusCATed's suggestion, I tracked down "default.conf" in "\AppData\Roaming\CodeBlocks".
When the Link Library: value is set to -something, there's a few lines in the compiler's <switches> set:
               <LINK>
                  <str>
                     <![CDATA[-something]]>
                  </str>
               </LINK>
When the Link Library: value is absent, the <LINK>...</LINK> lines do not exist.

If I paste in
               <LINK>
                  <str>
                     <![CDATA[]]>
                  </str>
               </LINK>
The linking "works" (Inasmuch as I'm still working out how to get CLang/LLVM to compile and link, but that's not a Code::Blocks problem.)
When I quit, however, it rewrites the default.conf file to remove the <LINK>...</LINK> lines and I get the error on the next run.

So:
A resolution for this bug would be fore Code::Blocks to include the empty switches in the default.conf as above.

oBFusCATed:
What are you toolchain settings? Can you post a screen shot?
At least on linux clang++ or clang is used for linking.
Using the linker directly is possible but it is harder and requires knowledge about the flags.

Navigation

[0] Message Index

[*] Previous page

Go to full version