Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4381932
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T12:42:48+00:00 2026-05-21T12:42:48+00:00

I have an updated cygwin-full install ,mingw ,codeblocks on a windows system. i have

  • 0

I have an updated cygwin-full install ,mingw ,codeblocks on a windows system.
i have a c++ program which performs xml generation based on input.

I understand to build an executable file for unix we use makefiles. makefiles being typical project files .
Hence i used the plugin cbp2make.exe to get the makefile for the cbp project file. and i tried to execute make in cygwin. hoping to get a linux executable file. but this was clearly wrong.

a typical test c++ test program test.c would be compiled in cygwin using gcc cross compile options like.

g++-linux -o test test.c

this would give us the linux executable file test or if no name is specified it would give an a.out

This is all well and good for a simple c++ program with no included header files.

I understand when we are dealing with c++ files with lot of external library files a simple g++ -o ourprojfile.exe ourprojectfile.cpp does not work hence we would need to use make files. Question 1 : Am i wrong in assuming this ?*

Question 2: how can we setup cross compile to get a linux executable file directly from codeblocks.


Update : the problem at my end seems to be missing dependent cpp files which i assumed i included in the main file.
The solution was to include them in the main file or simply write handle like so

g++-linux myprog_linux main.cpp first.cpp second.cpp third.cpp 

The problem now is after i get the Linux executable file.
when i try to run it on linux machine i get the error of a

 /usr/local/folder/myfile/my_prog_nix: error while loading shared libraries: 
libstdc++.so.5: cannot open shared object file: No such file or directory

what sort of linking do i need to do clear this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T12:42:49+00:00Added an answer on May 21, 2026 at 12:42 pm

    You are wrong assuming that you need makefile. Any builder will do. The important point is, that you have to tell the builder to:

    • Call g++linux instead of g++ (or mingw-g++ or whatever it’s calling)
    • Set proper path to look for includes and libraries. The compiler will know where to look up system libraries that came with it on it’s own, so you just have to deal with any extra stuff you have.

    Normally makefiles call the compiler given in CC for C sources and CXX for C++ sources and passes them content of CFLAGS and CXXFLAGS as additional arguments respectively. But you can probably just tell CodeBlocks (but I never used it, so I don’t know) to call different compiler and avoid all the make business.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a ticker which items are updated using polling. I have written a
I have a database that i'm dealing with which is updated every few hours
I updated a working Cygwin/Screen setup on Windows 2k3 Server to Cygwin v1.7.2 and
I have updated to latest Django version 1.0.2 after uninstalling my old Django version.But
The table doesn't have a last updated field and I need to know when
I have a .csv file that is frequently updated (about 20 to 30 times
I have an application that is installed and updated via ClickOnce. The application downloads
I have a list view that is periodically updated (every 60 seconds). It was
I have a SQL Server 2000 database instance that is rarely updated. I also
I have an auditing trigger that automatically places the time something was updated and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.