Share via


DLL file is missing after successful BUILD

Question

Tuesday, April 8, 2014 12:06 PM

Hello everybody

I have a small problem and I would like to ask for some help.

I inherited a small VS project which has 2 sub-projects. The first sub-project should return an executable file and the other one a .dll file. I compile each one separately and in fact the executable file appears but when I build the other one no dll file is to be found!

After being built successfully I try to do a search for the dll but it's nowhere.

I checked each sub-project's properties and everything seems to be ok (albeit ok to a beginner like me doesn't mean much!)

Any ideas what I am doing wrong?

If there's any further information that I can provide just let me know!

thanks a lot!! :-)

All replies (14)

Friday, April 11, 2014 2:58 AM ✅Answered

Hi rodrigojds,    

Thanks for your friendly response.

If you make sure that it is the class project which would output the dll file, and you make sure that you could build it well, maybe you could check whether you have other settings which output it to other path like this thread in VC++ forum:

http://social.msdn.microsoft.com/Forums/vstudio/en-US/4159cfe4-b49e-4170-8140-5c3bf4e79407/dll-build-successful-no-dll-created?forum=vclanguage

Click TOOLS->Options->Projects and Solutions, set the build output information “Detailed”, maybe you could collect more detailed message or logs.

Since you have post this issue to the VC++ forum here:

http://social.msdn.microsoft.com/Forums/vstudio/en-US/eed87768-cbc1-4185-bc88-47857ab7cf2a/dll-file-is-missing-after-successful-build?forum=vcgeneral#1023a769-533d-4edf-afff-c247e79ae754

I think you would get more dedicated response from the VC++ members or experts. I will close this case. Thanks for your cooperation.

Have a nice weekend,

We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.


Tuesday, April 8, 2014 1:38 PM

Can you build the subproject that create the dll inside the subproject?  Yo may be getting build errors in the subproject so no dll is being generated.

jdweng


Tuesday, April 8, 2014 1:51 PM

Thanks for your reply Joel!

Yes I am building solely the subproject that is suppose to create the dll file.

I checked the output and no errors are there..it just says Build : 1 succeeded, 0 failed, etc


Tuesday, April 8, 2014 2:03 PM

If yo ubuild the project manually does it create a dll?  Is it creating a exe instead of a dll.

jdweng


Tuesday, April 8, 2014 2:34 PM

I'm not quite sure what you mean by building manually but I have tried building it in every that is available in VS. I've tried batch building the file individually and also right clicking the sub project and building it. No dll files are created and the exe file is created when I build the other sub project.

I'm guessing it's some issue in the properties but everything seems ok to me. the output directory is where it should be.

thanks!


Tuesday, April 8, 2014 2:44 PM | 2 votes

You have a parent project which generates a exe and the child project generates a dll.  The child project will only compile the child project.  The parenet should rebuild both the child and the parent.

The parrent project should add the child project as a reference by browsing for the dll in the child project.  Then when the parent project is compiled the compile will automatically copy the child dll to the bin folder of the parent project.

The way the parent project know that the child project is out-of-date is it compares the date of source code in the child project with the date of the dll.

To make sure evvery thing is synchronized I would do the following

1) Open the Solution Explorer on the parent project and under reference delete the child project.

2) Make sure the child dll is removed from the parent project.  If not manually remove the dll

3) Add child back to the parent project by adding existing item and then browsing for the dll in the child project.  I usually choose the child dll in the bin/debug folder. 

jdweng


Wednesday, April 9, 2014 5:43 AM

Thanks for jdweng’s help.

Hi rodrigojds,

Thank you for posting in the MSDN forum.

I think jdweng’s suggestion is helpful. Maybe you could share us a screen shot about the solution Explorer window with your projects.

My understanding is that you create three project in the same solution, you would reference the dll file of project 1 and .exe file of your project to in your project 3. So you would check whether you add them as the references. In addition, you have to make sure that you check the correct output path of your projects.

Maybe the following screen shots would be better for this issue.

I just create a simple sample, three project:

CodedUITestProject12: It reference the dll file of classlibrary1 and .exe file of the ConsoleApplication1.

I add them as the references in CodedUITestProject12, and then clean and rebuild the CodedUITestProject12, I could get it like the following screen shot.

But if you mean that you couldn’t get the dll file in your ClassLibrary1 path, first, you would check whether you check the correct output path, since you create three projects, they all have the bin/debug folder.

So please clean and rebuild your whole solution (not the project)/clean and rebuild ClassLibrary1, and then right click the ClassLibrary1 project in solution explorer window->Open Folder in file Explorer, and then open the bin/debug folder, check it again. Note: it is the ClassLibrary1 project (not the parent project CodedUITestProject12 ).

If the three projects are not in the same solution, please check whether you add them as the references, and set the copy local =true like the first screen shot.

If we have misunderstood anything, please feel free to let us know.

Best Regards,

We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.


Wednesday, April 9, 2014 10:27 AM

Hi Jack.

Thank you for your willingness to help!

My solution is as follows :

Maybe my wording had been previously incorrect but I have these 2 sub-projects TestExec and TestExecEnglish. TestExec builds correctly and creates an executable file. But when I build TestExecEnglish it should create a DLL file but it doesn't. I have cleaned and rebuilt numerous times, each one seprately as well as the whole solution.

I also notice that I do not have any References as your example does. Is this necessary?

I've been told that this solution had been built on VS 6 a few years ago so I assume that everything should be ok in the code itself.

Here is the printscreen of the properties for TestExecEnglish :

For me everything seems fine. Do you see anything out of the ordinary?

thanks!! :-)


Wednesday, April 9, 2014 1:07 PM

I should also add that I have another project that is very similar to this one.

They are somewhat related meaning that they are supposed to be used on the same device but they are 2 separate solutions.

It's a solution with 2 projects and each project is suppose to create a DLL file which is does without any problems.

From these 2 solutions I am suppose to have 2 DLL files from one solution and an executable file + DLL file from the second.

I hope I wasn't too confusing with all this. :-)


Thursday, April 10, 2014 2:49 AM

Hi rodrigojds,

Thanks for your friendly response.

Not the real VC++ Expert, I doubt that it would be related to your project type. Just to make this issue clearly, whether the solution is created by yourself? Do you get the dll file before if you run the same solution or in other machine?

Maybe you could test a simple sample in your side.

(1)Create a Win32 Console App.

(2)Add a Win32 Project in the same solution, note: when you create this project, please select dll like this screen shot1.

You would get the result like the screen shot 2

(3)Clean and rebuild your solution, please check whether you could get the exe file and dll file here.

If you could get it, so we could make sure that it is not your VS IDE issue, I doubt that it is your projects’ issue, maybe they are not the project type as our previous steps, if they are old version apps, I suggest you create two new projects, check it again. If still no help, I suggest you post this issue to the VC++ forum, you could share the two samples in your new case, so it would be helpful for the VC++ expert to repro/troubleshoot this issue. Thanks for your cooperation.

Best Regards,

We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.


Thursday, April 10, 2014 4:57 AM | 1 vote

Press the “Configuration Manager” button in the above image and check that the project is selected.

Also make sure that the project exports some symbols.

When you perform “Rebuild Solution”, do you see that the project is built in Output window?


Thursday, April 10, 2014 12:34 PM

I tried doing what you suggested and after building both files appeared (dll + exe).

I also posted this in the C++ forum to see if anybody can help me  on this one.

Thanks for your help! I really appreciate it!


Thursday, April 10, 2014 12:48 PM

Hi Viorel

Thank you for your reply. I checked the Configuration Manager and both have been selected to be built. I also tried selecting the projects individually but just like before, nothing happened.

How would I go about making sure that the project exports symbols? How can I check that?

When I rebuild the solution I see many warnings then I see the executable file is created and that's it. The final line says that 2 were successful, 0 failed and 0 skipped.


Thursday, April 10, 2014 5:23 PM | 1 vote

A console application that contains main will output an exe file.  A class project will output a dll file because it doesn't have a main.  Both a exe and dll file can contain symbols.  It may be debug option that need to be turned on which generates the sybols.  It has been years since I've gotten into the build options.  I suspect the output in the debug folder contain the symbols but the release folder may not.

jdweng