Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C++ DLL netbeans
I have a simple C++ code written in netbeans 7.3. How can I create a dll of this code?
Posted 31-Mar-13 21:48pm
AsthaS453

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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.
  Permalink  
Comments
Member 9942467 at 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 at 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 at 2-Apr-13 1:00am
   
Thanxx a lot... Finally It worked....:)
AsthaS at 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 at 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.
AsthaS at 2-Apr-13 7:02am
   
Ok .. Thanxx anyways...!!

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

  Print Answers RSS
0 OriginalGriff 480
1 Maciej Los 290
2 Richard MacCutchan 225
3 BillWoodruff 185
4 Suraj Sahoo | Coding Passion 155
0 OriginalGriff 8,764
1 Sergey Alexandrovich Kryukov 7,437
2 DamithSL 5,639
3 Maciej Los 5,279
4 Manas Bhardwaj 4,986


Advertise | Privacy | Mobile
Web03 | 2.8.1411028.1 | Last Updated 2 Apr 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100