Hardcoded PureBasic.dll

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
mariosk8s
Enthusiast
Enthusiast
Posts: 103
Joined: Wed Apr 06, 2011 11:37 am
Location: Hüfingen, Germany
Contact:

Hardcoded PureBasic.dll

Post 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:
User avatar
NicTheQuick
Addict
Addict
Posts: 1224
Joined: Sun Jun 22, 2003 7:43 pm
Location: Germany, Saarbrücken
Contact:

Re: Hardcoded PureBasic.dll

Post by NicTheQuick »

What PureBasic.dll do you mean? Where do you have to use it? Sounds more like you are creating it by yourself.
The english grammar is freeware, you can use it freely - But it's not Open Source, i.e. you can not change it or publish it in altered way.
Fred
Administrator
Administrator
Posts: 16619
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: Hardcoded PureBasic.dll

Post by Fred »

You need to gives the right name when creating the DLL, as the .lib associated to it will use it.
User avatar
Kukulkan
Addict
Addict
Posts: 1352
Joined: Mon Jun 06, 2005 2:35 pm
Location: germany
Contact:

Re: Hardcoded PureBasic.dll

Post 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.
Little John
Addict
Addict
Posts: 4519
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

Re: Hardcoded PureBasic.dll

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

Re: Hardcoded PureBasic.dll

Post 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.
davido
Addict
Addict
Posts: 1890
Joined: Fri Nov 09, 2012 11:04 pm
Location: Uttoxeter, UK

Re: Hardcoded PureBasic.dll

Post 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?
DE AA EB
User avatar
mariosk8s
Enthusiast
Enthusiast
Posts: 103
Joined: Wed Apr 06, 2011 11:37 am
Location: Hüfingen, Germany
Contact:

Re: Hardcoded PureBasic.dll

Post 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.
User avatar
mariosk8s
Enthusiast
Enthusiast
Posts: 103
Joined: Wed Apr 06, 2011 11:37 am
Location: Hüfingen, Germany
Contact:

Re: Hardcoded PureBasic.dll

Post 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.
User avatar
Andre
PureBasic Team
PureBasic Team
Posts: 2056
Joined: Fri Apr 25, 2003 6:14 pm
Location: Germany (Saxony, Deutscheinsiedel)
Contact:

Re: Hardcoded PureBasic.dll

Post by Andre »

To be clarified by Fred => official supported behaviour => related notes in the docs...
Bye,
...André
(PureBasicTeam::Docs & Support - PureArea.net | Order:: PureBasic | PureVisionXP)
Fred
Administrator
Administrator
Posts: 16619
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: Hardcoded PureBasic.dll

Post by Fred »

I agree than /DLL should have a filename parameter as well.
User avatar
Andre
PureBasic Team
PureBasic Team
Posts: 2056
Joined: Fri Apr 25, 2003 6:14 pm
Location: Germany (Saxony, Deutscheinsiedel)
Contact:

Re: Hardcoded PureBasic.dll

Post 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")
:?:
Bye,
...André
(PureBasicTeam::Docs & Support - PureArea.net | Order:: PureBasic | PureVisionXP)
Post Reply