SiComponents Home Page SiComponents Forums
Here you will be able to get help and share your experience
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Pelles C problem

 
Post new topic   Reply to topic    SiComponents Forums Forum Index -> Resource Builder
View previous topic :: View next topic  
Author Message
noman9607



Joined: 03 Jan 2008
Posts: 4

PostPosted: Thu Jan 03, 2008 2:33 pm    Post subject: Pelles C problem Reply with quote

I am having a little problem using RB with Pelles C and the rc format.
The problem is just a few lines at the top of the .rc file.
Maybe an example is easier:

from Pelles:
// RESOURCE SCRIPT generated by "Pelles C for Windows, version 1.00".

#include <windows.h>
#include <commctrl.h>
#include "main.h"

LANGUAGE LANG_ENGLISH,SUBLANG_ENGLISH_US
(the rest is no problem)

now from Resource Builder:
/*********************************************
File: C:\DOCUMENTS AND SETTINGS\P\MY DOCUMENTS\_PROJECTS\C\001_LEARNING_C\FRED\MAIN.RC
Generated by Resource Builder (2.6.4.1).
*********************************************/
/*
OutputExt=res
*/
8001 ICON
MOVEABLE IMPURE LOADONCALL DISCARDABLE
LANGUAGE LANG_ENGLISH, 1
(the rest is no problem)

I can import the .rc file into RB because RB is smart enough to let me "edit as text" then I just comment out the "#include . . ." lines.
The other small differences in the lines starting with "moveable" and "language" don't seem to bother the Pelles compiler.
The trouble is that RB strips those lines on save or export then the IDE can't display the resources because it expects the "#include . . ." lines.
I can't edit the rc file as text in Pelles because it cannot display a rc file as text. I have to start another text editor, add the missing include lines, save the file, close the editor and start the Pelles IDE again.

Can RB be modified to respect the commented lines on import and NOT STRIP those lines on export? If RB would give me the option of "edit as text" on export (then un-comment the #include lines) as well as import it would save me a lot of bother. I think you could do this with an option checkbox in project properties perhaps.
Resource Builder has come a long way since the earlier days when I bought it (and it used to cost twice as much then!) I find it to be a great way to seperate the GUI from the program logic in WIN32 SDK programming. I especially like the ability to open an .exe file and make changes or 'borrow' a resource.
Happy New Year from North Carolina
Back to top
View user's profile Send private message
isiticov
Site Admin


Joined: 21 Nov 2002
Posts: 2103

PostPosted: Thu Jan 03, 2008 4:24 pm    Post subject: Reply with quote

Hello,

If you make Resource Builder able to access these files mentioned in #include (by adjusting compiler path settings) then it (RB) will allow you to keep these #include at the top of file without commenting them out. And later after exporting RC from Resource Builder it will add these #include at the top of file.
Please let me know if this helps.
Back to top
View user's profile Send private message
noman9607



Joined: 03 Jan 2008
Posts: 4

PostPosted: Fri Jan 04, 2008 4:00 am    Post subject: not much help Reply with quote

The path for main.h changes for every project and even for debug and release versions. The help file is confusing for it states that the "Include directories" are browsed while compiling scripts with#include filename directives but I don't want RB to browse those directories, I want the strings left alone. It is my compiler that needs them, not RB. RB works perfectly well when they are not there at all.

In any case I put all three path-filenames into the listbox "Include Directories" and I have the same problem.

thanks,
Back to top
View user's profile Send private message
isiticov
Site Admin


Joined: 21 Nov 2002
Posts: 2103

PostPosted: Fri Jan 04, 2008 1:17 pm    Post subject: Reply with quote

RB compiles RC scripts upon opening them. Does RB asks you about include files after you save RC in it?
Back to top
View user's profile Send private message
noman9607



Joined: 03 Jan 2008
Posts: 4

PostPosted: Fri Jan 04, 2008 4:30 pm    Post subject: Reply with quote

Here is the message I get:

Error ID: 116

Error message: File C:\Program Files\PellesC\Include\Win\commctrl.h. Line 51 : 116. Number expected but got __POCC__ in expression

I find it very odd that RB is scanning a file it does not need, then reporting an error for doing so. Remember that RB works fine if the lines are commented or not there in the first place (I erase them). It is my C compiler which needs the #includes as I am sure you well know.

thanks, I am sure we will figure out something.
Back to top
View user's profile Send private message
isiticov
Site Admin


Joined: 21 Nov 2002
Posts: 2103

PostPosted: Fri Jan 04, 2008 5:37 pm    Post subject: Reply with quote

The easiest workaround for this I could suggest is to create empty! .h files and place them into the same folder as this RC or "somewhere" and add this "somewhere" to Include Path for compiler. Then RB will "use" these empty .H files and later on saving add reference to them at the top of the file.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    SiComponents Forums Forum Index -> Resource Builder All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by p h p B B  © 2001, 2005 p h p B B  Group