I have multiple C++ source code files that I have built using GNU GCC Compiler. Each was debugged separately and then linked to the final Shared Object .so file which is 2Mb in size.

My source files are not small.

I now want to build a Win32 .dll for exporting to Windows.

Which is why I installed Code::Blocks v13.12 using the GCC compiler to build since in command line it would not be easy to debug any errors and warnings.

My problem is the File > New > Project dialogue does not have the option for building a dynamic linked library.

Can someone help me with the command to install a version that supports building export libraries.


  • What is the build system? CMake? Makefiles? Does the library depend on other libraries? – Velkan Sep 25 '16 at 16:36
  • I tried everything including creating a project with Visual Studio on Windows and then opening it using Code::blocks, but the result is the same. It builds an .so file instead of a .dll file. – loumbut5 Sep 26 '16 at 14:00
  • If you're running Ubuntu and want to build for Windows - it's called cross-compilation. And it's not straightforward. You'll need a cross-compiler like MinGW or a cross-build-environment like MXE. You'll also need to compile and link without any IDE like Code::Blocks (it's easier to fix build problems without IDE). – Velkan Sep 27 '16 at 6:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.