#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2001
    Location
    Long Beach, California
    Posts
    86
    Rep Power
    13

    Not a valid Win32 application?


    I made a C program. It's simple, but I got an error when running it on Windows98

    Ok, here is the source:

    #include <stdio.h>

    void main(void)
    {
    printf("Uploading virus...\a Complete!");
    getchar();
    }

    I compiled it on Linux with:

    cc -o virus.exe virus.c

    Is it because of the "-o" I added in there? I'm new to C and don't know much. Thanks for the help!
  2. #2
  3. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2001
    Location
    USA
    Posts
    286
    Rep Power
    13
    Linux object code and Windows object code are two completely different animals. Even though they both run on Intel processors (assuming you use Intel), the binary code is different. Unless you have a cross-compiler on Linux, you must use a Windows compiler to make a program that will run on Windows.
    Jon Sagara

    "Me fail English? That's unpossible!"

IMN logo majestic logo threadwatch logo seochat tools logo