Running a Council Application without Code::Blocks

This is a discussion on Running a Council Application without Code::Blocks within the C++ Programming forums, part of the General Programming Boards category; I have completed a program that works and that I have run it using Code::Blocks by building and running the ...

  1. #1
    Registered User
    Join Date
    Feb 2011
    Posts
    3

    Arrow Running a Council Application without Code::Blocks

    I have completed a program that works and that I have run it using Code::Blocks by building and running the program. But i would like to be able to use the program on other computers without having to use code::blocks to run it. Dose anyone have any tips on how to make the program run on its own?

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,452
    You select "Release" as the build type, and then press the "build" icon.
    You then give people the executable file in your release build directory.

    If you've got a complicated set of dynamic libraries which are non-standard, we need more details.
    Attached Images Attached Images  
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
    Registered User
    Join Date
    Feb 2011
    Posts
    3

    Arrow

    There is nothing fancy about my code really. It just dose some calculations.
    here is the code for reference
    Code:
    #include <iostream>
    
    using namespace std;
    
    int main()
    {
      int choice;
      cout<< "Architecture Calculations\n" ;
      cout<< "1: Concrete calculation\n" ;
      cout<< "2: Beam calculations\n";
      cout<<"Enter the Number of Your Choice of Calculation.\n";
      cin>> choice;
      cin.ignore();
      cin.get();
            if (choice == 1) //choice Concrete calculations
            {
                float width, length, wallheight, wallthickness, floorthickness;
                cout<< "You enetred concrete calculation. \n";
                cout<< "Remember to Convert Inches to the Decimal Equivelent\n";
                cout<< "4 Inches = .333 \n";
                cout<< "8 Inches = .666 \n";
                cout<< "10 Inches = .8333 \n";
                cout<< "16 Inches = 1.333 \n";
                cout<< "20 Inches = 1.666\n";
                cout<< "Please Enter the Width of the Foundation\n";
                cin>> width;
                cin.ignore();
                cout<< "Please Enter the Length of the Foundation\n";
                cin>> length;
                cin.ignore();
                cout<< "Please Enter the Foundation Wall Thickness\n";
                cin>> wallthickness;
                cin.ignore();
                cout<< "Please enter the Foundation Wall Height\n";
                cin>> wallheight;
                cin.ignore();
                cout<< "Please enter the Foundation Floor Thickness\n";
                cin>> floorthickness;
                cin.ignore();
    
                float a, b, c, totallength, cubicwall, g, cubicfooter, h, l, w, cubicfloor, cubicfoot, exactvalue;
                a = length + width;
                b = a * 2;
                c = 4 * wallthickness;
                totallength = b - c ;
                cubicwall = totallength * wallthickness * wallheight ;
                g = wallthickness * 2;
                cubicfooter = g * wallthickness * totallength ;
                h = 2 * wallthickness;
                l = length - h ;
                w = width - h ;
                cubicfloor = l * w * floorthickness ;
                cubicfoot = cubicfloor + cubicfooter + cubicwall ;
                exactvalue =  cubicfoot / 27 ;
    
    
    
    
                cout<< "\n";
                cout<< "Width of Foundation: " << width << " ft\n";
                cout<< "Length of Foundation: " << length << " ft\n";
                cout<< "Foundation Wall Thickness: " << wallthickness << " ft\n";
                cout<< "Foundation Wall Height: " << wallheight << " ft\n";
                cout<< "Foundation Floor Thickness: " << floorthickness << " ft\n\n\n";
                cout<< "Final Calculations \n \n \n" ;
                cout<< "Foundation Wall Total Volume: " << cubicwall << " (ft^3)\n";
                cout<< "Foundation Footer Total Volume: " << cubicfooter << " (ft^3)\n";
                cout<< "Foundation Floor Total Volume: " << cubicfloor << " (ft^3)\n";
                cout<< "Total Yards of Concrete: " << exactvalue << " (yd^3)\n";
                cout<< "For Any Questions, Comments, or Suggestuions Contact the Designer at \n Rssguar@gmail.com";
        }
            else {
            cout << "There Has Been An Error \n Please Only Enter '1' or '2' \n Please Exit and Try Again \n THANK YOU \n For Any Questions, Comments, or Suggestuions Contact the Designer at \n Rssguar@gmail.com \n ~RssGuar";
            }
    
    
    
    }

    When I tested to see if the application from the release folder worked I got this system error
    the program can't start because libgcc_s_dw2-1.dll is misssing from your conputer. Try reinstalling the program to fix this problem.
    I'm not sure why this is but is that only because im trying to run on my couputer?
    If I send just that file to someone will it run?

  4. #4
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,452
    Google search the DLL in question.

    Eg.
    Removing dependencies for mingwm10.dll and libgcc_s_dw2-1.dll,static linking?
    NetBeans Forums - Problem compiling C++ aplication - missing libgcc_s_dw2-1.dll HELP!!! T_T

    Some suggest that you use the "-static" option to link the library (rather than the DLL) to remove the dependency.

    Others suggest that it may be a "threads" issue. What kind of project did you create? Was it a console program?
    Look for "-mthreads" in makefiles.

    Oh, and before you start editing further, make sure you have a backup!

    Since you're just using iostream (and nothing fancy), you should be able to just do this on the command line (ignore the IDE).
    g++ -o myprog.exe prog.cpp

    IDE's are great, but they do hide a lot of detail you should know about, from doing it "the hard way" from the command line.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  5. #5
    Registered User
    Join Date
    Feb 2011
    Posts
    3
    Thank you. I downloaded the two missing .dll files and now the program runs.
    Im at school and on a school computer and the program runs almost all the way. It lets me enter all the dimensions but when the program gets to the actual calculations it closes(or displayes the calculations and closes so fast that I cant tell. Do you have any idea why this happens?

    Also another problem im having with the school computer is that Code::Blocks is not finding the compliers on the network and I would like to not have to use Code::blocks anymore you said:
    IDE's are great, but they do hide a lot of detail you should know about, from doing it "the hard way" from the command line.
    What would you recommend that I should use instead of using an IDE? (the programs and compliers that you would recomment that download and use)



    Thank you so much for your time. I hope im not too much of a bother.
    -Rssguar

  6. #6

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Shell extensions and single application instance
    By Niara in forum Windows Programming
    Replies: 8
    Last Post: 10-18-2010, 03:32 PM
  2. running application from command prompt
    By l2u in forum C++ Programming
    Replies: 4
    Last Post: 04-01-2007, 04:24 AM
  3. MFC run application by clicking on file...
    By dug in forum Windows Programming
    Replies: 4
    Last Post: 12-02-2004, 03:33 AM
  4. running an application
    By 1976 in forum Windows Programming
    Replies: 1
    Last Post: 11-12-2001, 03:17 AM
  5. Win application not very portable
    By swed in forum Windows Programming
    Replies: 5
    Last Post: 10-01-2001, 11:17 AM

Tags for this Thread


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21