Author Topic: Dynamic Library (.so) project wizard for C::B on Linux?  (Read 5400 times)

Offline irrdev

  • Single posting newcomer
  • *
  • Posts: 3
    • VirsoNet provides free online web designer utilities!
Dynamic Library (.so) project wizard for C::B on Linux?
« on: December 11, 2007, 07:06:52 am »
I have been using Code::Blocks on Windows for several years now. I recently made the switch to Ubuntu Linux, and have been using Code::Blocks ever since on this platform, too. However, I miss a project wizard for Dynamic Linux libraries. Currently there is only a wizard for the dated static libraries (.a files). I am not very well versed at scripting these wizards myself, and I was wondering if someone else could create such a wizard for inclusion into Code::Blocks nightlies? I am also curious to know if I am the only one missing this feature or not? For myself, I would definitely appreciate it. :wink:
Feed Launch .NET is an open-source feed editor and feed designer hosted on sourceforge.net. Both RSS 2.0 and ATOM 1.0 feeds are fully supported.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Dynamic Library (.so) project wizard for C::B on Linux?
« Reply #1 on: December 11, 2007, 07:47:57 am »
Have you tried to change the target type in "Properties... -> Build targets" from "static library" to "dynamic library" ?
You may perhaps have to fix the output name then.

Offline jarro_2783

  • Multiple posting newcomer
  • *
  • Posts: 99
    • Project Freedom
Re: Dynamic Library (.so) project wizard for C::B on Linux?
« Reply #2 on: December 13, 2007, 05:14:21 am »
They want a wizard though. The way you described is how you have to do it at the moment, however a wizard would be nice.

Offline cacb

  • Lives here!
  • ****
  • Posts: 536
Re: Dynamic Library (.so) project wizard for C::B on Linux?
« Reply #3 on: December 13, 2007, 04:48:27 pm »
They want a wizard though. The way you described is how you have to do it at the moment, however a wizard would be nice.

I agree, what I would like to see (if possible) is a wizard that generates a project for a .DLL target on Windows and a .so target on Linux. I have been using DLLs for a long time with MSVC on windows, but moving to C::B for Win and Linux. So far only a single executable project. I just made a static library project as I did not know how to make a DLL/so project. I will have a second look at the static lib options (thanks for that hint!), but a Dynamic Library wizard would be very welcome, I am quite sure  :lol:

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Dynamic Library (.so) project wizard for C::B on Linux?
« Reply #4 on: December 13, 2007, 06:00:48 pm »
I created a patch.
You can download it from http://jens.lody.name/debian/patches/sharedlib.patch.

After applying it to the source tree, you need to manually copy tghe two .png-files (logo.png and wizard.png) from "src/plugins/scriptedwizard/resources/staticlib" to "src/plugins/scriptedwizard/resources/sharedlib".

It creates no Debug and Release subdir in the moment, because it almost a copy of the staticlib-wizard.
But I will change this and upload a new patch. I think this evening.


Edit:
I changed it to a bzipped-file containing the patch itself and a shell-script that should copy the "missing" pngs and run bootstrap to create "configure.in" and the "Makefile.in"s.
I forgot this part in the first patch and tested only when compiling from within C::B not from console or via "dpkg-buildpackage" (on debian-baesd systems).

Download http://jens.lody.name/debian/patches/sharedlib_patch.tar.bz2.
"cd" into codeblocks sourcetree-root (the directory containing the bootstrap-script).
Type:
Code
tar -jxf <path_to>/sharedlib_patch.tar.bz2
then:
Code
./sharedlib_patch.sh
.

After finishing you should be able to build C::B in any way you normally do ("dpkg-builpackage"; ./configure -- ..., make, make install or whatever you prefer)

The wizard now creates a "bin/Release" and a "bin/Debug" subdir as default.
« Last Edit: December 13, 2007, 11:27:38 pm by jens »

Offline cacb

  • Lives here!
  • ****
  • Posts: 536
Re: Dynamic Library (.so) project wizard for C::B on Linux?
« Reply #5 on: December 13, 2007, 07:33:44 pm »
I created a patch.

Thanks for your efforts! I am wondering if such a Dynamic Library project wizard should have an option for linking against the wxWidgets libraries, similar to an ordinary project for a wxWidgets executable. It would be nice, but the main thing is to be able to make a Dynamic Library using a project wizard. Adding the libraries can be done manually.

I will try it when this wizard shows up in a Nightly Build  :D

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Dynamic Library (.so) project wizard for C::B on Linux?
« Reply #6 on: December 14, 2007, 12:00:09 am »
I am wondering if such a Dynamic Library project wizard should have an option for linking against the wxWidgets libraries, similar to an ordinary project for a wxWidgets executable. It would be nice, but the main thing is to be able to make a Dynamic Library using a project wizard. Adding the libraries can be done manually.

wxWidgets might not be the only interestant toolkit to bind to the wizard, that means there should be one for wxWidgets, opengl, fltk and so on.
I think then the project-wizard would need a redesign, perhaps choose the wxWidgets and then as a next step decide if you want a "normal" project or a static or a dynamic library.

I will try it when this wizard shows up in a Nightly Build  :D

If and when my (or a similar) wizard will become part of the nightlies will be decided by the C::B devs.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Dynamic Library (.so) project wizard for C::B on Linux?
« Reply #7 on: December 14, 2007, 04:22:42 pm »
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ