[solved] Some questions if you use fbc in bash or batch sripts.

General FreeBASIC programming questions.
D.J.Peters
Posts: 7659
Joined: May 28, 2005 3:28

[solved] Some questions if you use fbc in bash or batch sripts.

Postby D.J.Peters » Jan 02, 2019 14:54

win32:

Code: Select all

@echo "build FBSound 1.1 for Windows x86:"
@REM Set the right path to your 32-bit FreeBASIC compiler !
d:\FreeBASIC\fbc32.exe -w pendantic -mt -gen gcc -asm intel -lib src/fbscpu.bas  -x ./lib/win32/libfbscpu.a
d:\FreeBASIC\fbc32.exe -w pendantic -mt -gen gcc -asm intel -lib src/fbsdsp.bas  -x ./lib/win32/libfbsdsp.a
d:\FreeBASIC\fbc32.exe -w pendantic -mt -gen gcc -asm intel -p ./lib/win32 -dll src/fbsound.bas -x ../fbsound-1.1/tests/fbsound-32.dll
d:\FreeBASIC\fbc32.exe -w pendantic -mt -gen gcc -asm intel -dll src/plug-ds.bas -x ../fbsound-1.1/tests/plug-ds-32.dll
d:\FreeBASIC\fbc32.exe -w pendantic -mt -gen gcc -asm intel -dll src/plug-mm.bas -x ../fbsound-1.1/tests/plug-mm-32.dll
move /Y ..\fbsound-1.1\tests\libfbsound-32.dll.a ..\fbsound-1.1\lib\win32\
del ..\fbsound-1.1\tests\libplug-ds-32.dll.a
del ..\fbsound-1.1\tests\libplug-mm-32.dll.a
@echo "ready!"
@pause

win64:

Code: Select all

@echo "build FBSound 1.1 for Windows x86_64:"
@REM Set the right path to your 64-bit FreeBASIC compiler !
d:\FreeBASIC\fbc64.exe -w pendantic -mt -gen gcc -asm intel -lib src/fbscpu.bas -x ./lib/win64/libfbscpu.a
d:\FreeBASIC\fbc64.exe -w pendantic -mt -gen gcc -asm intel -lib src/fbsdsp.bas -x ./lib/win64/libfbsdsp.a
d:\FreeBASIC\fbc64.exe -w pendantic -mt -gen gcc -asm intel -p ./lib/win64 -dll src/fbsound.bas -x ../fbsound-1.1/tests/fbsound-64.dll
d:\FreeBASIC\fbc64.exe -w pendantic -mt -gen gcc -asm intel -dll src/plug-ds.bas -x ../fbsound-1.1/tests/plug-ds-64.dll
d:\FreeBASIC\fbc64.exe -w pendantic -mt -gen gcc -asm intel -dll src/plug-mm.bas -x ../fbsound-1.1/tests/plug-mm-64.dll
move /Y ..\fbsound-1.1\tests\libfbsound-64.dll.a ..\fbsound-1.1\lib\win64\
del ..\fbsound-1.1\tests\libplug-ds-64.dll.a
del ..\fbsound-1.1\tests\libplug-mm-64.dll.a
@echo "ready!"
@pause
You can see on end I must move the link library libfbsound-xx.a manually to the lib/win32 or lib/win64 folder.

How set the output path for the created import lib the *.dll.a file ?

I have to delete libplug-ds-xx.dll.a and libplug-mm-xx.dll.a manually also.

How to disable writing the optional import lib the *.dll.a file ?

Thank you.

Joshy
Last edited by D.J.Peters on Jan 04, 2019 22:45, edited 1 time in total.
coderJeff
Site Admin
Posts: 2799
Joined: Nov 04, 2005 14:23
Location: Ontario, Canada
Contact:

Re: Some questions if you use fbc in bash or batch sripts.

Postby coderJeff » Jan 04, 2019 16:43

D.J.Peters wrote:How set the output path for the created import lib the *.dll.a file ?

It's the same as .dll or .so location. There is no command line option to specify some other location.

How to disable writing the optional import lib the *.dll.a file ?

It's automatic and there is no option to disable.

If you really want to control, you could compile & link in separate steps, but then you would have .o files to clean up.

Joshy, your solution of moving files and deleting unwanted import lib is most easy solution available with current fbc.
D.J.Peters
Posts: 7659
Joined: May 28, 2005 3:28

Re: [solved] Some questions if you use fbc in bash or batch sripts.

Postby D.J.Peters » Jan 04, 2019 22:48

Thank you for the info I was in hope there are some undocumented command line switches to do the job.

But i can live with *.bat *.cmd or *.sh scripts.

Joshy

Return to “General”

Who is online

Users browsing this forum: No registered users and 6 guests