The string passed to linker needs to contain all the file names your application use and
also compile/linking switches. It does not make any difference, when you pass
explicitly all the file names, or use wildcards, or create the string
by concatenating the input from several lines. You can check the passed
string from FlagShip to linker by -v switch, e.g. :
FlagShip -v myfile*.obj any*.obj other.lib -Mmystart -o myapplic
> But because there were so many object files, there was an error that the command line was too long.
In
Windows (from XP to Windows 10), the limitation of command-line size is
8191 characters (see
https://support.microsoft.com/en-us/kb/830473),
hence the passed string cannot exceed this limitation, otherwise Windows
reports error.
To work around the limitation, use one or more of the following methods:
● Concatenate small program functions into one (or several) source files.
For example instead of above any*.obj (= any1.obj to any20.obj)
concatenate the source of any1.prg ... any10.prg --> udfs1.prg and
any11.prg ... any20.prg --> udfs2.prg by your program editor, then
compile
FlagShip -v udfs1.prg udfs2.prg myfile*.obj other.lib -Mmystart -o myapplic● Create user library (e.g. mylib.lib) containing some of your
procedures and functions, for example your myfile1.prg to myfile5.prg by
using the BCC32 librarian:
# open FlagShip console
FlagShip -c myfile*.prg # creates myfile1.obj to myfile5.obj
tlib mylib.lib +myfile1.obj +myfile2.obj +myfile3.obj
tlib mylib.lib +myfile4.obj +myfile5.obj # note: no wildcards with tlib
FlagShip any*.obj mylib.lib other.lib -Mmystart -o myapplic.exe● Combine both above methods and execute:
FlagShip udfs1.prg udfs2.prg mylib.lib other.lib -Mmystart -o myapplic.exeNote:
in the above examples is "mystart" the name of your start procedure and
"myapplic" the name of produced executable - adapt to your real needs.
> Is the wildcard in any*.obj literal? Can wildcards be used?
The
star * in above file names (e.g. any*.obj or myfile*.prg) is a
wildcard, FlagShip resolves the entry "any*.obj" to e.g. "any1.obj
any2.obj ... any19.obj any20.obj".
See also my previous reply and the
manual section FSC.1.2 and FSC.1.6 for further details.
Paul