Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unwarranted error when compiling a DLL

Status
Not open for further replies.

IlyaRabyy

Programmer
Nov 9, 2010
571
US
Colleagues,

I have a class library (VCX/VCT, not a PRG) which I want to compile into a DLL (multi-thread COM, to be exact).
I created a new project, threw in just this one VCX (+ an associated .H file), and tried to compile a DLL.
I got an error message "Cannot build a DLL without OLE Public classes"... which is totally unwarranted (IMHO)! I do have all of them 3 classes in there marked as OLE Public on that class' Properties dialog screen...

download.aspx


Apparently I am still missing something. What might that be?

AHWBGA!


Regards,

Ilya
 
 http://files.engineering.com/getfile.aspx?folder=1dfc7e06-bdba-446b-92c8-f83c6043f1a2&file=20150203_DLL_Not_Compile.jpg
I'd say before that info sinks in to the project info you have to compile as EXE once, and then can compile as DLL.

Bye, Olaf.
 
Hi Olaf,

I have just tried that your suggestion, and - alas! :-( - with the same result.
EXE compiled without a hitch, but once I ordered it to compile as Multi-threaded DLL - same error message popped up...

Regards,

Ilya
 
MTDLLs need
Did you take a look into project info server`s tab?
The server has to be displayed there.
If not compile an EXE with recompile all.
When the server class is there, you can compile a multithreaded DLL.

Bye, Olaf.

 
Do you have to run VFP as Administrator?

Ez Logic
Michigan
 
Olaf:
"Did you take a look into project info server`s tab?" - Yes I just did.
"The server has to be displayed there" - It is not; the whole "Servers" page is blank.
"If not compile an EXE with recompile all" - I did (in fact, I have "Recompile all" checkbox marked permanently), still blank.

Questions: why the server is required, and what kind of server it should be?

Ez Logic:
"Do you have to run VFP as Administrator?" - I do have Admin rights; however, the End Users might not.

Regards,

Ilya
 
>Questions: why the server is required, and what kind of server it should be?

Any OLEPUBLIC class should show up after first compilation as a server.
We talk about COM servers, when building a DLL, your OLEPUBLIC classes are COM servers.

Anyway, being an admin is not elevating processes you start with administrative privileges. The typical end message when building an EXE or DLL is "Access to system registry is denied". Normally that's fine, but it hinders VFP to register olepublic classes it just compiled.

Right click on vfp9.exe then choose the option to run as administrator (evne though you are admin), then compile. Then you should see your olepublic classes listed as servers.

Bye, Olaf.
 
Just tried it (exactly as you've told), and...
Same thing, Olaf, same bloody error. :-(
Out of desperation, I even tried right-click/Builder/Web Services Publisher... another (legitimate this time around) error occurred: "The SOAP (ver. 3.0 or higher) must be installed".

Regards,

Ilya
 
Try a simple thing: Create a new class in a new vcx and mark it as olepublic.

I think you have to set a class as olepublic, while it is already in the pjx to make the project aware of containing an olepublic class.

Bye, Olaf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top