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!

visualc++ creating DLL??

Status
Not open for further replies.

wuhoo

Programmer
Feb 17, 2004
2
US
I have a visualc++ project(GUI) containing 20 classes or so... I need to create a DLL out of it....Im not sure exactly how to go about doing this... everything Ive read on the net says to create a new 'dll' project using the wizard, and simply import all of my .cpp/.hpp/resoarces into the new DLL project....is that really All i need to do....any suggestions or links to places that I could use as a resoarce would be GREATLY appreciated....Thank you in advance...

mike
 
so here is where im at... I went to and found a tutorial...Thanks for that link.....ok...I created a DLL project with the wizard...then I added all of my .cpp/.hpp files....in the .hpp file I add the keyword...
ex, class __declspec(dllexport) MyClass

I then build and get this error

fatal error C1010: unexpected end of file while looking for precompiled header directive


I missing something here...hmmm....and experienced DLL creators out there? thanks
 
Try compile StdAfx.cpp first (by hand;)...
 
Either

1) Make sure the .cpp file with the error includes stdafx.h

2) Select Project->Settings...->C/C++ ->Precompiled Headers->Automatic use of precompiled headers

/Per

"It was a work of art, flawless, sublime. A triumph equaled only by its monumental failure."
 
I believe you should #include"stdafx.h" in the first line of each .cpp file

Ion Filipski
1c.bmp
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top