DLL for C++

Just starting out? Need help? Post your questions and find answers here.
zapadepowday
User
User
Posts: 14
Joined: Tue Jan 05, 2010 5:43 pm

DLL for C++

Post by zapadepowday »

HI,
I am having a problem creating a PB DLL that I can include in a Microsoft Visual C++ application,
I am compiling the PB code as a DLL with only one Procedure..ie ProcedureC mydll()
I have also tried the variation... ProcedureCDLL, but the C++ application will not compile either the DLL
or the Lib File as an include, but just throws lots of null character/and character not recognized errors.
Can anyone advise what I am doing wrong.....Thanks.
User avatar
tinman
PureBasic Expert
PureBasic Expert
Posts: 1102
Joined: Sat Apr 26, 2003 4:56 pm
Location: Level 5 of Robot Hell
Contact:

Re: DLL for C++

Post by tinman »

How did you include the lib file in your application? Usually you either have to specify it as a linker option rather than include it.
If you paint your butt blue and glue the hole shut you just themed your ass but lost the functionality.
(WinXPhSP3 PB5.20b14)
USCode
Addict
Addict
Posts: 923
Joined: Wed Mar 24, 2004 11:04 pm
Location: Seattle

Re: DLL for C++

Post by USCode »

I haven't created a Windows DLL with PB yet but don't you also HAVE to include in your DLL the procedures AttachProcess(Instance), DetachProcess(Instance), AttachThread(Instance) and DetachThread(Instance) ? Even if they're empty procedures?
zapadepowday
User
User
Posts: 14
Joined: Tue Jan 05, 2010 5:43 pm

Re: DLL for C++

Post by zapadepowday »

That was the problem...I had to tell the Linker where it was and what it was called, so thanks for that
Post Reply