Помощь - Поиск - Пользователи - Календарь
Полная версия этой страницы: Помогите пожалуйста.....
Форум разработчиков электроники ELECTRONIX.ru > Микроконтроллеры (MCs) > AVR
Professor
Компилятор AvrStudio4 ....Создаю проект ..... Лист с программой чистый КОМПИЛЮ - все в порядке
Подключаю библиотеку.... (.include <m16def.inc>) Кмпилю-ОШИБКА.... error : String expected....
Что ето за ошибка и как ее исправить?
bodja74
Ну это не сколько библиотека,сколько файл обьявления имен регистров.
Попробуйте вот так
.include "C:\...\m16def.inc"
С указанием пути к файлу и в кавычках. smile.gif
Professor
Заработало... только я зделал вот так...... (.include "m16def.inc")..... я не знал что можно использовать кавычки.... но и предложеный вами способ тоже работает спасибо.... smile.gif biggrin.gif
beer_warrior
Угловые скобки указывают на путь прописанный в PATH.
Кавычки - любой путь.
Tiro
Цитата(beer_warrior @ May 15 2006, 23:50) *
Угловые скобки указывают на путь прописанный в PATH.
Кавычки - любой путь.


Не путайте .include и #include excl.gif

.include - директива ассемблера, аргумент только в кавычках.

INCLUDE - Include another file
The INCLUDE directive tells the Assembler to start reading from a specified file. The Assembler then assembles the specified file until end of file (EOF) or an EXIT directive is encountered. An included file may itself contain INCLUDE directives.

Syntax:
.INCLUDE "filename"

#include - директива препроцессора, аргумент как в кавычках, так и в угловых скобках.

Syntax
#include "file"

#include <file>

Description
Include a file. The two forms differ in that (1) searches the current working directory first, and is functionally equivalent with the assembler .include directive. (2) does not search the current working directory. Both forms will search a built-in known place for include files supplied with the assembler.

It is strongly discouraged to use absolute pathnames in #include directives, as this makes it difficult to move projects between different directories/computers. Use the -I command-line option to specify the include path, or set ut up in AVR Studio - Project - Assembler Options.

С уважением.
Для просмотра полной версии этой страницы, пожалуйста, пройдите по ссылке.
Invision Power Board © 2001-2025 Invision Power Services, Inc.