It is currently Mon Nov 18, 2019 6:23 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: PBCompiler.exe - need to manual use
PostPosted: Tue Nov 12, 2019 5:51 pm 
Offline
User
User

Joined: Fri Jul 29, 2005 11:47 am
Posts: 55
Dear all, i need to manually use pbcompiler.exe to compile my software, i've read a lot of topic but something is currently not clear to me, this is my command:

PBCOMPILER.EXE "MyProject.pb" /EXE "MyProject.exe" /THREAD /LINENUMBERING /ADMINISTRATOR /ICON "MyProject.ico"

without THREAD compile ok, with THREAD i've got a lot of:

Error: Linker
POLINK: warning: Unrecognized option 'FAILIFMISMATCH:_MSC_VER=1600'; ignored.
POLINK: warning: Unrecognized option 'FAILIFMISMATCH:_ITERATOR_DEBUG_LEVEL=0'; ignored.

that i don't know how to solve.

Another question is how to add additional info to executable like "version info", "product name", i need to manually compile an rc file and pass to pbcompiler ? There is a template for this file or an editor ?

Please help me! Thanks!


Top
 Profile  
Reply with quote  
 Post subject: Re: PBCompiler.exe - need to manual use
PostPosted: Tue Nov 12, 2019 7:06 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Dec 23, 2009 10:14 pm
Posts: 3120
Location: Boston, MA
Simplest way is to edit the VERSION INFO/RESOURCES panel in the IDE compiler options version tab.
; Version Info: auto set fields --> %yy.%mm.%dd
Or edit a MyApp.rc file with the following and reference it in the IDE compiler options resources tab:
Code:
#define VOS_UNKNOWN 0x00000000
#define VOS_DOS 0x00010000
#define VOS_OS216 0x00020000
#define VOS_OS232 0x00030000
#define VOS_NT 0x00040000
#define VOS_DOS_WINDOWS16 0x00010001
#define VOS_DOS_WINDOWS32 0x00010004
#define VOS_OS216_PM16 0x00020002
#define VOS_OS232_PM32 0x00030003
#define VOS_NT_WINDOWS32 0x00040004
#define VFT_UNKNOWN 0
#define VFT_APP 1
#define VFT_DLL 2
#define VFT_DRV 3
#define VFT_FONT 4
#define VFT_VXD 5
#define VFT_STATIC_LIB 7

pack ICON "..\\myapp\\img\\myapp-32x32-8.ico"
1 VERSIONINFO
FILEVERSION    19,11,07,0
PRODUCTVERSION 19,11,07,0
FILETYPE VFT_APP    //FILETYPE VFT_UNKNOWN
FILEOS VOS_UNKNOWN  //FILEOS VOS_NT_WINDOWS32
{
BLOCK "StringFileInfo"
{
BLOCK "000004b0"
{
VALUE "CompanyName",     "My Company\0"
VALUE "ProductName",     "MyApp\0"
VALUE "ProductVersion",  "19.11.07\0"
VALUE "FileVersion",     "19.11.07\0"
VALUE "FileDescription", "MyApp - does great stuff.\0"
VALUE "InternalName",    "MyApp\0"
VALUE "OriginalFilename","MyApp\0"
VALUE "LegalCopyright",  "My Company\0"
VALUE "LegalTrademarks", "\0"
VALUE "PrivateBuild",    "\0"
VALUE "SpecialBuild",    "\0"
VALUE "Email",           "me@mycompany.com\0"
VALUE "Website",         "www.mycompany.com\0"
VALUE "UserDefined1",    "http://www.mycompany.com\0"
VALUE "UserDefined2",    "\0"
VALUE "UserDefined3",    "\0"
}
}
BLOCK "VarFileInfo"
{
VALUE "Translation", 0x0000, 0x4b0
}
}

_________________
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum


Top
 Profile  
Reply with quote  
 Post subject: Re: PBCompiler.exe - need to manual use
PostPosted: Wed Nov 13, 2019 9:57 am 
Offline
Administrator
Administrator

Joined: Fri May 17, 2002 4:39 pm
Posts: 13627
Location: France
ALAN-MHz wrote:
Dear all, i need to manually use pbcompiler.exe to compile my software, i've read a lot of topic but something is currently not clear to me, this is my command:

PBCOMPILER.EXE "MyProject.pb" /EXE "MyProject.exe" /THREAD /LINENUMBERING /ADMINISTRATOR /ICON "MyProject.ico"

without THREAD compile ok, with THREAD i've got a lot of:

Error: Linker
POLINK: warning: Unrecognized option 'FAILIFMISMATCH:_MSC_VER=1600'; ignored.
POLINK: warning: Unrecognized option 'FAILIFMISMATCH:_ITERATOR_DEBUG_LEVEL=0'; ignored.


It compiles correctly in the IDE with the Threadsafe option ? It doesn't seems related to the commandline but to a .lib you are linking in your project which is not compiled with VS2013


Top
 Profile  
Reply with quote  
 Post subject: Re: PBCompiler.exe - need to manual use
PostPosted: Wed Nov 13, 2019 11:03 am 
Offline
User
User

Joined: Fri Jul 29, 2005 11:47 am
Posts: 55
Dear Fred, thanks for your answer, in IDE compile without problem and run without problem, i'll try some more test today.
Thanks skywalk for rc, i'll try as soon as possible.


Top
 Profile  
Reply with quote  
 Post subject: Re: PBCompiler.exe - need to manual use
PostPosted: Wed Nov 13, 2019 12:54 pm 
Offline
User
User

Joined: Fri Jul 29, 2005 11:47 am
Posts: 55
Fred i'm think that i'm solved, but i want your opinion:

PBCOMPILER.EXE "MyProject.pb" /EXE "MyProject.exe" /THREAD /LINENUMBERING /ADMINISTRATOR /ICON "MyProject.ico" /SUBSYSTEM UserLibThreadSafe /RESOURCE MyProject.rc

When i use "/THREAD" switch seems that give error if i not add also "/SUBSYSTEM UserLibThreadSafe" is correct ? Is this switch for "Create threadsafe executable" ?

Is "/LINENUMBERING" switch for "Enable OnError lines support" ?

Is "/ADMINISTRATOR" switch for "Request Administrator mode for Windows Vista" ? Is also needed to insert into rc file the manifest or simple the switch is enough ?

For the switch "/ICON" is enough for add icon to executable or i need to insert icon also in rc file ?


Top
 Profile  
Reply with quote  
 Post subject: Re: PBCompiler.exe - need to manual use
PostPosted: Wed Nov 13, 2019 4:20 pm 
Offline
Administrator
Administrator

Joined: Fri May 17, 2002 4:39 pm
Posts: 13627
Location: France
Do you use any userlib ? It seems like so, that why you need to specify the subsystem as you did in the IDE (this is not part of official PB package)

And yes for all your questions :)


Top
 Profile  
Reply with quote  
 Post subject: Re: PBCompiler.exe - need to manual use
PostPosted: Wed Nov 13, 2019 5:52 pm 
Offline
Addict
Addict
User avatar

Joined: Fri May 16, 2003 3:47 pm
Posts: 1311
Location: England
There's a post in the Visual Studio forums for nearly the exact same error in Visual C++ code: https://social.msdn.microsoft.com/Forum ... =vcgeneral

The answer there is that there is a bad pragma comment: https://docs.microsoft.com/en-us/cpp/er ... ew=vs-2019


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 6 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