It is currently Fri May 24, 2013 8:46 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: [DONE] /SUBS: not working
PostPosted: Wed Apr 23, 2008 1:57 am 
Offline
Addict
Addict
User avatar

Joined: Sat Jun 30, 2007 8:04 pm
Posts: 2704
I get this error when attempting to compile this to a Tailbite library with threadsafe enabled using the PureGDKThreadSafe subsystem:

Code:
---------------------------
TailBite Error
---------------------------
PBCompiler:  /COMMENTED /DEBUGGER
******************************************
PureBasic 4.10 (Windows - x86)
******************************************
Warning: can't load the '' subsystem
Compiling D:\ \Projects\Pure Basic\PureGDK\Plugins\Compile Plugins\Lib-P_2DPluginKit.pb
Loading external libraries...
Starting compilation...
Error: Line 2 - Invalid name: same As an external command.

The pipe has been ended.

---------------------------
OK   
---------------------------


Here is the code:

Code:
PrototypeC Protop2dStart2DPlugKit(Username, UserCode)
ProcedureDLL p2dStart2DPlugKit(Username.s, UserCode.s)
   Static Ptr
   If Not GDKLoadPtr(@Ptr,"2DPluginKIT.dll","Init2DPlugKIT")
      ProcedureReturn 0
   EndIf
   If Not GDKDebuggerPresent()
      Function.Protop2dStart2DPlugKit=Ptr
      Result=Function(@Username.s, @UserCode.s)
      GDKCheckRuntimeError()
      ProcedureReturn Result
   EndIf
   ProcedureReturn GDKMsgLong(Ptr, #Long, 2, 6, @Username.s, @UserCode.s)
EndProcedure


The subsystem's folder structure is PureBasic\Subsystems\PureGDKThreadSafe\PureLibraries

Tailbite also erroneously creates a "PureGDKThreadSafe" folder in my PureBasic installation directory for some reason.

I am compiling from the command line using /SUBS:PureGDKThreadSafe. This problem only occurs when compiling with the /SUBS: command line option.

You'll need the PureGDK framework library to compile. I've included the threadsafe and non-threadsafe compiled Tailbite libraries:
http://puregdk.com/files/Lib_GDKPlugin.zip


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 23, 2008 5:57 pm 
Offline
Addict
Addict

Joined: Sat Apr 10, 2004 1:20 pm
Posts: 1069
Location: Germany
You have to supply the complete subsystem path beginning from Subsystems (like the help says) :

Code:
C:\Programme\TailBite>tailbite "D:\Backup\test\Mistrel_Test2.pb" /KEEPSRCFILES /WRITEBATCH /THRD /SUBS:Subsystems\UserLibThreadSafe\PureLibraries\UserLibraries\

or in your case :
Code:
C:\Programme\TailBite>tailbite "D:\Backup\test\Mistrel_Test2.pb" /KEEPSRCFILES /WRITEBATCH /THRD /SUBS:Subsystems\PureGDKThreadSafe\PureLibraries\UserLibraries\


Edit : A check is added (for the next version)

_________________
http://www.PureBasicPower.de


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 23, 2008 6:59 pm 
Offline
Addict
Addict
User avatar

Joined: Sat Jun 30, 2007 8:04 pm
Posts: 2704
Thank you for clarifying.

What is /WRITEBATCH? I only see /WRIT in the documentation.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 23, 2008 7:31 pm 
Offline
Addict
Addict

Joined: Sat Apr 10, 2004 1:20 pm
Posts: 1069
Location: Germany
Mistrel wrote:
What is /WRITEBATCH? I only see /WRIT in the documentation.
/WRITE is the short form of /WRITEBATCH (less typing needed)
Quote:
/WRITebatch

Generate build batch file: TailBite will generate a batch file in the library source folder to allow fast rebuilding which, anyway, you can do more easyly with TailBite itself (processing the .Desc file).


in case of your example, the batch file would look like this :
Code:
@echo OFF

"C:\Programme\PureBasic420\Compilers\FAsm.exe" "Functions\p2dStart2DPlugKit.asm" "Functions\p2dStart2DPlugKit.obj"
"C:\Programme\PureBasic420\Compilers\FAsm.exe" "Functions\Mistrel_Test2_Init.asm" "Functions\Mistrel_Test2_Init.obj"
"C:\Programme\PureBasic420\Compilers\FAsm.exe" "Functions\Mistrel_Test2Shared.asm" "Functions\Mistrel_Test2Shared.obj"
"C:\Programme\PureBasic420\Compilers\FAsm.exe" "Functions\Shared\Mistrel_Test2_End.asm" "Functions\Shared\Mistrel_Test2_End.obj"

"C:\Programme\PureBasic420\Compilers\polib.exe" /out:"Mistrel_Test2.lib" @"Mistrel_Test2ObjFiles.txt"
Del "Functions\*.obj"
Del "Functions\Shared\*.obj"
"C:\Programme\PureBasic420\Library SDK\LibraryMaker.exe" "Mistrel_Test2.Desc" /TO "C:\Programme\PureBasic420\Subsystems\UserLibThreadSafe\PureLibraries\UserLibraries" /COMPRESSED /NOUNICODEWARNING
REM Del "Mistrel_Test2.lib"
ECHO Done

_________________
http://www.PureBasicPower.de


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 23, 2008 9:43 pm 
Offline
Addict
Addict
User avatar

Joined: Sat Jun 30, 2007 8:04 pm
Posts: 2704
Actually, the problem is something else entirely.

I have source files prefixed with "Lib-P_" to identify that they are to be compiled as libraries and that they are plugin libraries.

I also have files prefixed with just "Lib-".

When Tailbite compiles these files it converts the " - " character to a " _ ". I compile the plugin using /OUTP to compile one in "PureBasic\PureLibraries\UserLibraries" and the other in "PureBasic\SubSystems\PureGDKThreadSafe\PureLibraries".

When I specify /SUBS: and output to a subsystem for the filename "Lib-P_Test.pb" Tailbite does not understand that "Lib_P_Test" already exists in "PureBasic\PureLibraries\UserLibraries" because it erroneously compares it with "Lib-P_Test".


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 23, 2008 11:01 pm 
Offline
Addict
Addict

Joined: Sat Apr 10, 2004 1:20 pm
Posts: 1069
Location: Germany
fixed for next version.

_________________
http://www.PureBasicPower.de


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 06, 2008 7:42 pm 
Offline
Addict
Addict
User avatar

Joined: Sat Jun 30, 2007 8:04 pm
Posts: 2704
This problem still exists. Files will compile fine prefixed with "Lib_" but will error "Invalid name: same as an external command" when using "Lib-" instead.


Last edited by Mistrel on Tue May 06, 2008 8:22 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Tue May 06, 2008 7:51 pm 
Offline
Addict
Addict
User avatar

Joined: Thu Jun 24, 2004 2:44 pm
Posts: 4715
Location: Berlin - Germany
Libnames have the same limitations as functions.
You can't use a filename with - for a lib!

_________________
PureBasic 5.11 | Windows 7 SP1 (x64) | Mageia 3 (x64) | RealSource

The use of EnableExplicit is free of charge and avoids errors.


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 06, 2008 7:53 pm 
Offline
Addict
Addict
User avatar

Joined: Sat Jun 30, 2007 8:04 pm
Posts: 2704
ts-soft wrote:
Libnames have the same limitations as functions.
You can't use a filename with - for a lib!


The problem here is that Tailbite is not correcting the ' - ' to ' _ ' when compiling with a subsystem.

I should be able to name my source files whatever I like so long as the final library name does not have any ' - ' in it.


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 06, 2008 8:00 pm 
Offline
Addict
Addict
User avatar

Joined: Thu Jun 24, 2004 2:44 pm
Posts: 4715
Location: Berlin - Germany
in this case, IMHO tailbite should give a errorbox but not correct automatic.

_________________
PureBasic 5.11 | Windows 7 SP1 (x64) | Mageia 3 (x64) | RealSource

The use of EnableExplicit is free of charge and avoids errors.


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

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 0 guests


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