Author Topic: CLANG and wxWidgets rc compiler error  (Read 1014 times)

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7271
    • My Best Post
CLANG and wxWidgets rc compiler error
« on: April 17, 2022, 07:01:12 pm »
I was getting a weird build error in CB and I fixed it by adding the following to other resource compiler options

Code
--define wxUSE_NO_MANIFEST

These was the lines directly related to the error
Code
llvm-rc: Error in 24 statement (ID 1): 
Is a directory

Edit: I am guessing not having an manifest will lead to an issue in the future.
Edit2: The problem was with wxWidgets 3.1.5.1
Edit3: And, the project was including "wx\msw\wx.rc"
Edit4: I am guessing clang resource compiler does not support "RT_MANIFEST" which is in "wx\msw\wx.rc".

Tim S.
« Last Edit: April 17, 2022, 07:40:13 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3194
Re: CLANG and wxWidgets rc compiler error
« Reply #1 on: April 17, 2022, 09:06:37 pm »
So this means we have a resource file and clang does not support it?

How are your compile times with clang vs gcc?

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7271
    • My Best Post
Re: CLANG and wxWidgets rc compiler error
« Reply #2 on: April 17, 2022, 09:21:05 pm »
So this means we have a resource file and clang does not support it?

How are your compile times with clang vs gcc?

It means wxWidgets has a resource file and clang does not yet support it under Windows. Note, I read the clang source file that implies clang supports it; but, it is not working for me.

I have no idea; I have not compared them. I just compiled the wx minimal sample to confirm the problem was in clang/wxWidgets instead of in KiCAD/cmake application/build tool I was working on upgrading to a slightly newer version (5.1.12).

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7271
    • My Best Post
Re: CLANG and wxWidgets rc compiler error
« Reply #3 on: April 18, 2022, 06:30:59 pm »
Link to another person who got the error in the past year or so.

https://forums.codeblocks.org/index.php/topic,24506.msg167166.html#msg167166

Edit: It appears the macro magic in wxWidgets setting wxMANIFEST_FILE is not working.

Tim S.

« Last Edit: April 19, 2022, 09:50:12 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline PB

  • Multiple posting newcomer
  • *
  • Posts: 31
Re: CLANG and wxWidgets rc compiler error
« Reply #4 on: April 18, 2022, 10:09:16 pm »
Link to another person who got the error in the past year or so.
https://forums.codeblocks.org/index.php/topic,24506.msg167166.html#msg167166

FWIW, in wxWidgets main readme, in section on supported compilers, there is "Clang under macOS and Linux", so Windows is purposely excluded.

I think I mentioned this issue to vadz. Unfortunately, I do not remember what his response was and cannot find it now.