Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
LLVM Clang 10 no longer supports -Wl,--dll
gh_origin:
I tried to compile a DLL. The compiler produced many object files but failed to link them because it said it doesn't understand the option --dll. I edit the options_clang.xml and remove -Wl,--dll from the value of LinkDynamic so it's basically like this:
<Command name="LinkDynamic"
value="$linker -shared -Wl,--output-def=$def_output -Wl,--out-implib=$static_output $libdirs $link_objects $link_resobjects -o $exe_output $link_options libs"/>
After that it could link the object files and produce a DLL.
oBFusCATed:
There is a way to check the version of the compiler and make this conditional. After that post a patch and we might include it. :)
gh_origin:
--- Quote from: oBFusCATed on December 02, 2020, 08:56:01 pm ---There is a way to check the version of the compiler and make this conditional. After that post a patch and we might include it. :)
--- End quote ---
How to write conditional in XML? The fastest hack I could think of is creating another XMLs for newer Clang, e.g: compiler_clang_old.xml, options_clang_old.xml (still have -Wl,--dll), compiler_clang_new.xml, options_clang_new.xml (no longer have -Wl,--dll). The checking for compiler version part just let the users do it by manually select their compiler (clang_old or clang_new).
Miguel Gimenez:
You can use my patch for GCC in ticket 1006 (https://sourceforge.net/p/codeblocks/tickets/1006/) as a reference.
gh_origin:
--- Quote from: Miguel Gimenez on December 03, 2020, 09:13:11 am ---You can use my patch for GCC in ticket 1006 (https://sourceforge.net/p/codeblocks/tickets/1006/) as a reference.
--- End quote ---
I will try if I could do it after I cleared my confusion between the Dynamic Link Library project type and Shared Library project type. You could see my thread asked about that.
Navigation
[0] Message Index
[#] Next page
Go to full version