Click here to Skip to main content
15,887,821 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a simple C++ code written in netbeans 7.3. How can I create a dll of this code?
Posted

1 solution

Right click on your project in the projects list, select properties and then select Build from the tree on the left of the Properties dialog.
In the right hand pane you will see Configuration Type as one of the items, select Dynamic Library from the drop down list to the right. Now your projec will build as a Dll on Windows.
 
Share this answer
 
Comments
AsthaS 1-Apr-13 8:06am    
I have tried it. But its taking infinite time. I don't know what actually the problem is?? M totally clueless.
Matthew Faithfull 1-Apr-13 10:43am    
That sounds like a bug in Netbeans or withit being Java based perhaps a shortage of memory. I'd try any updates for Netbeans and then a full machine reboot, restart Netbeans and try a clean and rebuild on the project. Task Manager should tell you if Java is eating all your RAM. I'm still on Netbeans 7.1 on Windows but it builds Dlls just fine and Netbeans 7.3 on 64bit Open Suse builds shared libraries happily too.
It's overkill for solving your problem but my latest Code Project article http://www.codeproject.com/Articles/540062/QOR-Compiler-Aspect has a Netbeans project that although it currently builds a static library, will just as happily build a DLL with a change of configuration type.
AsthaS 2-Apr-13 1:00am    
Thanxx a lot... Finally It worked....:)
AsthaS 2-Apr-13 2:36am    
I am becoming greedy...can u please help me on how can i consume this dll in my code. Thanxx in advance.!!
Matthew Faithfull 2-Apr-13 6:42am    
I can tell you it will work the same as every other Dll, that you have 2 options to use it, implicit linking and explicit loading and that it would be a good idea to get hold of a tool like depends or get familiar with use of Dumpbin so that if there are any problems you can chek the binary interface of the Dll. I can tell you to be careful about name mangling and to use 'C' calling convention to avoid it where more than one compiler is involved. However I suggest that you give it a go and if you get stuck post another question so smarter people can help too.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900