PBCompiler.exe - need to manual use

Everything else that doesn't fall into one of the other PB categories.
ALAN-MHz
User
User
Posts: 68
Joined: Fri Jul 29, 2005 11:47 am

PBCompiler.exe - need to manual use

Post by ALAN-MHz »

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!
User avatar
skywalk
Addict
Addict
Posts: 3972
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Re: PBCompiler.exe - need to manual use

Post by skywalk »

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: Select all

#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
Fred
Administrator
Administrator
Posts: 16619
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: PBCompiler.exe - need to manual use

Post by Fred »

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
ALAN-MHz
User
User
Posts: 68
Joined: Fri Jul 29, 2005 11:47 am

Re: PBCompiler.exe - need to manual use

Post by ALAN-MHz »

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.
ALAN-MHz
User
User
Posts: 68
Joined: Fri Jul 29, 2005 11:47 am

Re: PBCompiler.exe - need to manual use

Post by ALAN-MHz »

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 ?
Fred
Administrator
Administrator
Posts: 16619
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: PBCompiler.exe - need to manual use

Post by Fred »

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 :)
User avatar
GedB
Addict
Addict
Posts: 1312
Joined: Fri May 16, 2003 3:47 pm
Location: England
Contact:

Re: PBCompiler.exe - need to manual use

Post by GedB »

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
Post Reply