<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Text bubliny Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";
        mso-fareast-language:EN-US;}
span.StylE-mailovZprvy17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.TextbublinyChar
        {mso-style-name:"Text bubliny Char";
        mso-style-priority:99;
        mso-style-link:"Text bubliny";
        font-family:"Tahoma","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=CS link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span lang=EN-US>Zkousim misto AVR Studia program Programmer’s notepad (zda se mi v nem zobrazeny kod prehlednejsi a vubec proc to nezkusit). Zalozim projekt s jednim zdrojovym .c souborem. Zkopiruju do adresare kde je zdrojovy .c soubor makefile z c:\WinAVR-20100110\sample\Makefile. Takto jednoduchy priklad zkompiluju bez problem, ale jakmile mam svoji vlastni .h knihovnu a do do zdrojoveho .c ji prilozim, compiler hodi chybu undefined reference to (a ted je jmeno procedury z knihovny)… Nejspis to je tim, ze neni v makefile nadefinovano, aby to linkovalo i “uzivatelske”.h soubory. Kde se to da nastavit (co editovat/pridat). Googluji uz peknou chvilku, ale nic o tom nemuzu najit.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Prikladam vystup z prekladace. Nikde neni zminka o .h knihovne.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>> "make.exe" all<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>-------- begin --------<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>avr-gcc (AVR_Toolchain_3.0_149) 4.4.3<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Copyright (C) 2010 Free Software Foundation, Inc.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>This is free software; see the source for copying conditions. There is NO<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Compiling C: main.c<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>avr-gcc -c -mmcu=atmega128 -I. -gdwarf-2 -DF_CPU=8000000UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=./main.lst -std=gnu89 -MMD -MP -MF .dep/main.o.d main.c -o main.o <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Linking: main.elf<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>avr-gcc -mmcu=atmega128 -I. -gdwarf-2 -DF_CPU=8000000UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=main.o -std=gnu89 -MMD -MP -MF .dep/main.elf.d main.o --output main.elf -Wl,-Map=main.map,--cref -lm<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>main.o: In function `main':<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>c:\users\michal.grunt\desktop\testavr01/main.c:14: undefined reference to `PortInitialize'<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>c:\users\michal.grunt\desktop\testavr01/main.c:15: undefined reference to `SerialInitialize'<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>c:\users\michal.grunt\desktop\testavr01/main.c:17: undefined reference to `TxDString'<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>make.exe: *** [main.elf] Error 1<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>> Process Exit Code: 2<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>> Time Taken: 00:00<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>MG<o:p></o:p></span></p></div></body></html>