NerdKits - electronics education for a digital generation

You are not logged in. [log in]

NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.

Support Forum » Dont edit the makefile with Notepad

May 31, 2009
by luisgarciaalanis
luisgarciaalanis's Avatar

I edited the makefile with notepad and it messes it up, probably removes the new lines chars sine the carry return is missing

were these files created in Unix/Linux/Mac?

so it it gives you an error like C:UsersLUISGA~1AppDataLocalTemp/ccquwCKt.o: In function main': C:\NerdsKitSourceCode\initialload/initialload.c:29: undefined reference tolcd_init'

it can't find the references to the libs because the makefile is messed up

heads up

May 31, 2009
by wayward
wayward's Avatar

Hey,

perhaps your Notepad has removed tab characters from the Makefile. It needs tabs after the target specification:

target: dep1 dep2 dep3 ...
<tab>command...

Make sure that the tabs are still there, eight spaces won't do the trick.

Also, your error seems to be with the C code itself, not with the Makefile; make sure that you have

#include "../libnerdkits/lcd.h"

in initialload.c, and that initialload.c resides in a directory on the same level as libnerdkits/.

May 31, 2009
by luisgarciaalanis
luisgarciaalanis's Avatar

it was not the tabs, or maybe the encoding of the file changed for 8 bit to 16 bit chars.

because of C:/Users/LUISGA~1/AppData/LocalTemp/ccquwCKt.o: In function main.....

it's a linker error.

the way I solved this yesterday was to copy the Makefile again and edit it with the code editor.

May 31, 2009
by wayward
wayward's Avatar

luisgarciaalanis,

you're right, I wasn't reading carefully:

C:\\Users\\LUISGA~1\\AppData\\Local\\Temp/ccquwCKt.o: In function main: C:\\NerdsKitSourceCode\\initialload/initialload.c:29: undefined reference to 'lcd_init'

indeed, a linker error. Probably lcd.o wasn't getting linked in with the rest. Glad you solved it!

Post a Reply

Please log in to post a reply.

Did you know that using an alternating excitation voltage can reduce the noise in many sensor measurements? Learn more...