Find the answer to your Linux question:
Results 1 to 5 of 5
Hey, I want to know can I make an exe file from c++ code in one computer with I686 Processor and gcc version 4.1.2 redhat and then run my exe ...
  1. #1
    shk
    shk is offline
    Just Joined!
    Join Date
    Jun 2010
    Posts
    12

    Exe file in Linux

    Hey,

    I want to know can I make an exe file from c++ code in one computer with I686 Processor and gcc version 4.1.2 redhat and then run my exe file in my board that has Pyramid linux with I586 Processor and no gcc?

    Because when I run the created exe file in my board it gives me " Floating point exception" Error!


    Thanks for your help,
    Shabnam

  2. #2
    Linux Newbie
    Join Date
    Apr 2010
    Location
    Novosibirsk, Russia
    Posts
    136
    Quote Originally Posted by shk View Post
    Hey,

    I want to know can I make an exe file from c++ code in one computer with I686 Processor and gcc version 4.1.2 redhat and then run my exe file in my board that has Pyramid linux with I586 Processor and no gcc?

    Because when I run the created exe file in my board it gives me " Floating point exception" Error!


    Thanks for your help,
    Shabnam
    O_o exe file?.. *scratch* if you need to compile some code at one Linux machine and run it on another Linux (as I understood), and only arch is different, then compile it on i686 machine with options for i585. Where there could be an exe file?..

  3. #3
    Linux Engineer rcgreen's Avatar
    Join Date
    May 2006
    Location
    the hills
    Posts
    1,114
    From the gcc man page.

    Intel 386 and AMD x86-64 Options

    These -m options are defined for the i386 and x86-64 family of computers:
    -mtune=cpu-type
    Tune to cpu-type everything applicable about the generated code, except for the ABI and the set of available instructions. The choices for cpu-type are:
    generic
    Produce code optimized for the most common IA32/AMD64/EM64T processors. If you know the CPU on which your code will run, then you should use the corresponding -mtune option instead of -mtune=generic. But, if you do not know exactly what CPU users of your application will have, then you should use this option.

    As new processors are deployed in the marketplace, the behavior of this option will change. Therefore, if you upgrade to a newer version of GCC , the code generated option will change to reflect the processors that were most common when that version of GCC was released.

    There is no -march=generic option because -march indicates the instruction set the compiler can use, and there is no generic instruction set applicable to all processors. In contrast, -mtune indicates the processor (or, in this case, collection of processors) for which the code is optimized.
    i386
    Original Intel's i386 CPU .
    i486
    Intel's i486 CPU . (No scheduling is implemented for this chip.)
    i586, pentium
    Intel Pentium CPU with no MMX support.
    pentium-mmx
    Intel PentiumMMX CPU based on Pentium core with MMX instruction set support.
    pentiumpro
    Intel PentiumPro CPU .
    i686
    Same as "generic", but when used as "march" option, PentiumPro instruction set will be used, so the code will run on all i686 familly chips.
    Set an option to generate an executable that will run
    on the processor you want to target.

    BTW, when you say EXE I take it you mean "Executable"
    Some might think you were talking about Microsoft EXE files.

  4. #4
    shk
    shk is offline
    Just Joined!
    Join Date
    Jun 2010
    Posts
    12
    Thanks a lot for your help.

    I will check it tomorrow and tell you all the result

  5. #5
    Linux Newbie
    Join Date
    Apr 2010
    Location
    Novosibirsk, Russia
    Posts
    136
    You're welcomed

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...