Author Topic: Problem with rc.exe and Visual C++ Toolkit 2003  (Read 10307 times)

Offline skirby

  • Almost regular
  • **
  • Posts: 137
Problem with rc.exe and Visual C++ Toolkit 2003
« on: February 02, 2007, 12:31:26 pm »
Hello,

I have just installed Microsoft Visual C++ Toolkit 2003 and Windows Server 2003 R2 Platform SDK.
Now, I am trying to configure Code::Blocks like it is explain here:
http://wiki.codeblocks.org/index.php?title=Integrating_Microsoft_Visual_Toolkit_2003_with_Code::Blocks_IDE

But I always have the following error message:

-------------- Build: default in Test ---------------
main.cpp
Execution of 'rc.exe /ID:\VCToolkit\include /ID:\PSDK\Include /ID:\VCToolkit\bin /ID:\PSDK\Bin  -fo.objs\rc_dlg.res rc_dlg.rc' in 'D:\Utils\Test' failed.
Nothing to be done.

As you can see I have tested several folder but without success.

Here is what I have in Directories tab:
Compiler tab:
D:\VCToolkit\include
D:\PSDK\Include

Linker tab:
D:\VCToolkit\lib
D:\PSDK\Lib

Resource compiler tab:
D:\VCToolkit\include
D:\PSDK\Include
D:\VCToolkit\bin
D:\PSDK\Bin

In program tab:


and in Additional path:
D:\PSDK


If I use a msdos command like:
D:\PSDK\Bin\rc.exe -fo.objs\kg_dlg.res kg_dlg.rc

It works.

Any idea please?

Thanks and have a nice day.

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2873
Re: Problem with rc.exe and Visual C++ Toolkit 2003
« Reply #1 on: February 02, 2007, 12:43:54 pm »
Hello,

I have just installed Microsoft Visual C++ Toolkit 2003 and Windows Server 2003 R2 Platform SDK.
Now, I am trying to configure Code::Blocks like it is explain here:
http://wiki.codeblocks.org/index.php?title=Integrating_Microsoft_Visual_Toolkit_2003_with_Code::Blocks_IDE

But I always have the following error message:

-------------- Build: default in Test ---------------
main.cpp
Execution of 'rc.exe /ID:\VCToolkit\include /ID:\PSDK\Include /ID:\VCToolkit\bin /ID:\PSDK\Bin  -fo.objs\rc_dlg.res rc_dlg.rc' in 'D:\Utils\Test' failed.
Nothing to be done.

As you can see I have tested several folder but without success.

Here is what I have in Directories tab:
Compiler tab:
D:\VCToolkit\include
D:\PSDK\Include

Linker tab:
D:\VCToolkit\lib
D:\PSDK\Lib

Resource compiler tab:
D:\VCToolkit\include
D:\PSDK\Include
D:\VCToolkit\bin
D:\PSDK\Bin

In program tab:


and in Additional path:
D:\PSDK


If I use a msdos command like:
D:\PSDK\Bin\rc.exe -fo.objs\kg_dlg.res kg_dlg.rc

It works.

Any idea please?

Thanks and have a nice day.


I believe that it's complaining that it can't find rc.exe. It's directory must not be on your program PATH.
Try putting the full path name in the programs tab just like you use it from msdos (just for a test).
« Last Edit: February 02, 2007, 12:46:05 pm by Pecan »

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Problem with rc.exe and Visual C++ Toolkit 2003
« Reply #2 on: February 02, 2007, 01:17:30 pm »
Quote
and in Additional path:
D:\PSDK

This should be D:\PSDK\bin ...
Be patient!
This bug will be fixed soon...

Offline skirby

  • Almost regular
  • **
  • Posts: 137
Re: Problem with rc.exe and Visual C++ Toolkit 2003
« Reply #3 on: February 02, 2007, 04:48:56 pm »
Thanks for your answer.
Adding D:\PSDK\Bin to additional path correct the problem.

Does someone could explain me the following message:


Now, I have another error message:

:: === Test, default ===
LINK:: fatal error LNK1158: cannot run 'cvtres.exe'
:: === Build finished: 1 errors, 0 warnings ===

cvtres.exe does not seems to exists into Windows SDH and Visual Toolkit.
I have this executable on my PC but into masm32\bin folder.

I correct this problem by adding D:\PSDK\Bin\win64 into Additional Path.

Now I have these error messages:
main.obj:: error LNK2019: unresolved external symbol __imp__wsprintfA referenced in function "char * __cdecl Keygen(char *,char *)" (?Keygen@@YAPADPAD0@Z)
main.obj:: error LNK2019: unresolved external symbol __imp__GetDlgItem@8 referenced in function "int __cdecl InitializeApp(struct HWND__ *,unsigned int,long)" (?InitializeApp@@YAHPAUHWND__@@IJ@Z)
main.obj:: error LNK2019: unresolved external symbol __imp__EndDialog@8 referenced in function "int __stdcall DialogFunc(struct HWND__ *,unsigned int,unsigned int,long)" (?DialogFunc@@YGHPAUHWND__@@IIJ@Z)
main.obj:: error LNK2019: unresolved external symbol __imp__MessageBoxA@16 referenced in function "int __stdcall DialogFunc(struct HWND__ *,unsigned int,unsigned int,long)" (?DialogFunc@@YGHPAUHWND__@@IIJ@Z)
main.obj:: error LNK2019: unresolved external symbol __imp__SetWindowTextA@8 referenced in function "int __stdcall DialogFunc(struct HWND__ *,unsigned int,unsigned int,long)" (?DialogFunc@@YGHPAUHWND__@@IIJ@Z)
main.obj:: error LNK2019: unresolved external symbol __imp__GetWindowTextA@12 referenced in function "int __stdcall DialogFunc(struct HWND__ *,unsigned int,unsigned int,long)" (?DialogFunc@@YGHPAUHWND__@@IIJ@Z)
main.obj:: error LNK2019: unresolved external symbol __imp__EnableWindow@8 referenced in function "int __stdcall DialogFunc(struct HWND__ *,unsigned int,unsigned int,long)" (?DialogFunc@@YGHPAUHWND__@@IIJ@Z)
main.obj:: error LNK2019: unresolved external symbol __imp__DialogBoxParamA@20 referenced in function _WinMain@16
Test.exe:: fatal error LNK1120: 8 unresolved externals
:: === Build finished: 9 errors, 0 warnings ===

Is it due to cdecl and stdcall incompatibility?

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: Problem with rc.exe and Visual C++ Toolkit 2003
« Reply #4 on: February 02, 2007, 05:10:55 pm »
cvtres.exe comes with .NET SDK. You have to install .NET SDK for proper operation of VC++ Toolkit 2003.
Be a part of the solution, not a part of the problem.

Offline skirby

  • Almost regular
  • **
  • Posts: 137
Re: Problem with rc.exe and Visual C++ Toolkit 2003
« Reply #5 on: February 02, 2007, 11:33:04 pm »
I have found the solution.
I simply add the library user32.lib in linker options.

Have a nice day.