Find the answer to your Linux question:
Results 1 to 6 of 6
I have some code that was made in winders visual c++ and i want to compile it in linux. Here's the problem, every line of code seems to have a ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux User
    Join Date
    Nov 2002
    Posts
    420

    Compiling open source made in Visual c++ in linux


    I have some code that was made in winders visual c++ and i want to compile it in linux. Here's the problem, every line of code seems to have a "M" at the end of it. I assume it's a carriage return from winders. See what i mean....

    * This package is free software; you can redistribute it and/orM
    * modify it under the terms of the license found in the fileM
    * named COPYING that should have accompanied this file.M
    *M
    * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS ORM
    * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIEDM
    * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.M
    */M
    M
    #include <stdlib.h>M
    #include <math.h>M
    #include "common.h"M
    I know i could go through all these lines and delete the "m's" but theres over 25,000 lines!

    Anyone have any idears?

  2. #2
    Just Joined!
    Join Date
    Sep 2003
    Location
    ../
    Posts
    62
    hrmm what is 25,000 lines of code? THATS ALOT lol wanna hot key a button to do it for you? that might help

  3. #3
    Just Joined!
    Join Date
    Nov 2003
    Posts
    1
    do a "man dos2unix", basically DOS and Unix based operating systems store text files in different formats (DOS appends a ^M to every line)

    to remove these unwanted terminating characters, simply run your files through the "dos2unix" util and you should be good to go.

  4. #4
    Linux User
    Join Date
    Nov 2002
    Posts
    420
    The dos2unix did the trick, thanks man!

  5. #5
    Just Joined!
    Join Date
    Sep 2003
    Location
    ../
    Posts
    62
    what is the code for? just wanted to know cause i havnt coded anything over 150 lines ... ever

  6. #6
    Just Joined!
    Join Date
    May 2003
    Posts
    43
    Quote Originally Posted by xlulux
    what is the code for? just wanted to know cause i havnt coded anything over 150 lines ... ever
    I have a few php scripts that are touching on 1000 lines

Posting Permissions

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