Find the answer to your Linux question:
Results 1 to 3 of 3
I am trying to get a peice of open source code from windows to compile in Linux. Here is what i am getting... make[2]: *** [World.o] Error 1 make[1]: *** ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Feb 2003
    Posts
    28

    Porting Open Source code from Winders to Linux


    I am trying to get a peice of open source code from windows to compile in Linux. Here is what i am getting...
    make[2]: *** [World.o] Error 1
    make[1]: *** [all-recursive] Error 1
    make: *** [all-recursive] Error 1

    When i look at the source files, it contains these "M"'s on each line??

    *M
    * 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
    Whats up with that?? Anyone know of a program that will strip these?

  2. #2
    Linux Enthusiast scientica's Avatar
    Join Date
    Sep 2003
    Location
    South- or "Mid-" Sweden
    Posts
    742
    Isn't it something like "^M", ^M is an notation for the char 0x0D (CR - Carrige Return).
    Windows uses CRLF as notation of a new line, while linux uses just LF (Line Feed, 0x0A) (iirc Mac uses CR). So when looking at windows text files in linux you're likeley to see the CR with some notation (can vary between editors) .
    Don't know how for sure to strip the CR, but I think you can use some command like dos2unix (or named something like that) that will fis it.
    Regards Scienitca (registered user #335819 - http://counter.li.org )
    --
    A master is nothing more than a student who knows something of which he can teach to other students.

  3. #3
    Just Joined!
    Join Date
    Nov 2003
    Posts
    7
    try
    sed 's/\r//g' sourcefile.c >sourcefile_converted.c

  4. $spacer_open
    $spacer_close

Posting Permissions

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