Click here to Skip to main content
Rate this: bad
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

1 solution

Rate this: bad
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.
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 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 490
1 Sergey Alexandrovich Kryukov 405
2 Maciej Los 310
3 ProgramFOX 265
4 CHill60 200
0 OriginalGriff 490
1 Sergey Alexandrovich Kryukov 405
2 Maciej Los 285
3 ProgramFOX 265
4 Peter Leow 210

Advertise | Privacy | Mobile
Web03 | 2.8.150331.1 | Last Updated 2 Apr 2013
Copyright © CodeProject, 1999-2015
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