C++ compiled programs won't run in windows

I've been learning C++ for a week or two now, getting a good hang of it. I just use Kate as my editor and g++ to compile the program. It all runs fine under linux, but I'm not sure how to make a program to execute easily (terminal) in windows. So if the program runs in terminal on Linux should it run in a DOS window on windows? What do I need to do to allow my little apps to work properly under windows?

pecan wrote:I've been learning C++ for a week or two now, getting a good hang of it. I just use Kate as my editor and g++ to compile the program. It all runs fine under linux, but I'm not sure how to make a program to execute easily (terminal) in windows. So if the program runs in terminal on Linux should it run in a DOS window on windows? What do I need to do to allow my little apps to work properly under windows?
You have to recompile your source code under Windows.

Similar Messages

  • Compiled program won't run

    Hey everyone, I'm trying to compile a program that I wrote, but I cannot get it to come up. In command prompt, I set the directory to where I have the program saved:
    C:\Java
    I already have the path set to:
    c:\program files\java\jdk1.6.0_13\bin
    When I compile the program (javac MyProgram.java), it will compile without an error, but when I go to run it (MyProgram.java), it will open the code from Notepad.
    I hope this makes sense. This has not been a problem up until this week, so I don't know what could've changed in my settings. Everything looks the same as it has always been. Any suggestions?
    Thanks,
    Dave

    imagine_1009 wrote:
    Hey everyone, I'm trying to compile a program that I wrote, but I cannot get it to come up. In command prompt, I set the directory to where I have the program saved:
    C:\Java
    I already have the path set to:
    c:\program files\java\jdk1.6.0_13\bin
    When I compile the program (javac MyProgram.java), it will compile without an error, but when I go to run it (MyProgram.java), it will open the code from Notepad.
    I hope this makes sense. This has not been a problem up until this week, so I don't know what could've changed in my settings. Everything looks the same as it has always been. Any suggestions?You are trying to execute the sourcecode, which will load the the textfile into an associated editor (notepad in your case). You might want to read up on the tutorial: [http://java.sun.com/docs/books/tutorial/getStarted/cupojava/win32.html]

  • My Compiled Program Won't Run

    I am relatively new to Java. I am having a problem with a very simple program I decided would be my first. I am able to compile it but it will not run. Here is the code.
    //A Very Simple Example
    class ExampleProgram {
    public static void main(String args[]){
    System.out.println("I'm a Simple Program");
    It will compile so that I may recieve my .class file but when I use DOS to open it. DOS writes "Exception in thread "main" java.lang.NoClassDefFoundError: Example Program."
    I'm sure this is a runtime error but besides that I have not found anything that will help me fix the problem. I would be greatful for any help.

    Is that the exact error?
    Did you run it as
    java Example Program
    (that's what it looks like)
    try:
    java ExampleProgram
    ~David
    If not, it relates to the 'classpath' issue, well documented, and asked at least 1000 times prior in this forum (see the search engine on the top right corner?)

  • HT204048 Is there any way at all to install Windows 7 32 bit onto a MacBook Pro 13 in Retina Late 2013?  The windows software I need won't run on Windows 7 64 bit.

    Is there any way at all to install Windows 7 32 bit onto a MacBook Pro 13 in Retina Late 2013? The windows software I need won't run on Windows 7 64 bit.

    Not using Boot Camp, but you should be able to using virtualization software such as Parallels to run Windows concurrently with OS X.

  • Hi, I have adobe acrobat 6.0 but it won't run on windows 7, is there an update availabe?

    Hi, I have adobe acrobat 6.0 but it won't run on windows 7, is there an update availabe?

    I agree with Doc, but there may be a work around. Actually, your best solution is to just buy AA XI. The work around depends on what you mean by does not work. Do Acrobat and Distiller both install and appear to function? Is the problem one of not being able to print? If both of these answers are yes, then you can install an independent PS printer (maybe one from Adobe or one of the HP color PS printers), change the name to Adobe PDF for your use (not required), and change the port to FILE. Then to create a PDF you would print to that printer and open the file created in Distiller to create a PDF file. May or may not work. However, AA6 is so old, it is likely to cause other problems, even if this process works. If nothing else, it will not open some of the newer PDFs that are being created today (at least I would guess that will be the case). So buying XI is really in order.
    Other issues that may crop up will be activation (will likely fail) and updates that have to be obtained from the FTP site and not the web.

  • HP Utility won't run in Windows 7

    The HP Utility application for an HP Designjet Z3200 won't run in Windows 7. I browse to the application and nothing happens when I try to open it. I've rebotted several times as well as uninstalled and reinstalled the latest version of the app downloaded from HP.
    Anyone have any clues as to why this is happening?
    Tony

    This forum is focused on consumer level products.  For the Designjet you may have better results posting in the HP Designjet forum here.
    Bob Headrick,  HP Expert
    I am not an employee of HP, I am a volunteer posting here on my own time.
    If your problem is solved please click the "Accept as Solution" button ------------V
    If my answer was helpful please click the "Thumbs Up" to say "Thank You"--V

  • Flash Player won't  run. Windows 7, IE9, Firefox 16.01

    Flash Player won't  run. Windows 7, IE9, Firefox 16.01. I use the flash player uninstaller, make sure there are no flash player sub-folders reinstall current version, says installed .. no "video" no box, no info. redone several times both in Firefox and IE

    Did you install both the ActiveX (for Internet Explorer) and plugin (for Firefox)?  And both browsers show the same problem?
    On Internet Explorer
    is Shockwave Flash object enabled (http://forums.adobe.com/thread/885448)?
    is ActiveX Filtering disabled (http://forums.adobe.com/thread/867968)?

  • My accounts program won't run without legacy Java SE6 runtime since I upgraded to OS x Yosemite but I can't download it

    My "Solar" accounts program won't run without "legacy Java SE6 runtime" since I upgraded my iMac desktop to OS x Yosemite but I can't download it, nothing happens when you click on the link to apple support

    Okay, I'm not a Genius, but, I'm smarter than the one I spoke to at the Apple Store.They told me that they couldn't help me with Legacy Java SE6 Runtime. Adobe has the worst support in the industry so don't call them.
    If you have a Time Machine backup, go to one that pre dates your install of Yosemite. Go to the System/Library/Java and drag copy the folder to your internal hard disk. Now you will need the Administrator password. Once copied, drag the old Java folder into your System/Library folder and when asked to replace, click OK. Restart your Mac and you will have use of your software that requires Legacy Java SE6 Runtime.
    I'm totally done with Apple since they are trying to box me into a corner. Have fun kids.

  • I have Dell XPS (windows 8.1): error: "this program won't run on this pc"

    Greetings, I just purchased a Dell XPS with Windows 8.1. I have tried to load Irfanview, Kompozer, FileZilla, and other software that I have run, most on XP and even on MacOS, but the downloaded software will not run or install on my new Windowx 8.1. This
    is terribly frustrating! I also don't understand why there is no "start" button that leads you to the software you have installed. 
    Please help. Thank you. 

    Press the Windows key on your keyboard.
    To get Start menu press + X
    Further references
    Where is the Start menu?
    If you wish to get the conventional  Start button  then download and install
    Classic Shell
    some older programs might run poorly or not run at all. If an older program doesn't run correctly or doesn't install, start the Program Compatibility Wizard, which simulates an earlier version of Windows. You can :-
    Make older programs compatible with this version of Windows
    S.Sengupta, Windows Entertainment and Connected Home MVP

  • My VSB program won't run in XP. No clue why (no crash, no error.)

    I've written other programs that run under XP/7/8 just fine. But this latest project, when I run it under XP (from a VM), nothing happens.
    No error. No crash. It just never runs! I tried setting the .Net Framework to 3.5 as always (though it really doesn't need .Net), but it made no difference.
    Any ideas why? Are there controls XP just doesn't support? My first app to use "ListView" and "ObjectList" objects if that matters. :(
    App runs perfectly under Win 7 & 8.

    VS 2013 cannot be installed on Windows XP.  Neither can VS 2012.  If you try to run a program created with VS 2012 or 2013 in Windows XP, it will not work!.  It is simply not compatible.  You need to recreate the program from scratch
    in VS 2010 in order to run it in Windows XP.
    I am running both Windows XP and Windows 7 on the same computer, with 2 partitions.  I am more comfortable with Windows XP, but was required to use the newer version of VS for school.  When I tried to install VS 2012, it refused.  I had no
    other choice but to use Windows 7, and I am going back and forth between the 2 operating systems.  That's how I was able to answer your question.
    Solitaire
    Solitaire,
    Are you saying that if you create a program in the latest version of VS, even if you target an earlier version like framework 3.5
    and also set it to compile for x86 (32-bit), that it will not work on XP?
    If so then that make no sense, but ... I don't know.
    Still lost in code, just at a little higher level.

  • Program won't run

    I am currently reading "Sam's teach yourself Java 2 in 21 days", and I followed the instructions for programming the "VolcanoApplication" (the files can be found here http://www.cadenhead.org/book/java-21-days/chapter.php/1 and are called VolcanoRobot and VolcanoApplication). I compiled the two programs, but VolcanoApplication won't run. I get an error message saying "Exception in thread "main" java.lang.NoClassDefFoundError: volcanoapplication/class"

    I copied the two files, compiled them and had no problem running VolcanoApplication. To try to narrow down your problem, do the following:
    1. Check the names of both files to make sure that they are called VolcanoApplication.java and VolcanoRobot.java. 
    Make sure there are no typos because the file name must exactly match the class name.  This includes case.
    2. Before trying to recompile, first erase the old .class files.  Go to the directory that contains the files
    and issue the command: "javac VolcanoApplication.java".  This should compile both files. 
    The javac command should complete with no errors.  Now check your directory, you should see
    VolcanoApplication.class and VolcanoRobot.class in your directory.
    3. From the same directory, issue the command "java VolcanoApplication".  Again, make sure there are no typos. 
    It should execute the program and print out some stuff.

  • ITunes won't run - invisible window where iTunes should be, but it never launches.

    I'm running Windows Vista 32 (I know, I should upgrade) and over the last few weeks, I noticed that my podcast wasn't downloading new eps.   Now, iTunes won't run at all.
    I've done a full scan of the PC and there are no viruses found.   I'm using Kaspersky.
    I've un-installed all Apple apps and rebooted before trying to reload iTunes and it never runs.
    Anyone have any idea what might be preventing iTunes from running?
    I have a Windows 7 PC on the other desk, connected through the same switch and Cable Modem and iTunes is running fine on it, so it's not network / internet related, as far as I can tell.
    Thank you,
    J

    "The feature that you are trying to use is on a network resource that is unavailable. Click OK to try again or enter an alternate path to another folder containing the installation package iTunes.msi in the box below"
    Let's just run through the standard procedures for that one again, just to be sure.
    first, head into your Add/Remove programs and uninstall your QuickTime. if it goes, good. if it doesn't, we'll just attend to it when we attend to itunes.
    next, download and install the Windows Installer CleanUp utility. Then use it to clear any existing itunes and/or QuickTime installation configuration information from the PC. (Launch CleanUp, find any iTunes and/or QuickTime entries in the list of programs in CleanUp, and remove those entries.)
    Description of the Windows Installer CleanUp Utility
    next, use the the following document as a guide for manual removal of leftover itunes and quicktime program files:
    Removing iTunes and QuickTime for Windows
    now try another itunes install. does it go through properly this time?
    (If any step of this procedure failed to work, explain to us as best you can what the problem was.)

  • Itunes installer won't run in Windows 7

    I am trying to install the latest version of itunes on my new laptop and the installer won't run.  It is a samsung sereis 7 notebook running Windows 7.
    I have downloaded itunes multiple times and tried running as administrator.  I do not get any error, and occasionally a progress bar will flash up on screen for a couple of seconds but then nothing happens.  Other times I don't even get the progress bar, just nothing happens when I try to open the installer.
    Would appreciate any help with this problem.  Its driving me crazy not being able to add new music to my ipod!

    This forum is focused on consumer level products.  For the Designjet you may have better results posting in the HP Designjet forum here.
    Bob Headrick,  HP Expert
    I am not an employee of HP, I am a volunteer posting here on my own time.
    If your problem is solved please click the "Accept as Solution" button ------------V
    If my answer was helpful please click the "Thumbs Up" to say "Thank You"--V

  • Visual Studio 2012 MFC C++ Win32 Compiled Application wouldn't run on Windows XP... FIXED!

    Converted a large Visual Studio 2005 MFC C++ Win32 Application to Visual Studio 2012.
    The compiled Win32 Application worked fine in Windows 7 and Windows 8 but not Windows XP.
    Found these 2 links which were very helpful on fixing the issue.
    http://blogs.msdn.com/b/vsnetsetup/archive/2012/10/16/setup-exe-is-not-a-valid-win32-application.aspx
    http://stackoverflow.com/questions/13051605/winforms-not-a-valid-win32-application
    So now my application compiles and works properly in Windows XP, Windows 7, and Windows 8.
    Just thought this might be helpful to someone else that may end up with the same issue.
    BillNew
    DirectShow Filter Graph Spy: http://alax.info/blog/777 Extremely helpful for finding deep details for DirectShow Graphs.

    VF,
    Sounds like a plan.
    We are experimenting with Visual Studio 2012 on the Metro Style for our applications. So far, Windows 8 and Metro Style are extremely frustrating to me.
    Have VS2003 and VS2005 which is where most of our executable program code has been generated.
    We also have VS2008, VS2010, and VS2012.
    The ultimate goal was / is to convert a very large MFC C++ Program from VS2005 into VS2012 Metro Application... and VS2012 is fighting me every step of the way... Mostly linker errors at the moment... and that is just trying to do the DirectX Initialization
    for a Video Window without building the Video Graph.
    Oh well... The fight continues!
    BillNew
    DirectShow Filter Graph Spy: http://alax.info/blog/777 Extremely helpful for finding deep details for DirectShow Graphs.

  • Programs won't run after update to 10.6.7

    Hi
    I have just inherited an early 2008 iMac following my Dad's death a few months ago. So I have no Mac experience at all. On receiving it, I booted it up and a list of recommended software updates appeared which I ran, and by all accounts successfully installed. One of them was an update to 10.6.7
    Previous to the update I could access the installed programs. Now I can access barely any of them.
    Error message reads:
    Application name cannot open.
    Check with the developer to ensure this version of application name works with this version of Mac OS X. You may need to reinstall the application. Be sure to install any available updates for the application and Mac OS.
    There aren't any further updates needed. Every time I check, I'm advised everything is uptodate. So last night I reinstalled iTunes, downloading the latest version. That won't run. Same error message.
    I'm unsure what to do now. I don't have any disks etc at the moment as Mum is still trying to locate them (they had more than one property and this has come out of one that has been boxed up and put onto the market).

    This is a typical error report. The section I have bolded out seems to be common in all the errors.
    Process:         iTunes [500]
    Path:            /Applications/iTunes.app/Contents/MacOS/iTunes
    Identifier:      com.apple.iTunes
    Version:         ??? (???)
    Build Info:      iTunes-10221201~1
    Code Type:       X86 (Native)
    Parent Process:  launchd [105]
    Date/Time:       2011-05-11 06:38:32.490 +0100
    OS Version:      Mac OS X 10.6.7 (10J869)
    Report Version:  6
    Interval Since Last Report:          15167 sec
    Crashes Since Last Report:           305
    Per-App Crashes Since Last Report:   6
    Anonymous UUID:                      DCCD367C-006F-4EEF-8457-3885D045DBBE
    Exception Type:  EXC_BREAKPOINT (SIGTRAP)
    Exception Codes: 0x0000000000000002, 0x0000000000000000
    Crashed Thread:  0
    Dyld Error Message:
      Library not loaded: /System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox
      Referenced from: /Applications/iTunes.app/Contents/MacOS/iTunes
      Reason: no suitable image found.  Did find:
              /System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox: unknown file type, first eight bytes: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
              /System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox: unknown file type, first eight bytes: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    Binary Images:
    0x8fe00000 - 0x8fe4162b  dyld 132.1 (???) <1C06ECD9-A2D7-BB10-AF50-0F2B598A7DEC> /usr/lib/dyld
    Model: iMac8,1, BootROM IM81.00C1.B00, 2 processors, Intel Core 2 Duo, 2.8 GHz, 4 GB, SMC 1.30f1
    Graphics: ATI Radeon HD 2600 Pro, ATI Radeon HD 2600 Pro, PCIe, 256 MB
    Memory Module: global_name
    AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x8C), Broadcom BCM43xx 1.0 (5.10.131.36.9)
    Bluetooth: Version 2.4.0f1, 2 service, 19 devices, 1 incoming serial ports
    Network Service: AirPort, AirPort, en1
    Serial ATA Device: Hitachi HDP725032GLA380, 298.09 GB
    Parallel ATA Device: MATSHITADVD-R   UJ-875
    USB Device: Built-in iSight, 0x05ac  (Apple Inc.), 0x8502, 0xfd400000
    USB Device: IR Receiver, 0x05ac  (Apple Inc.), 0x8242, 0x5d100000
    USB Device: BRCM2046 Hub, 0x0a5c  (Broadcom Corp.), 0x4500, 0x1a100000
    USB Device: Bluetooth USB Host Controller, 0x05ac  (Apple Inc.), 0x820f, 0x1a110000

Maybe you are looking for

  • I get an error message when trying to install recommended update

    I get an error message in many instances; cropping photo; editing photo; trying to caption a photo; unable to install Windows upgrade, etc.

  • Newbie, video not smooth

    I am new in OSMF development. I created a video player with F4M format. but that happens with the video is not smooth. displacement between the bitrate does not happen. Which part should I change in the OSMF library, I use flash builder to create OSM

  • Oracle9i Personal Edition - how to startup after DOWNLOAD

    So that we may better diagnose DOWNLOAD problems, please provide the following information. - Server name - Filename - Date/Time - Browser + Version - O/S + Version - Error Msg I downloaded the following product from your site today, Aug.17, 2002: Or

  • Wrongly debited expenses instead of asset

    Hi experts, Please suggest, here the user has wrongly debit expense instead of asset. It has been done though PO. Here, now i wan to be create an asset and how it will be done in sap.  Regards, Sudha

  • Acrobat can't open this file

    Documents i receive a message telling me I cant open this file because  The document "HFB.pdf" coiuld not be opened.   Acrobat can open fiiles in the "Adobe PDF document" format. 1. What causes this message? 2. Is there  a workaround? I have already