It is currently Mon Sep 23, 2019 2:45 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Rebuilding Res File
PostPosted: Tue Apr 01, 2014 1:36 am 
Offline
Enthusiast
Enthusiast

Joined: Thu Dec 18, 2008 3:35 pm
Posts: 228
Location: Wales, UK
I've noticed if I try to rebuild a RES file it fails telling me that the structure is already declared (in a res file), although the only place it is declared is in the res file I am replacing.

I have to delete the res file, restart the compiler, and then build it.

Is this behavior normal?

I mean, it's no big deal for one off changes, but if like me you like to test a few structures at a time it does lengthen the whole process.

Unless I am doing something wrong, which wouldn't surprise me, lol.

_________________
----------------------------------------------------------------------------
Commenting your own code is admitting you don't understand it.
----------------------------------------------------------------------------


Top
 Profile  
Reply with quote  
 Post subject: Re: Rebuilding Res File
PostPosted: Tue Apr 01, 2014 6:51 pm 
Offline
PureBasic Team
PureBasic Team
User avatar

Joined: Fri Apr 25, 2003 5:21 pm
Posts: 5780
Location: Germany
The compiler has a /IGNORERESIDENT switch for this. Use it to ignore the resident file you are rebuilding.

_________________
quidquid Latine dictum sit altum videtur


Top
 Profile  
Reply with quote  
 Post subject: Re: Rebuilding Res File
PostPosted: Tue Apr 01, 2014 7:15 pm 
Offline
Enthusiast
Enthusiast

Joined: Thu Dec 18, 2008 3:35 pm
Posts: 228
Location: Wales, UK
So I set this where exactly? In the compiler options for the res source?

_________________
----------------------------------------------------------------------------
Commenting your own code is admitting you don't understand it.
----------------------------------------------------------------------------


Top
 Profile  
Reply with quote  
 Post subject: Re: Rebuilding Res File
PostPosted: Tue Apr 01, 2014 7:53 pm 
Offline
Always Here
Always Here
User avatar

Joined: Thu Jun 24, 2004 2:44 pm
Posts: 5755
Location: Berlin - Germany
In your commandline!
cmd wrote:
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. Alle Rechte vorbehalten.

C:\Program Files (x86)\PureBasic\Compilers>pbcompiler /?

PBCompiler "Filename"

Options:
--------

/DEBUGGER: Enable the debugger
/EXE "Filename": Create an executable to the given filename
/DLL: Create a DLL
/CONSOLE: Create a console executable
/ICON "Filename": Add an icon to the executable
/RESOURCE "Filename": Add a resource file (.rc) to the executable
/QUIET: Disable all unnecessary textoutput
/COMMENTED: Produce a commented asm output (PureBasic.asm)
/REASM: Compile the 'PureBasic.asm' file to an executable
/XP: Add the Windows XP theme support to the executable
/USER: Add the 'User' hint to the executable (Windows Vista)
/ADMINISTRATOR: Add the 'Administrator' hint to the executable (Windows Vista)
/RESIDENT "Filename": Create a resident file to the given filename
/IGNORERESIDENT "Filename": ignore the given resident
/LINENUMBERING: Enable line numbering in the final executable for OnError
/STANDBY: Wait for external commands (editor, scripts...)
/MMX, /3DNOW, /SSE or /SSE2: Create a processor specific executable
/DYNAMICCPU: Create a executable containing all processor specific routines
/THREAD: Use thread safe runtime for strings and general routines
/UNICODE: Use unicode instead ascii for strings management
/PURIFIER: Enable the purifier
/SUBSYSTEM "Name": Use this subsystem to replace a set of internal functions
/CONSTANT Name=Value: Declare a new constant at compile time
/LINKER "ResponsFile": Specify a commands file to be passed to the linker
/CHECK: Check the syntax only, doesn't create/launch the executable

/LANGUAGE "Language": Uses the specified language for the compiler

/VERSION: Display the version of the compiler


C:\Program Files (x86)\PureBasic\Compilers>

_________________
PureBasic 5.71 | SpiderBasic 2.21 | Windows 10 Pro (x64) | Linux Mint 19.2 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image


Top
 Profile  
Reply with quote  
 Post subject: Re: Rebuilding Res File
PostPosted: Tue Apr 01, 2014 8:08 pm 
Offline
Enthusiast
Enthusiast

Joined: Thu Dec 18, 2008 3:35 pm
Posts: 228
Location: Wales, UK
Ok, I think I am being stupid here.

I am using tailbite to rebild the res file from the tools menu of the PB IDE, I see no option to set this flag in the compiler, since tailbite is invoking it. I also see no option to do this using the tailbite manager.

Am I missing something?

_________________
----------------------------------------------------------------------------
Commenting your own code is admitting you don't understand it.
----------------------------------------------------------------------------


Top
 Profile  
Reply with quote  
 Post subject: Re: Rebuilding Res File
PostPosted: Tue Apr 01, 2014 8:26 pm 
Offline
Always Here
Always Here
User avatar

Joined: Thu Jun 24, 2004 2:44 pm
Posts: 5755
Location: Berlin - Germany
I don't know, if tailbite support this, but tailbite is not required to create a resident file.
Code:
EnableExplicit

Define Path.s = #PB_Compiler_Home + "Compilers\"

Define MyRes.s = "d:\myres.pb"

Debug RunProgram(Path + "pbcompiler.exe", #DQUOTE$ + MyRes + #DQUOTE$ + " /RESIDENT myres.res /IGNORERESIDENT test.res", "")


or use a batch or something else, is easy :wink:

Greetings - Thomas

_________________
PureBasic 5.71 | SpiderBasic 2.21 | Windows 10 Pro (x64) | Linux Mint 19.2 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image


Top
 Profile  
Reply with quote  
 Post subject: Re: Rebuilding Res File
PostPosted: Tue Apr 01, 2014 8:41 pm 
Offline
Enthusiast
Enthusiast

Joined: Thu Dec 18, 2008 3:35 pm
Posts: 228
Location: Wales, UK
The reason for my original post, and my posting it in the tailbite section, is that only structures seem to generate this error, if I rebuild a res file with no structures, the file gets replaced correctly (even interface declares are ignored).

I was just curious if this should be considered a bug, or not.

I like the simplicity of tailbite, so unless I code my own version and try to integrate that into the IDE I guess I'll stick to having to delete the res file before I update it, not ideal, but we have to use what we have.

On a separate note, I've noticed that we have to restart the compiler after we update a userlib or res file, since we do this every time, would it not be prudent for tailbite to instruct the IDE to do this automatically after a successful build? Sometimes I forget to restart the compiler and it can cause confusion. Just a thought.

_________________
----------------------------------------------------------------------------
Commenting your own code is admitting you don't understand it.
----------------------------------------------------------------------------


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


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

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye