hi everyone, I've spent some days looking in google and forums about this fact and I can't find anything, if you can help me I'll thank you so much
well, I'm using Dev C++ 4.9.9.2 and I'm learning to program for windows environment. currently I have this problem with my .rc file, I'm trying to make a dialog window using this code in my resource.rc file
IDD_ABOUT DIALOG DISCARDABLE 0, 0, 239, 66
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
FONT 8, "Eras Demi ITC"
BEGIN
DEFPUSHBUTTON "&OK", IDOK, 174, 18, 50, 14
PUSHBUTTON "&CANCEL", IDCANCEL, 174, 35, 50, 14
GROUPBOX "About...", IDC_STATIC, 7, 7, 225, 52
CTEXT "An example program showing how to use Dialog Boxes\r\n\r\nby Allen", IDC_STATIC, 16, 18, 144, 33
END
the compiler messages are the following
4 C:\Users\PC PLANETA\Documents\win32\little_private.rc In file included from little_private.rc
1:22 C:\Users\PC PLANETA\Documents\win32\resource.rc no include path in which to search for winresrc.h
22 C:\Users\PC PLANETA\Documents\win32\resource.rc [Resource error] syntax error
C:\Users\PC PLANETA\Documents\win32\Makefile.win [Build Error][little_private.res] Error 1
In file included from little_private.rc:4:
resource.rc:1:22: no include path in which to search for winresrc.h
windres.exe: resource.rc:22: syntax error
make.exe: *** [little_private.res] Error 1
Execution terminated
well, I don't understand pretty much the compile log, but of the compile error I may say that the syntax error are referred to the words DS_MODALFRAME, WS_CAPTION, etc.. which are supposed to be included in the winresrc.h file
what I don't understand is WHY this file (winresrc.h) can't be included in the resource.rc file, and it's the same if I try to include windows.h or whichever header in the include directory. of course if I include this headers on a .cpp file, they make no problem, only if I include them on .rc files
would this have anything to do with the fact that I'm using Windows Vista??
hope you can help me, thank you so much for reading me!!!
allen
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm sorry I didn't understand what log you were talking about.. I also changed the directory to avoid having a spaced named directory.. thanks for your help
Compiler: Default compiler
Building Makefile: "D:\win32\Makefile.win"
Executing make clean
rm -f little.o little_private.res little.exe
The compile log includes the "compiler messages" (which is merely a filtered form of the log), so there is no need to post both.
It would be helpful perhaps if you posted a log from a "build all". Because this is an incremental build, there is no information regarding the successful compilation of the code. This is necessary because this information also tells how the project is set up.
There is an issue with Dev-C++ and parts of teh GNU toolchain regarding spaces in file paths, so "PC PLANETA" is an ill-advised location for your project.
I am not sure where windres options are set in Dev-C++ (I no longer bother to install it), but windres itself takes options to define search paths, just like the compiler (http://sourceware.org/binutils/docs-2.19/binutils/windres.html#windres). So you should have some -I<path> options there, but I would have thought that they would be 'inherited' from the compiler options.
Clifford
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
thank you for you answer cpns, but I didn't understand a thing in the windres link, and I can't find the resources options in the Dev C++ .. I spent days looking for them
well, I made work this thing by copying all the neccesary .h files to a sub-directory in my source directory, and modifying the "include" lines in them, for example in the file winresrc.h
include "winnt.h" .. (instead of #include <winnt.h>, with the file winnt.h in the same directory)
any suggestions?? thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I already made some, but you chose not to do it. You did not provide a log from a "build-all". That information was intended to allow me to make further suggestions based on evidence rather than guess work.
While your solution may work, it is not a good solution, and is unnecessary, you have simply worked around the problem in a cumbersome and difficult to maintain manner. You'd be better off solving the actual problem.
Posting the requested information before going your own way would be helpful. As it is, in the analysis we may have to take into account the changes you have made since the information was requested, which may be difficult - it is now a moving target, unless you take the trouble to undo your 'fix'.
Clifford
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
hi everyone, I've spent some days looking in google and forums about this fact and I can't find anything, if you can help me I'll thank you so much
well, I'm using Dev C++ 4.9.9.2 and I'm learning to program for windows environment. currently I have this problem with my .rc file, I'm trying to make a dialog window using this code in my resource.rc file
IDD_ABOUT DIALOG DISCARDABLE 0, 0, 239, 66
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
FONT 8, "Eras Demi ITC"
BEGIN
DEFPUSHBUTTON "&OK", IDOK, 174, 18, 50, 14
PUSHBUTTON "&CANCEL", IDCANCEL, 174, 35, 50, 14
GROUPBOX "About...", IDC_STATIC, 7, 7, 225, 52
CTEXT "An example program showing how to use Dialog Boxes\r\n\r\nby Allen", IDC_STATIC, 16, 18, 144, 33
END
the compiler messages are the following
4 C:\Users\PC PLANETA\Documents\win32\little_private.rc In file included from little_private.rc
1:22 C:\Users\PC PLANETA\Documents\win32\resource.rc no include path in which to search for winresrc.h
22 C:\Users\PC PLANETA\Documents\win32\resource.rc [Resource error] syntax error
C:\Users\PC PLANETA\Documents\win32\Makefile.win [Build Error] [little_private.res] Error 1
and the compile log is this
Compiler: Default compiler
Building Makefile: "C:\Users\PC PLANETA\Documents\win32\Makefile.win"
Executing make...
make.exe -f "C:\Users\PC PLANETA\Documents\win32\Makefile.win" all
windres.exe -i little_private.rc --input-format=rc -o little_private.res -O coff
In file included from little_private.rc:4:
resource.rc:1:22: no include path in which to search for winresrc.h
windres.exe: resource.rc:22: syntax error
make.exe: *** [little_private.res] Error 1
Execution terminated
well, I don't understand pretty much the compile log, but of the compile error I may say that the syntax error are referred to the words DS_MODALFRAME, WS_CAPTION, etc.. which are supposed to be included in the winresrc.h file
what I don't understand is WHY this file (winresrc.h) can't be included in the resource.rc file, and it's the same if I try to include windows.h or whichever header in the include directory. of course if I include this headers on a .cpp file, they make no problem, only if I include them on .rc files
would this have anything to do with the fact that I'm using Windows Vista??
hope you can help me, thank you so much for reading me!!!
allen
I'm sorry I didn't understand what log you were talking about.. I also changed the directory to avoid having a spaced named directory.. thanks for your help
Compiler: Default compiler
Building Makefile: "D:\win32\Makefile.win"
Executing make clean
rm -f little.o little_private.res little.exe
g++.exe -c little.cpp -o little.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2" -I"C:/Dev-Cpp/include" -I"C:/Dev-Cpp/include"
windres.exe -i little_private.rc --input-format=rc -o little_private.res -O coff
In file included from little_private.rc:4:
resource.rc:1:22: no include path in which to search for winresrc.h
windres.exe: resource.rc:27: syntax error
make.exe: *** [little_private.res] Error 1
Execution terminated
The compile log includes the "compiler messages" (which is merely a filtered form of the log), so there is no need to post both.
It would be helpful perhaps if you posted a log from a "build all". Because this is an incremental build, there is no information regarding the successful compilation of the code. This is necessary because this information also tells how the project is set up.
There is an issue with Dev-C++ and parts of teh GNU toolchain regarding spaces in file paths, so "PC PLANETA" is an ill-advised location for your project.
I am not sure where windres options are set in Dev-C++ (I no longer bother to install it), but windres itself takes options to define search paths, just like the compiler (http://sourceware.org/binutils/docs-2.19/binutils/windres.html#windres). So you should have some -I<path> options there, but I would have thought that they would be 'inherited' from the compiler options.
Clifford
thank you for you answer cpns, but I didn't understand a thing in the windres link, and I can't find the resources options in the Dev C++ .. I spent days looking for them
well, I made work this thing by copying all the neccesary .h files to a sub-directory in my source directory, and modifying the "include" lines in them, for example in the file winresrc.h
include "winnt.h" .. (instead of #include <winnt.h>, with the file winnt.h in the same directory)
any suggestions?? thanks
> any suggestions?? thanks
I already made some, but you chose not to do it. You did not provide a log from a "build-all". That information was intended to allow me to make further suggestions based on evidence rather than guess work.
While your solution may work, it is not a good solution, and is unnecessary, you have simply worked around the problem in a cumbersome and difficult to maintain manner. You'd be better off solving the actual problem.
Posting the requested information before going your own way would be helpful. As it is, in the analysis we may have to take into account the changes you have made since the information was requested, which may be difficult - it is now a moving target, unless you take the trouble to undo your 'fix'.
Clifford