Author Topic: [Resolved] VC Resource Compiler Issue  (Read 4296 times)

Offline Frank_CB

  • Almost regular
  • **
  • Posts: 148
[Resolved] VC Resource Compiler Issue
« on: October 21, 2018, 07:46:29 pm »
Hello,

I'm using the most current release of CB 12.17, compiled from SVN source, on a desktop platform, using Windows 10 Home.

Using the newest release of Visual C++, from Microsoft, to provide the 64-bit compiler (cl.exe). resource compiler (rc.exe), linker (link.exe) and make (nmake.exe) executables, I can successfully generate Windows console-, gui-, mfc-, and wxWidgets-based applications outside of CB's IDE

However, only after copying rc.exe and rcdll.dll into an application's source folder, can I successfully generate the same applications within the IDE. CB's project files (.cbp) show a reference to 'windres', which is the resource compiler.from TDM-GCC-64's suite of executables. I found no referance to 'windres' in default.conf.

My work-around works, but it would be nice if I didn't have to resort to using it when I wanted to create a 64-bit application that includes resources.  Better yet, can someone explain why the work-around works?  It's almost like CB's looking for the resource compiler in the application's source folder and not where the toolchain says it's suppose to be.  Currently, rc.exe and rcdll.dll reside in a different folder than cl.exe, link.exe and nmake.exe.  That information is provided to the toolchain.

Regards,

Frank

P.S.  A .cbp file from a successfully built and executed wxWidgets sample is attached.





« Last Edit: October 27, 2018, 06:06:00 pm by Frank_CB »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: VC Resource Compiler Issue
« Reply #1 on: October 22, 2018, 06:54:51 pm »
What are you toolchain settings?
Can you post a log from a rebuild?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline sodev

  • Regular
  • ***
  • Posts: 497
Re: VC Resource Compiler Issue
« Reply #2 on: October 22, 2018, 06:58:37 pm »
Yes, rc.exe is part of the Windows SDK and the other files are part of the MSVC Toolchain, both reside in different locations. I add the other paths on the Additional Paths page of the Toolchain executables tab. Just for reference, with my MSVC 14 (Visual Studio 2015) Toolchain and the Windows XP Toolkit i use the following paths:
  • Compiler's installation directory: C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC
  • Additional Paths:
    • C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE
    • C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\bin

Your paths will be for sure different, escpecially if you use MSVC 14.1 (Visual Studio 2017) and the Non-Windows-XP-Toolkit in 64 Bit mode, but this should give you the idea.

A small addition after looking at your project file, i cannot recommend to put all this system specific paths of the compiler into the project file, it makes it too machine dependent, better put all these paths into the global compiler configuration. Take my old description as a reference http://forums.codeblocks.org/index.php/topic,22009.msg149847.html#msg149847.
« Last Edit: October 22, 2018, 07:07:52 pm by sodev »

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: VC Resource Compiler Issue
« Reply #3 on: October 22, 2018, 11:57:32 pm »
Can you open a ticket for this, so we can fix the msvc compiler search plugin?
Add the link to this forum post please

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: VC Resource Compiler Issue
« Reply #4 on: October 23, 2018, 12:59:04 am »
Before a ticket, I think first we need to know if this is really a bug in the compiler.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline sodev

  • Regular
  • ***
  • Posts: 497
Re: VC Resource Compiler Issue
« Reply #5 on: October 23, 2018, 01:42:12 am »
CodeBlocks support of MSVC is stuck at Visual Studio 2010 ;D, so nothing is broken, it just doesnt know the newer versions. Also the way how MSVC handles 32 Bit and 64 Bit does not really fit into the GCC-style approach CodeBlocks uses, not to mention the different SDK versions and flavours.

Is this what you mean with bug in the compiler?

Offline Frank_CB

  • Almost regular
  • **
  • Posts: 148
Re: VC Resource Compiler Issue
« Reply #6 on: October 23, 2018, 03:31:41 am »
Hello,

@oBFusCATed
The rebuild log is attached.  The Toolchain info follows:

Visual C++ 64-bit Compiler Toolchain
========================
  Compiler installation directory:
    C:\Progam Files (x86)\Microsoft Visual Studio\2017\Buildtools\VC\Tools\MSVC\14.15.26726.0\bin\Host64\x64

Progam files -
  C+ Compiler:  cl.exe
    C:\Progam Files (x86)\Microsoft Visual Studio\2017\Buildtools\VC\Tools\MSVC\14.15.26726.0\bin\Host64\x64
  C++ Compiler:  cl.exe
    C:\Progam Files (x86)\Microsoft Visual Studio\2017\Buildtools\VC\Tools\MSVC\14.15.26726.0\bin\Host64\x64
  Linker for dynamic libs:  link.exe
    C:\Progam Files (x86)\Microsoft Visual Studio\2017\Buildtools\VC\Tools\MSVC\14.15.26726.0\bin\Host64\x64
  Linker for static libs:  link.exe
    C:\Progam Files (x86)\Microsoft Visual Studio\2017\Buildtools\VC\Tools\MSVC\14.15.26726.0\bin\Host64\x64
  Debugger:  gdb.exe  <-- installed as Debugger GBD64
    C:\TDM-GCC-64\gdb64\bin
  Resource Compiler:  rc.exe
    C:\Progam Files (x86)\Window Kits\10\bin\10.0.17134.0\x64
  Make program:  nmake.exe
    C:\Progam Files (x86)\Microsoft Visual Studio\2017\Buildtools\VC\Tools\MSVC\14.15.26726.0\bin\Host64\x64

Additional Paths -
    C:\Progam Files (x86)\Microsoft Visual Studio\2017\Buildtools\VC\Tools\MSVC\14.15.26726.0\bin\Host64\x64
    C:\Progam Files (x86)\Window Kits\10\bin\10.0.17134.0\x64

@sodev
Thank you for the suggestions and link. I removed the rc.exe and rcdll.dll from the project's source directory.  Rebuild then failed because of the lack of rc.exe. Then, I added the paths shown above  The project was then rebuilt successfully.  The problem appears to be with CB.

The additional paths were only added after the rebuild failed.

Regards,

Frank



« Last Edit: October 23, 2018, 03:39:34 am by Frank_CB »

Offline Frank_CB

  • Almost regular
  • **
  • Posts: 148
Re: VC Resource Compiler Issue
« Reply #7 on: October 23, 2018, 03:53:03 am »
@BlueHazzard
Microsoft Visual C++ (MSVC) Compiler, Resource Compiler and Linker all appear to function properly.  CB's IDE has the issue.  I'm at a loss on how to open a ticket referencing this issue. I'll hold off doing that for now!

Regards,

Frank

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: VC Resource Compiler Issue
« Reply #8 on: October 23, 2018, 10:31:01 am »
I don't understand anything from the info you've posted. Please post a screenshot of your toolchain settings?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Frank_CB

  • Almost regular
  • **
  • Posts: 148
Re: VC Resource Compiler Issue
« Reply #9 on: October 23, 2018, 08:16:20 pm »
@oBFusCATed
Sorry if I caused you any confusion?!  Screenshots attached.  Hope they help?

Regards,

Frank

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: VC Resource Compiler Issue
« Reply #10 on: October 23, 2018, 11:10:05 pm »
Are you able to build correctly now?
Is there still a problem? If there is what is it?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Frank_CB

  • Almost regular
  • **
  • Posts: 148
Re: VC Resource Compiler Issue
« Reply #11 on: October 24, 2018, 01:42:22 am »
@oBFusCATed
As long as I leave the directories defined in Additional Paths everything works fine!
If I remove them, the Resource Compiler fails again!

Regards,

Frank

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: VC Resource Compiler Issue
« Reply #12 on: October 24, 2018, 01:44:51 am »
Is there anything we need to fix?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Frank_CB

  • Almost regular
  • **
  • Posts: 148
Re: VC Resource Compiler Issue
« Reply #13 on: October 24, 2018, 05:29:09 pm »
@oBFusCATed

Please review reply #2.  I believe sodev's comment puts everything in the correct perspective.

It would be nice if CB's IDE would use the toolchain's entry for the Resource Compiler rather than needing the path for it to be added to Additional Paths also?! Other than that, nothing needs to be fixed?!

My work-a-rounds work for me.  I'll just need to create a reminder when including resources in a project.

Regards,

Frank