Moving from Windows to Ubuntu.

Posted by djzmo on Stack Overflow See other posts from Stack Overflow or by djzmo
Published on 2010-05-02T19:46:40Z Indexed on 2010/05/02 19:57 UTC
Read the original article Hit count: 224

Filed under:
|
|

Hello there,

I used to program in Windows with Microsoft Visual C++ and I need to make some of my portable programs (written in portable C++) to be cross-platform, or at least I can release a working version of my program for both Linux and Windows.

I am total newcomer in Linux application development (and rarely use the OS itself).

So, today, I installed Ubuntu 10.04 LTS (through Wubi) and equipped Code::Blocks with the g++ compiler as my main weapon. Then I compiled my very first Hello World linux program, and I confused about the output program.

I can run my program through the "Build and Run" menu option in Code::Blocks, but when I tried to launch the compiled application externally through a File Browser (in /media/MyNTFSPartition/MyProject/bin/Release; yes, I saved it in my NTFS partition), the program didn't show up.

Why? I ran out of idea.

I need to change my Windows and Microsoft Visual Studio mindset to Linux and Code::Blocks mindset.

So I came up with these questions:

  1. How can I execute my compiled linux programs externally (outside IDE)?
    • In Windows, I simply run the generated executable (.exe) file
  2. How can I distribute my linux application?
    • In Windows, I simply distribute the executable files with the corresponding DLL files (if any)
  3. What is the equivalent of LIBs (static library) and DLLs (dynamic library) in linux and how to use them?
    • In Windows/Visual Studio, I simply add the required libraries to the Additional Dependencies in the Project Settings, and my program will automatically link with the required static library(-ies)/DLLs.
  4. Is it possible to use the "binary form" of a C++ library (if provided) so that I wouldn't need to recompile the entire library source code?
    • In Windows, yes. Sometimes precompiled *.lib files are provided.
  5. If I want to create a wxWidgets application in Linux, which package should I pick for Ubuntu? wxGTK or wxX11? Can I run wxGTK program under X11?
    • In Windows, I use wxMSW, Of course.
  6. If question no. 4 is answered possible, are precompiled wxX11/wxGTK library exists out there? Haven't tried deep google search.
    • In Windows, there is a project called "wxPack" (http://wxpack.sourceforge.net/) that saves a lot of my time.

Sorry for asking many questions, but I am really confused on these linux development fundamentals.

Any kind of help would be appreciated =)

Thanks.

© Stack Overflow or respective owner

Related posts about c++

Related posts about Windows