Page 1 of 1

Hardcoded PureBasic.dll

Posted: Mon Feb 04, 2019 10:35 am
by mariosk8s
Is there a reason that DLLs must be named PureBasic.dll on Windows?
In the past i simply renamed it afterwards, but now i'm actually trying to link to it and the linker insists on linking to PureBasic.dll.
:cry:

Re: Hardcoded PureBasic.dll

Posted: Mon Feb 04, 2019 11:12 am
by NicTheQuick
What PureBasic.dll do you mean? Where do you have to use it? Sounds more like you are creating it by yourself.

Re: Hardcoded PureBasic.dll

Posted: Mon Feb 04, 2019 12:58 pm
by Fred
You need to gives the right name when creating the DLL, as the .lib associated to it will use it.

Re: Hardcoded PureBasic.dll

Posted: Mon Feb 04, 2019 3:55 pm
by Kukulkan
I think what Mario is saying that the /DLL switch on Windows does not have a Filename parameter:

https://www.purebasic.com/documentation ... piler.html

For Linux and Mac there is a Filename parameter. But not for Windows (just /DLL).

So the DLL is always named PureBasic.dll.

Re: Hardcoded PureBasic.dll

Posted: Mon Feb 04, 2019 4:13 pm
by Little John
Kukulkan wrote:I think what Mario is saying that the /DLL switch on Windows does not have a Filename parameter:

https://www.purebasic.com/documentation ... piler.html

For Linux and Mac there is a Filename parameter. But not for Windows (just /DLL).

So the DLL is always named PureBasic.dll.
Sorry, I think that is a contradiction to what it reads on the page that you mentioned:
https://www.purebasic.com/documentation/reference/cli_compiler.html wrote:Examples:

CLI> pbcompiler "C:\Project\Source\DLLSource.pb" /EXE "C:\Project\project.dll" /DLL

The compiler will compile the source code (here with full path) and create the DLL "project.dll" in the given directory.

Re: Hardcoded PureBasic.dll

Posted: Mon Feb 04, 2019 4:27 pm
by Fred
Yes, you can use the /EXE flag to specify the output name. I agree it's badly named, it should be /OUTPUT parameter.

Re: Hardcoded PureBasic.dll

Posted: Mon Feb 04, 2019 5:13 pm
by davido
Fred wrote:Yes, you can use the /EXE flag to specify the output name. I agree it's badly named, it should be /OUTPUT parameter.
Is that an indication that it might be so, sometime in the future?

Re: Hardcoded PureBasic.dll

Posted: Tue Feb 05, 2019 10:17 am
by mariosk8s
Fred wrote:Yes, you can use the /EXE flag to specify the output name. I agree it's badly named, it should be /OUTPUT parameter.
Great, that works for me to know that now. :)

I think changing

Code: Select all

/DLL: Create a DLL
to

Code: Select all

/DLL "Filename": Create a DLL with the given file name.
would be the easiest to grasp in my mind.

Re: Hardcoded PureBasic.dll

Posted: Tue Feb 05, 2019 10:21 am
by mariosk8s
Little John wrote:Sorry, I think that is a contradiction to what it reads on the page that you mentioned:
https://www.purebasic.com/documentation/reference/cli_compiler.html wrote:Examples:

CLI> pbcompiler "C:\Project\Source\DLLSource.pb" /EXE "C:\Project\project.dll" /DLL

The compiler will compile the source code (here with full path) and create the DLL "project.dll" in the given directory.
Cool, to know about that page. :idea: So far i only knew about

Code: Select all

pbcompiler /?
and it didn't mention that, nor the page you're referring to.

Re: Hardcoded PureBasic.dll

Posted: Wed Mar 04, 2020 11:57 pm
by Andre
To be clarified by Fred => official supported behaviour => related notes in the docs...

Re: Hardcoded PureBasic.dll

Posted: Thu Mar 05, 2020 9:56 am
by Fred
I agree than /DLL should have a filename parameter as well.

Re: Hardcoded PureBasic.dll

Posted: Sat Sep 16, 2023 9:02 pm
by Andre
Suggestion for the 'Command line compiler' (cli_compiler.txt) at 'Windows-specific command line parameters':
/DLL "Filename.dll" - the output file will be a DLL (if there is no filename given, the output file will be named "PureBasic.dll")
:?: