Page 1 of 1

Reasm from commented file fails

Posted: Sat Jan 04, 2020 6:19 am
by BarryG
Hi guys, I'm trying to rebuild my commented ASM source with this command-line, but it fails:

Code: Select all

D:\PureBasic\Compilers\pbcompiler.exe /reasm PureBasic.asm /linenumbering /thread /xp /icon "Includes\Icon.ico" /resource "Includes\Sounds\Sounds.rc" /exe "Rebuild.exe"
POLINK: error: Unresolved external symbol '_PB_StringBasePosition'.

Image

I'm not using any third-party libraries, and obviously the exe compiles normally from the IDE, so all paths in the resource file are correct, etc.

I'm running the command-line from a batch file in the source's folder. Anyone have any idea how to resolve this? Thanks.

Re: Reasm from commented file fails

Posted: Sat Jan 04, 2020 8:38 am
by chi
I bet you didn't use the thread switch when you created the .asm file...

Code: Select all

D:\PureBasic\Compilers\pbcompiler.exe "Source.pb" /commented /thread /exe "Purebasic.exe" 

Re: Reasm from commented file fails

Posted: Sat Jan 04, 2020 1:23 pm
by BarryG
Bingo! The docs don't say to do that, though; so it's not obvious (as evidenced by me having to post the question). I thought "/commented" would just dump the source, and that "/reasm" would enable the thread-safety for it with "/thread". Had no idea that I had to use "/thread" to make "/commented" a thread-safe source. Thanks for helping again.