![]() |
Makefile
this is on a linux box and i am running the compiler under wine.
i'm trying to make a Makefile that automates building individual parts of the robot code. for example, if i want to just compile the adc code, i can enter make adc in the toplevel src directory. the problem is, i can't seem to find the equivalent of gcc's -c in the 2.4 compiler (which, for those unfamiliar, allows for compilation, but no linking to occur). i think that's the issue that's causing compiler errors like this: Z:\home\fauxnominal\robotics\src\adc\adc.c:0:Error : syntax error any ideas? i looked at the compiler's --help options, but didn't see anything that worked. |
Re: Makefile
i followed the directions here:
http://www.chiefdelphi.com/forums/sh...ad.php?t=36377 that didn't seem to work either. i still get that error: Z:\home\fauxnominal\robotics\src\adc\adc.c:0:Error : syntax error i'm fairly sure it's not an issue with Kevin Watson's code as line 0 (does that imply line 1?) is a comment which can't possibly have a syntax error it's quite frustrating, any ideas? |
Re: Makefile
Give this a try for making your makefile
PHP Code:
|
Re: Makefile
hi chris31,
i appreciate your help; however, that didn't work either. i still get the same error message (the fact that i get a compiler error message tells you that i didn't have any issues setting that stuff up). any other thoughts? i doesn't even make sense that a line 0 would be at fault for a compilation. |
Re: Makefile
What version of MCC are you using? What version of GCC are you using? Also, if you could post just a little bit more of the method you're using to do this, I might be able to shed some more light.
|
Re: Makefile
what was posted was not a Makefile, but a python script that will create a make file. Just cpy all of that, save it as configure.py . move it into your project directory, and in the terminal run python configure.py
if u did that, then please elaborate with what you did exactly |
Re: Makefile
Lines start at 1. The compiler uses "syntax error" (w/o an error number) to mean "I'm confused. I'm giving up." Line 0 means before it even really starts reading the file. Maybe a permissions issue?
Check line endings, although that should not affect it. Also try running it through cpp18 (the preprocessor) and see if it tosses an error. (It probably won't but it's worth a shot.) Unlike gcc, MCC18 requires separate compiling and linking stages. The linker is mplink. |
Re: Makefile
hi all, thanks for the input.
as far as what version of the compiler i'm using, like i said before, i am using the 2.4 compiler using wine. the makefile was properly generated using the python script, and like i said the makefile also threw out the same error. if i try to compile by hand without a makefile, then i still get the same error. the preprocessor doesn't throw any errors out. i'm much more familiar with gcc, and being the purist that i am, tend to compile source files into individual object files and then link them anyway, so having a separate compiler and a separate linker is no issue. i have a feeling this has to do with line endings more than anything else, but how would i fix the line endings on linux in emacs? |
Re: Makefile
The files come with windows line endings from IFI. I would think that emacs at least preserves line endings, although I don't actually use it.
|
Re: Makefile
I got those line 0 errors with wine 0.9.22 that comes with Ubuntu Edgy. When I installed the latest 0.9.29, it works.
|
Re: Makefile
Yes, that's true. There is a known bug with wine 0.9.22.
Which version of WINE are you using, what version of Linux, etc. |
| All times are GMT -5. The time now is 01:19. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi