User forums > Help

Compiler Toolchain Setting seems to be ignored in Version 20.03

(1/7) > >>

BackInTheSandbox:
Hello,
today I installed Code::Blocks version 20.03. I made sure to be able to switch back and forth between this new version and 17.12.
As compiler we use 'GNU GCC Compiler for TriCore v3.4.6'.
When compiling an existing project I get "undefined reference to `cosf'" from a c-file which uses math.h. With Code::Blocks 17.12 the same project compiles fine, although all settings are identical. It took me a while to identify the difference between the two versions. I set the compiler logging to 'Full command line' and compared the outputs of both versions.

One of the last lines is:
From Code::Blocks 17.12:
--- Code: ---tricore-g++.exe -L..\..[...]
--- End code ---
From Code::Blocks 20.03:
--- Code: ---tricore-gcc.exe -L..\..[...]
--- End code ---

Attached a screenshot of the compiler settings, identical in both versions. It seems to me that the 20.03 version ignores the 'Linker for dynamic libs' setting and uses the 'C compiler' as linker. Have I detected a bug, or do I have to change some other setting to get it to work?
TIA,

stahta01:
There is a new setting; but, I have no idea where it is.

I think it has the word "auto" in it.

Tim S.

stahta01:
Read this
http://forums.codeblocks.org/index.php/topic,23491.msg162590.html#msg162590

BackInTheSandbox:

--- Quote from: stahta01 on April 27, 2020, 10:30:10 pm ---http://forums.codeblocks.org/index.php/topic,23491.msg162590.html#msg162590

--- End quote ---

Thanks, that helped. The solution which works for me is:


--- Quote from: manuelS on April 20, 2020, 04:51:15 pm ---I just switched my codeblocks version from 13.12 to 20.03 and I found that some of my old projects don't link anymore.

[...] I found a new option under "Project"->"Build options.."->"Linker Settings" - "Linker executable".

When I change that from "Auto detect" to "Use C++ compiler", the program links fine.

--- End quote ---
Using the setting 'Use linker' instead also works. I guess in that case it refers to the chosen linker in 'Settings' => 'Compiler...' => 'Toolchain executables'

oBFusCATed:
It seems your C compiler (when used for linking) is under-linking, is this a project generated by a template?
Can you reproduce this in a minimal project? Is there some public documentation for this compiler/libc combination?

Navigation

[0] Message Index

[#] Next page

Go to full version