Make 1 build conf error 2

Hi, I'm using MPLAB x with the C18 compiler, and trying to build a small project for a PIC18F46K80 micro, initialising the SPI, and running an SPI read/write function. I have included pic18f46k80.h, and GenericTypeDefs.h, but I'm getting the build error:   make[2]: Leaving directory `C:/MPLABX...

Nabla_101

New Member

  • Total Posts : 17
  • Reward points : 0
  • Joined: 2012/08/30 11:16:40
  • Location: 0
  • Status: offline

Hi,
I’m using MPLAB x with the C18 compiler, and trying to build a small project for a PIC18F46K80 micro, initialising the SPI, and running an SPI read/write function.
I have included pic18f46k80.h, and GenericTypeDefs.h, but I’m getting the build error:


make[2]: Leaving directory `C:/MPLABXProjects/UT_zigbee_pic18f46k80.X'
make[2]: *** [build/default/production/newmainp18.o] Error 3
make[1]: *** [.build-conf] Error 2
make[1]: Leaving directory `C:/MPLABXProjects/UT_zigbee_pic18f46k80.X'
make: *** [.build-impl] Error 2
BUILD FAILED (exit value 2, total time: 450ms)

  And it is indicating a syntax error where I have declared a function with UINT8 return type, and UINT8 parameters, highlighting UINT8 as the keywords causing the error.
I have tried both build, and ‘clean and build’ with the same result, and couldn’t find a soultion by searching the error message…except that many other people seem to have the same error for various different reasons….I’m sure my code is OK, but I’m new to MPLABx, and theres probably something else I need to do.

RISC

Super Member

  • Total Posts : 6195
  • Reward points : 0
  • Status: offline

Re:make[1]: *** [.build-conf] Error 2


2012/09/07 12:18:22

(permalink)

Hi,

  Go in the dashboard (project properties) and check that a compiler version is selected.
If not select a compiler version.
Then compile using clean / build

  regards

Nabla_101

New Member

  • Total Posts : 17
  • Reward points : 0
  • Joined: 2012/08/30 11:16:40
  • Location: 0
  • Status: offline

Re:make[1]: *** [.build-conf] Error 2


2012/09/08 10:26:58

(permalink)

Thanks for the reply.
In the dashboard, I have under «compiler toolchain», «C18 (v3.41)».
If I go to tools > options > Embedded > build tools, I have listed in the toolchain box:

  C18 compiler (v3.41)
mpasm (v5.46)
mpasm (v5.44)

  Also, it doesn’t seem to make a difference if I click just «build» or «clean and build» — I still get the error message.

  I do remember, when I initially started the project, and selected the compiler from the list, the C18 compiler had a yellow circle to the lef of it (As opposed to the green circle next to other items), so is this indicating an error with the compiler that could be causing the error?
Is there any configuration settings I need to set for the C18 compiler, or MPLABx in general in order to get it to build?

  P.s. I’m using MPLabx v1.30, windows 7 pro, 64-bit, intel core i3 @2.13GHz  4Gb ram, if it matters.

post edited by Nabla_101 — 2012/09/08 10:43:36

Jose Diaz

Administrator

  • Total Posts : 1676
  • Reward points : 0
  • Joined: 2010/06/23 11:10:56
  • Location: 0
  • Status: offline

Re:make[1]: *** [.build-conf] Error 2


2012/09/10 08:12:41

(permalink)

The yellow circle means that the support is beta (not production tested). I have c18 v3.40 and see that the PIC18F46K80 has green support. 
Since this is a small project with no proprietary source, can you attach the project (right click on project, select package, look at output window for zip file name)?

DubP

New Member

  • Total Posts : 14
  • Reward points : 0
  • Joined: 2012/05/24 14:09:18
  • Location: 0
  • Status: offline

Re:make[1]: *** [.build-conf] Error 2


2012/12/05 14:34:00

(permalink)

It seems like this thread has gone stale, but I have been fighting this same problem Since MPLABX V1.00. Just like Nabla_101, I am running MPLABX (now version 1.51) on Windows 7, 64 bit. I have never been able to get an assembly project to compile. Always I get an output like this:

  CLEAN SUCCESSFUL (total time: 101ms)
make -f nbproject/Makefile-default.mk SUBPROJECTS= .build-conf
make[1]: Entering directory `X:/ENGINEERING/ENG/0_Projects/MPLAB X/Simple Second Strike.X’
make  -f nbproject/Makefile-default.mk dist/default/production/Simple_Second_Strike.X.production.hex
make[2]: Entering directory `X:/ENGINEERING/ENG/0_Projects/MPLAB X/Simple Second Strike.X’
make[2]: *** [build/default/production/SSS_V0.10.o] Error -1
make[1]: *** [.build-conf] Error 2
«C:Program Files (x86)MicrochipMPLABXmpasmxmpasmx.exe» -q -p16f727 -l»build/default/production/SSS_V0.10.lst» -e»build/default/production/SSS_V0.10.err» -o»build/default/production/SSS_V0.10.o» «SSS_V0.10.asm»
make[2]: Leaving directory `X:/ENGINEERING/ENG/0_Projects/MPLAB X/Simple Second Strike.X’
make[1]: Leaving directory `X:/ENGINEERING/ENG/0_Projects/MPLAB X/Simple Second Strike.X’
make: *** [.build-impl] Error 2

  BUILD FAILED (exit value 2, total time: 201ms)

  MPASM works fine; if I run it from the command line with the above arguments it builds the file normally and everything works. I sent the attached project to my Microchip vendor and his tech guys could not replicate the problem. They insist that I am running in absolute mode. I am not, and it does not matter anyway because I get the same result whether I set it to absolute or relative. All of my projects work fine when I run them from a virtual 32 bit XP machine, which is how I have been getting by.

  Please let me know if you can replicate this failure. It would be really nice to be able to run MPLABX on my real PC again.

  Attachments are not available: Download requirements not met

Attachment(s)

Attachments are not available: Download requirements not met

Jose Diaz

Administrator

  • Total Posts : 1676
  • Reward points : 0
  • Joined: 2010/06/23 11:10:56
  • Location: 0
  • Status: offline

Re:make[1]: *** [.build-conf] Error 2


2012/12/06 08:16:38

(permalink)

The file I2A12683_LITE+MLAB+X.zip does not contain an .asm file. Looking at the nbproject/configurations.xml I see that the file is at ../
Did you use the package feature of MPLAB X to create the zip? If not please do that and the .asm will be included. On the project view, right click on package, select Package. The output window will show you the path to the zip file MPLAB X created. 
Or just attach the .asm here. 

DubP

New Member

  • Total Posts : 14
  • Reward points : 0
  • Joined: 2012/05/24 14:09:18
  • Location: 0
  • Status: offline

Re:make[1]: *** [.build-conf] Error 2


2012/12/06 09:00:38

(permalink)
☄ Helpfulby Nached 2014/07/27 06:31:22

Sorry about that. Attached is the packaged project (with the source file in it this time). Also the .asm file separately. 

  I just noticed that you have checked this project for me once before, in this thread:

  http://www.microchip.com/…m=654446&high=DubP

  You were able to recreate the error with Windows 7 but it was fixed by deselecting absolute mode in the project settings. Unfortunately this did not work for me. The attached project is set to absolute, but I have tried to compile it in both absolute and relocatable modes. I get the same error either way. The outputs do change a bit though.

  Here is the output while in absolute mode:

  CLEAN SUCCESSFUL (total time: 51ms)make -f nbproject/Makefile-default.mk SUBPROJECTS= .build-confmake[1]: Entering directory `C:/Users/Patrick/Desktop/I2A12683_LITE/I2A12683_LITE MLAB X’make  -f nbproject/Makefile-default.mk dist/default/production/I2A12683_LITE_MLAB_X.production.hexmake[2]: Entering directory `C:/Users/Patrick/Desktop/I2A12683_LITE/I2A12683_LITE MLAB X'»C:Program Files (x86)MicrochipMPLABXmpasmxmpasmx.exe» -q -p12f683 «C:/Users/Patrick/Desktop/I2A12683_LITE/I2A12683_LITE MLAB X/I2A12683_LITE.asm» make[2]: Leaving directory `C:/Users/Patrick/Desktop/I2A12683_LITE/I2A12683_LITE MLAB X’make[2]: *** [build/default/production/I2A12683_LITE.o] Error -1make[1]: Leaving directory `C:/Users/Patrick/Desktop/I2A12683_LITE/I2A12683_LITE MLAB X’make[1]: *** [.build-conf] Error 2make: *** [.build-impl] Error 2
BUILD FAILED (exit value 2, total time: 152ms)

  …and here is the output while in relocatable mode:

  CLEAN SUCCESSFUL (total time: 51ms)make -f nbproject/Makefile-default.mk SUBPROJECTS= .build-confmake[1]: Entering directory `C:/Users/Patrick/Desktop/I2A12683_LITE/I2A12683_LITE MLAB X’make  -f nbproject/Makefile-default.mk dist/default/production/I2A12683_LITE_MLAB_X.production.hexmake[2]: Entering directory `C:/Users/Patrick/Desktop/I2A12683_LITE/I2A12683_LITE MLAB X’make[2]: *** [build/default/production/I2A12683_LITE.o] Error -1make[1]: *** [.build-conf] Error 2make: *** [.build-impl] Error 2″C:Program Files (x86)MicrochipMPLABXmpasmxmpasmx.exe» -q -p12f683 -l»build/default/production/I2A12683_LITE.lst» -e»build/default/production/I2A12683_LITE.err» -o»build/default/production/I2A12683_LITE.o» «I2A12683_LITE.asm» make[2]: Leaving directory `C:/Users/Patrick/Desktop/I2A12683_LITE/I2A12683_LITE MLAB X’make[1]: Leaving directory `C:/Users/Patrick/Desktop/I2A12683_LITE/I2A12683_LITE MLAB X’
BUILD FAILED (exit value 2, total time: 151ms)

  Is it possible that because the code contains org directives that it defaults back to absolute mode?

Attachment(s)

Attachments are not available: Download requirements not met

Jose Diaz

Administrator

  • Total Posts : 1676
  • Reward points : 0
  • Joined: 2010/06/23 11:10:56
  • Location: 0
  • Status: offline

Re:make[1]: *** [.build-conf] Error 2


2012/12/06 15:30:19

(permalink)

I tried using I2A12683_LITE.zip in Windows 7 64 bit using v1.41 and v1.51. I can build in relative and absolute mode.
Do you have any .ERR files generated at all anywhere in the X directory and all its subdirectories?
c:XXX> dir /s *.ERR

DubP

New Member

  • Total Posts : 14
  • Reward points : 0
  • Joined: 2012/05/24 14:09:18
  • Location: 0
  • Status: offline

Re:make[1]: *** [.build-conf] Error 2


2012/12/07 13:06:00

(permalink)

NO, sorry. I searched the project folder but I did not find any .err files.

  Are there maybe any components of Windows or Java that I do not have installed? Possibly some kind of 64-32 but interpreter? Maybe a link or library for 32 bit support?

Jose Diaz

Administrator

  • Total Posts : 1676
  • Reward points : 0
  • Joined: 2010/06/23 11:10:56
  • Location: 0
  • Status: offline

Re:make[1]: *** [.build-conf] Error 2


2012/12/07 14:25:50

(permalink)

Let’s try running the assembler from the command line. If I type here the stuff I want to, the forum does not let me post. I am attaching it as a text file.

Attachment(s)

Attachments are not available: Download requirements not met

d2squared

New Member

  • Total Posts : 20
  • Reward points : 0
  • Joined: 2012/12/03 19:49:35
  • Location: 0
  • Status: offline

Re:make[1]: *** [.build-conf] Error 2


2012/12/14 09:32:48

(permalink)

hi. 

     I’m experiencing the same issue. I have wrote some code and no error or warning are found when I build it but it fails anyway and this is the reason why: 

  :: warning: Omniscient Code Generation not available in Free mode 
C:DOCUME~1ADMINI~1LOCALS~1Temps20k.:3347: error: undefined symbol «_in»(908) 
exit status = 1 
make[2]: *** [dist/default/production/eees700ilp.X.production.hex] Error 1 
make[1]: *** [.build-conf] Error 2 
make: *** [.build-impl] Error 2 
make[2]: Leaving directory `C:/My_Projects/Microchip/WFolder/EEES700ILP.X’ 
make[1]: Leaving directory `C:/My_Projects/Microchip/WFolder/EEES700ILP.X’ 

  BUILD FAILED (exit value 2, total time: 12s) 

  did you have any luck with it? 

  thank you 

Hornifan

New Member

  • Total Posts : 7
  • Reward points : 0
  • Joined: 2019/01/14 05:36:20
  • Location: 0
  • Status: offline

Re:make[1]: *** [.build-conf] Error 2


2019/01/20 20:23:03

(permalink)

Why?

  when I enter code with : 

[size=»9.0pt»]printf(«%dn», x);

 

   built failed by tipping:

 make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2
BUILD FAILED (exit value 2, total time: 2s)

m_alizd

Starting Member

  • Total Posts : 36
  • Reward points : 0
  • Joined: 2016/02/28 02:21:37
  • Location: 0
  • Status: offline

Re:make[1]: *** [.build-conf] Error 2


2019/02/11 21:37:25

(permalink)

Hi [ A possible solution ]
I solved the problem by doing this:
In project properties I had xc8 1.38 selected. I clicked on mpasm. Did a clean & build which failed with similar make error messages I was getting originally. Then returned to properties and double clicked and reselected xc8 v1.38 then pressed «Apply». Now when I did clean & build it worked OK and error message was gone for good.

 And for what it’s worth, the reason I first came across this error was that I had two versions of MPLAB X IDE installed. I thought it’s the time to uninstall the earlier version as I was happy with the update V 5.10. During uninstallation, I just followed recommended OK buttons and got it installed but then got trapped in make error message.

 Hope this helps folks that have the same problem as me.
Cheers
Matt

Форум РадиоКот • Просмотр темы — Не возможно скомпилировать код на c++ в MPLAB X

Сообщения без ответов | Активные темы

ПРЯМО СЕЙЧАС:

Автор Сообщение

Не в сети

Заголовок сообщения: Не возможно скомпилировать код на c++ в MPLAB X

СообщениеДобавлено: Вт дек 12, 2017 17:04:30 

Первый раз сказал Мяу!

Зарегистрирован: Вт дек 12, 2017 16:52:57
Сообщений: 31
Откуда: Вам широту и долготу скинуть?

Рейтинг сообщения: 0

Всем привет!!! Пытаюсь освоить pic, но проект не компилируется. Вот код: https://hastebin.com/heqavekuwu.cpp
А вот ошибки:
make -f nbproject/Makefile-default.mk SUBPROJECTS= .build-conf
make[1]: Entering directory ‘C:/Users/Timoha/MPLABXProjects/test.X’
make -f nbproject/Makefile-default.mk dist/default/production/test.X.production.hex
make[2]: Entering directory ‘C:/Users/Timoha/MPLABXProjects/test.X’
make[2]: Leaving directory ‘C:/Users/Timoha/MPLABXProjects/test.X’
nbproject/Makefile-default.mk:90: recipe for target ‘.build-conf’ failed
make[1]: Leaving directory ‘C:/Users/Timoha/MPLABXProjects/test.X’
nbproject/Makefile-impl.mk:39: recipe for target ‘.build-impl’ failed
make[2]: *** No rule to make target ‘build/default/production/main.o’, needed by ‘dist/default/production/test.X.production.hex’. Stop.
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2

BUILD FAILED (exit value 2, total time: 211ms)

Что делать?


_________________

ааааааааааааааааааааааааа็аааааааааааааааааааааааа็аааааааааааааааааааааааа, I love this.ааааааааааааааааааааааааа็аааааааааааааааааааааааа็аааааааааааааааааааааааа

Вернуться наверх
 

ПрофильПрофиль

 

Реклама

Аlex

Не в сети

Заголовок сообщения: Re: Не возможно скомпилировать код на c++ в MPLAB X

СообщениеДобавлено: Ср дек 13, 2017 14:41:14 

Модератор
Аватар пользователя

Карма: 85

Рейтинг сообщений: 1270

Зарегистрирован: Чт мар 18, 2010 23:09:57
Сообщений: 4478
Откуда: Планета Земля

Рейтинг сообщения: 0

Медали: 1

Получил миской по аватаре (1)

Цитата:

.cpp

Нет С++ компиляторов для PIC12. Просто не существует в природе.

Добавлено after 57 seconds:

Lublu_megy писал(а):

Что делать?

Учиться, учиться и ещё раз — учиться !

Вернуться наверх
Реклама

Lublu_megy

Не в сети

Заголовок сообщения: Re: Не возможно скомпилировать код на c++ в MPLAB X

СообщениеДобавлено: Ср дек 13, 2017 16:42:56 

Зарегистрирован: Вт дек 12, 2017 16:52:57
Сообщений: 31
Откуда: Вам широту и долготу скинуть?

Рейтинг сообщения: 0

Цитата:

.cpp

Нет С++ компиляторов для PIC12. Просто не существует в природе.
Как?! На ассемблере мучиться? Уххх… Уже боюсь :shock:

Добавлено after 57 seconds:

Lublu_megy писал(а):

Что делать?

Учиться, учиться и ещё раз — учиться !

Само собой.


_________________

ааааааааааааааааааааааааа็аааааааааааааааааааааааа็аааааааааааааааааааааааа, I love this.ааааааааааааааааааааааааа็аааааааааааааааааааааааа็аааааааааааааааааааааааа

Вернуться наверх

uldemir

Не в сети

Заголовок сообщения: Re: Не возможно скомпилировать код на c++ в MPLAB X

СообщениеДобавлено: Ср дек 13, 2017 17:48:39 

Друг Кота
Аватар пользователя

Карма: 46

Рейтинг сообщений: 1310

Зарегистрирован: Пт авг 28, 2009 21:34:30
Сообщений: 7122
Откуда: 845-й км.

Рейтинг сообщения: 0

Медали: 1

Получил миской по аватаре (1)

Вы бы сказали, что хотите получить.
Проект создали или посто файл втюхнули и захотели чтобы вам вс сделали?

Дык, как сделать? у pic12f629 нету ни порта А, ни порта Б? Там есть один порт, но он зовётся иначе.

У меня всё получилось:


_________________
А люди посмотрят и скажут: «Собаки летят. Вот и осень.»

Вернуться наверх
Реклама

Выгодные LED-драйверы для решения любых задач

КОМПЭЛ представляет со склада и под заказ широкий выбор LED-драйверов производства MEAN WELL, MOSO, Snappy, Inventronics, EagleRise. Линейки LED-драйверов этих компаний, выполненные по технологии Tunable White и имеющие возможность непосредственного встраивания в систему умного дома (димминг по шине KNX), перекрывают практически полный спектр применений: от простых световых указателей и декоративной подсветки до диммируемых по различным протоколам светильников внутреннего и наружного освещения.

Подобрать LED-драйвер>>

Lublu_megy

Не в сети

Заголовок сообщения: Re: Не возможно скомпилировать код на c++ в MPLAB X

СообщениеДобавлено: Ср дек 13, 2017 20:00:32 

Зарегистрирован: Вт дек 12, 2017 16:52:57
Сообщений: 31
Откуда: Вам широту и долготу скинуть?

Рейтинг сообщения: 0

Вы бы сказали, что хотите получить.
Проект создали или посто файл втюхнули и захотели чтобы вам вс сделали?

Дык, как сделать? у pic12f629 нету ни порта А, ни порта Б? Там есть один порт, но он зовётся иначе.

У меня всё получилось:

Хочу просто попробовать освоить pic. Я ардуину излабызал, с стм у меня пока не очень, но буду ещё пробовать. Осталось попробовать самых нежных и маленьких — pic.
Скиньте пожалуйста код блинка для pic12f629 вот cюда. :) :wink:


_________________

ааааааааааааааааааааааааа็аааааааааааааааааааааааа็аааааааааааааааааааааааа, I love this.ааааааааааааааааааааааааа็аааааааааааааааааааааааа็аааааааааааааааааааааааа

Вернуться наверх
Реклама

Реклама

LIMF – источники питания High-End от MORNSUN со стандартным функционалом на DIN-рейку

На склад Компэл поступили ИП MORNSUN (крепление на DIN-рейку) с выходной мощностью 240 и 480 Вт. Данные источники питания обладают 150% перегрузочной способностью, активной схемой коррекции коэффициента мощности (ККМ; PFC), наличием сухого контакта реле для контроля работоспособности (DC OK) и возможностью подстройки выходного напряжения. Источники питания выполнены в металлическом корпусе, ПП с компонентами покрыта лаком с двух сторон, что делает ее устойчивой к соляному туману и пыли. Изделия соответствуют требованиям ANSI/ISA 71.04-2013 G3 на устойчивость к коррозии, а также нормам ATEX для взрывоопасных зон.

Подробнее>>

uldemir

Не в сети

Заголовок сообщения: Re: Не возможно скомпилировать код на c++ в MPLAB X

СообщениеДобавлено: Ср дек 13, 2017 20:22:55 

Друг Кота
Аватар пользователя

Карма: 46

Рейтинг сообщений: 1310

Зарегистрирован: Пт авг 28, 2009 21:34:30
Сообщений: 7122
Откуда: 845-й км.

Рейтинг сообщения: 0

Медали: 1

Получил миской по аватаре (1)

Расслабтесь. Он работать всё равно не будет. конфигурации TRIS еще недостаточно, чтобы вывод работал как цифровой. Там есть еще один регистр, который зовётся CMCON — его тоже следует проинициализировать. Поэтому, лучше скачайте даташит на кристалл и почитайте для начала про микроконтроллер, который вы собираетесь программировать. Ну я обычно так делаю…

https://hastebin.com/isadeditoh.cpp


_________________
А люди посмотрят и скажут: «Собаки летят. Вот и осень.»

Последний раз редактировалось uldemir Ср дек 13, 2017 22:12:16, всего редактировалось 1 раз.

Вернуться наверх

dosikus

Не в сети

Заголовок сообщения: Re: Не возможно скомпилировать код на c++ в MPLAB X

СообщениеДобавлено: Ср дек 13, 2017 21:22:39 

Друг Кота
Аватар пользователя

Карма: 30

Рейтинг сообщений: 154

Зарегистрирован: Пн июл 28, 2008 22:12:01
Сообщений: 3604

Рейтинг сообщения: 0

Мега-фил, а разве уроков с оф.сайта и тех же уроков с мануала на мЫпЫлаб и XC8 недостаточно?
Да и были ли читаны сии мануалы?

Вернуться наверх

Lublu_megy

Не в сети

Заголовок сообщения: Re: Не возможно скомпилировать код на c++ в MPLAB X

СообщениеДобавлено: Вс дек 17, 2017 01:06:45 

Зарегистрирован: Вт дек 12, 2017 16:52:57
Сообщений: 31
Откуда: Вам широту и долготу скинуть?

Рейтинг сообщения: 0

Пытался, но пишут всё на ассемблере. Прошу написать моргалку светодиодом для pic12f629 на c++.
Оплата: признательное МЯУ! :)


_________________

ааааааааааааааааааааааааа็аааааааааааааааааааааааа็аааааааааааааааааааааааа, I love this.ааааааааааааааааааааааааа็аааааааааааааааааааааааа็аааааааааааааааааааааааа

Вернуться наверх

КРАМ

Не в сети

Заголовок сообщения: Re: Не возможно скомпилировать код на c++ в MPLAB X

СообщениеДобавлено: Вс дек 17, 2017 14:07:48 

Друг Кота
Аватар пользователя

Карма: 125

Рейтинг сообщений: 2459

Зарегистрирован: Чт янв 10, 2008 22:01:02
Сообщений: 19484
Откуда: Московская область, Фрязино

Рейтинг сообщения: 0

Вернуться наверх

Lublu_megy

Не в сети

Заголовок сообщения: Re: Не возможно скомпилировать код на c++ в MPLAB X

СообщениеДобавлено: Вс дек 17, 2017 15:23:51 

Зарегистрирован: Вт дек 12, 2017 16:52:57
Сообщений: 31
Откуда: Вам широту и долготу скинуть?

Рейтинг сообщения: 0

А у Вас есть компилятор на «плюсах» для младших ПИКов?

КРАМ, ну я не знаю для младших он или нет. Вот название: XC8.


_________________

ааааааааааааааааааааааааа็аааааааааааааааааааааааа็аааааааааааааааааааааааа, I love this.ааааааааааааааааааааааааа็аааааааааааааааааааааааа็аааааааааааааааааааааааа

Вернуться наверх

КРАМ

Не в сети

Заголовок сообщения: Re: Не возможно скомпилировать код на c++ в MPLAB X

СообщениеДобавлено: Вс дек 17, 2017 15:48:17 

Друг Кота
Аватар пользователя

Карма: 125

Рейтинг сообщений: 2459

Зарегистрирован: Чт янв 10, 2008 22:01:02
Сообщений: 19484
Откуда: Московская область, Фрязино

Рейтинг сообщения: 0

Вернуться наверх

Lublu_megy

Не в сети

Заголовок сообщения: Re: Не возможно скомпилировать код на c++ в MPLAB X

СообщениеДобавлено: Вс дек 17, 2017 16:46:00 

Зарегистрирован: Вт дек 12, 2017 16:52:57
Сообщений: 31
Откуда: Вам широту и долготу скинуть?

Рейтинг сообщения: 0

КРАМ, поменять cpp на c не составит проблемы.
И правда. Скомпилировался пустой код)))0 :))


_________________

ааааааааааааааааааааааааа็аааааааааааааааааааааааа็аааааааааааааааааааааааа, I love this.ааааааааааааааааааааааааа็аааааааааааааааааааааааа็аааааааааааааааааааааааа

Вернуться наверх

dosikus

Не в сети

Заголовок сообщения: Re: Не возможно скомпилировать код на c++ в MPLAB X

СообщениеДобавлено: Вс дек 17, 2017 17:25:43 

Друг Кота
Аватар пользователя

Карма: 30

Рейтинг сообщений: 154

Зарегистрирован: Пн июл 28, 2008 22:12:01
Сообщений: 3604

Рейтинг сообщения: 0

Пытался, но пишут всё на ассемблере. Прошу написать моргалку светодиодом для pic12f629 на c++.
Оплата: признательное МЯУ! :)

Завтра скину то что есть , но на английском.
Изучайте . Денег не надо , у вас и так тупиковый путь в никуда.
Бесполезная трата времени,сил, средств…

Вернуться наверх

Lublu_megy

Не в сети

Заголовок сообщения: Re: Не возможно скомпилировать код на c++ в MPLAB X

СообщениеДобавлено: Вс дек 17, 2017 19:36:59 

Зарегистрирован: Вт дек 12, 2017 16:52:57
Сообщений: 31
Откуда: Вам широту и долготу скинуть?

Рейтинг сообщения: 0

… у вас и так тупиковый путь в никуда.
Бесполезная трата времени,сил, средств…

Почему?? :cry: Что плохого в пробовании программирования PIC?


_________________

ааааааааааааааааааааааааа็аааааааааааааааааааааааа็аааааааааааааааааааааааа, I love this.ааааааааааааааааааааааааа็аааааааааааааааааааааааа็аааааааааааааааааааааааа

Вернуться наверх

dosikus

Не в сети

Заголовок сообщения: Re: Не возможно скомпилировать код на c++ в MPLAB X

СообщениеДобавлено: Вс дек 17, 2017 21:00:01 

Друг Кота
Аватар пользователя

Карма: 30

Рейтинг сообщений: 154

Зарегистрирован: Пн июл 28, 2008 22:12:01
Сообщений: 3604

Рейтинг сообщения: 0

Старые base_line и mid_range нужны только в качестве экспонатов музея.Квик старт весьма дорог , периферия недоделанный высер. На их фоне даже китайский новодел на 51ых выглядит намного вкуснее.
Хотя в впрочем как и весь пЫк’вский набор , исключая новые камни с арм ядром.

Вернуться наверх

КРАМ

Не в сети

Заголовок сообщения: Re: Не возможно скомпилировать код на c++ в MPLAB X

СообщениеДобавлено: Пн дек 18, 2017 11:31:19 

Друг Кота
Аватар пользователя

Карма: 125

Рейтинг сообщений: 2459

Зарегистрирован: Чт янв 10, 2008 22:01:02
Сообщений: 19484
Откуда: Московская область, Фрязино

Рейтинг сообщения: 4

Старые base_line и mid_range нужны только в качестве экспонатов музея.

Парадокс состоит в том, что свободное владение АРМами обнаруживают лишь те, кто прошел школу примитивных архитектур. Те же, кто последовал советам сразу работать с АРМами, в подавляющем своем большинстве стали «ардуинщиками». Патамушта невозможно прыгнуть в матанализ, минуя арифметику начальных классов.
:tea:

Вернуться наверх

dosikus

Не в сети

Заголовок сообщения: Re: Не возможно скомпилировать код на c++ в MPLAB X

СообщениеДобавлено: Пн дек 25, 2017 07:16:11 

Друг Кота
Аватар пользователя

Карма: 30

Рейтинг сообщений: 154

Зарегистрирован: Пн июл 28, 2008 22:12:01
Сообщений: 3604

Рейтинг сообщения: 0

Вернуться наверх

Кто сейчас на форуме

Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 3

Вы не можете начинать темы
Вы не можете отвечать на сообщения
Вы не можете редактировать свои сообщения
Вы не можете удалять свои сообщения
Вы не можете добавлять вложения

I am working on a PIC24 project, and I went to the project folder and moved a file to another directory inside the project folder, however, I got a makefile error. I created a new project and copied the source codes into the project I still get the same error.

make -f nbproject/Makefile-default.mk SUBPROJECTS= .build-conf
make[1]: Entering directory 'C:/Users/forat/MPLABXProjects/SerialComm_2_Micros_2.X'
make  -f nbproject/Makefile-default.mk dist/default/production/SerialComm_2_Micros_2.X.production.hex
make[2]: Entering directory 'C:/Users/forat/MPLABXProjects/SerialComm_2_Micros_2.X'
make[2]: *** No rule to make target 'build/default/production/System.o', needed by 'dist/default/production/SerialComm_2_Micros_2.X.production.hex'.  Stop.
make[2]: *** Waiting for unfinished jobs....
"C:Program FilesMicrochipxc16v1.60binxc16-gcc.exe"   main.c  -o build/default/production/main.o  -c -mcpu=24FJ1024GB610  -MMD -MF "build/default/production/main.o.d"      -mno-eds-warn  -g -omf=elf -DXPRJ_default=default  -legacy-libc    -O0 -msmart-io=1 -Wall -msfr-warn=off    -mdfp="C:/Program Files (x86)/Microchip/MPLABX/v5.40/packs/Microchip/PIC24F-GA-GB_DFP/1.3.109/xc16"
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2
make[2]: Leaving directory 'C:/Users/forat/MPLABXProjects/SerialComm_2_Micros_2.X'
nbproject/Makefile-default.mk:91: recipe for target '.build-conf' failed
make[1]: Leaving directory 'C:/Users/forat/MPLABXProjects/SerialComm_2_Micros_2.X'
nbproject/Makefile-impl.mk:39: recipe for target '.build-impl' failed

BUILD FAILED (exit value 2, total time: 1s)

Can someone help me, into why I got this error, I thought since it is not a syntax error, then if I create a new project and copied and pasted the code, I won’t have this error.

I created a test project with a simple c code, and it got built successfully without any issues, it is only with my project that I got this error.

Your help is appreciated.

EDIT SOLUTION

Hi guys,

in the error, it mentions the problem is with System.o I deleted the file System.h and created a new one with the same name and copied the code in it, the error disappeared when I build it.

Thank you guys for your help.

Make 1 build conf error 2

Опытный

Профиль
Группа: Участник
Сообщений: 740
Регистрация: 12.1.2008
Где: Germany

Репутация: 1
Всего: 1

Компилирую проект.
И мне вот такое.

Killer_13
Дата 14.7.2010, 20:02 (ссылка) | (нет голосов) Загрузка .
Код
«/bin/make» -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make[1]: Entering directory `/d/NetBeans/CppApplication_Kap14′
«/bin/make» -f nbproject/Makefile-Debug.mk dist/Debug/MinGW-Windows/cppapplication_kap14.exe
make[2]: Entering directory `/d/NetBeans/CppApplication_Kap14′
mkdir -p build/Debug/MinGW-Windows
rm -f build/Debug/MinGW-Windows/main.o.d
g++.exe -c -g -MMD -MP -MF build/Debug/MinGW-Windows/main.o.d -o build/Debug/MinGW-Windows/main.o main.cpp
from c:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/ios:48,
from c:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/ostream:45,
from c:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/iostream:45,
from main.cpp:10:
In file included from c:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/localefwd.h:48,
c:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/functexcept.h:36: error: expected unqualified-id before «namespace»
make[2]: Leaving directory `/d/NetBeans/CppApplication_Kap14′
make[2]: *** [build/Debug/MinGW-Windows/main.o] Error 1
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2
make[1]: Leaving directory `/d/NetBeans/CppApplication_Kap14′

BUILD FAILED (exit value 2, total time: 2s)

Не знаю в чем ошибка.

Если кликнуть по ссылке(c:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/functexcept.h:36: error: expected unqualified-id before «namespace»), то откроется файл «functexcep.h» с вот таким содержанием.

Код
// Function-Based Exception Support -*- C++ -*-

// Copyright (C) 2001 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.

// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 59 Temple Place — Suite 330, Boston, MA 02111-1307,
// USA.

// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.

//
// ISO C++ 14882: 19.1 Exception classes
//

namespace std
<
// Helper for exception objects in
void
__throw_bad_exception(void);

// Helper for exception objects in
void
__throw_bad_alloc(void);

// Helper for exception objects in
void
__throw_bad_cast(void);

// Helpers for exception objects in
void
__throw_logic_error(const char* __s);

void
__throw_domain_error(const char* __s);

void
__throw_invalid_argument(const char* __s);

void
__throw_length_error(const char* __s);

void
__throw_out_of_range(const char* __s);

void
__throw_runtime_error(const char* __s);

void
__throw_range_error(const char* __s);

void
__throw_overflow_error(const char* __s);

void
__throw_underflow_error(const char* __s);

// Helpers for exception objects in basic_ios
void
__throw_ios_failure(const char* __s);
> // namespace std

Программка складывается из 3 файликов в каждом есть «using namespace::std;»

любитель

Профиль
Группа: Участник Клуба
Сообщений: 7954
Регистрация: 14.1.2006

Репутация: 79
Всего: 250

прежде чем думать на библиотеку свое проверьте,
файл main.cpp в студию

а лучше все три..

при том не все а только начало и конец.. середина не нужна..

Это сообщение отредактировал(а) mes — 14.7.2010, 20:08

mes
Дата 14.7.2010, 20:05 (ссылка) | (нет голосов) Загрузка .

Опытный

Профиль
Группа: Участник
Сообщений: 740
Регистрация: 12.1.2008
Где: Germany

Репутация: 1
Всего: 1

Killer_13
Дата 14.7.2010, 20:13 (ссылка) | (нет голосов) Загрузка .
Код
#include
#include «artikel.h»
#include
#include
#include

using namespace::std;
void test();

Artikel artikel1(1111, «Voleyball», 59.9);

Код
#include «artikel.h»
#include
#include

Artikel::Artikel(long nr, const string& name, double vk)<

setNr(nr);
setName(name);
setVK(vk);

Код
#ifndef ARTIKEL_H
#define ARTIKEL_H

class Artikel<
private:
long nr;
string name;
double vk;

long getNr() const
const string& getName() const
double getVK() const

void setNr(long n)

bool setName(const string& s) <

любитель

Профиль
Группа: Участник Клуба
Сообщений: 7954
Регистрация: 14.1.2006

Репутация: 79
Всего: 250

42 строчка в 3м блоке.. смотрите сами внимательно

Добавлено через 44 секунды
кстати, а середину то зачем выложили ? я ж предупредил, что она не нужна

mes
Дата 14.7.2010, 21:03 (ссылка) | (нет голосов) Загрузка .
kemiisto
Дата 14.7.2010, 21:12 (ссылка) | (нет голосов) Загрузка .

Дикий Кот. =^.^=

Награды: 1

Профиль
Группа: Участник Клуба
Сообщений: 3292
Регистрация: 29.7.2007

Репутация: 5
Всего: 160

Пей, кури, пиши на си!

Опытный

Профиль
Группа: Участник
Сообщений: 740
Регистрация: 12.1.2008
Где: Germany

Репутация: 1
Всего: 1

Killer_13
Дата 14.7.2010, 21:37 (ссылка) | (нет голосов) Загрузка .
kemiisto
Дата 14.7.2010, 21:39 (ссылка) | (нет голосов) Загрузка .

Дикий Кот. =^.^=

Награды: 1

Профиль
Группа: Участник Клуба
Сообщений: 3292
Регистрация: 29.7.2007

Репутация: 5
Всего: 160

Цитата(Killer_13 @ 14.7.2010, 22:37 )
Если б показало на эту строку, догадался бы наверное, а так.. 🙁

Пей, кури, пиши на си!

любитель

Профиль
Группа: Участник Клуба
Сообщений: 7954
Регистрация: 14.1.2006

Репутация: 79
Всего: 250

mes
Дата 14.7.2010, 21:57 (ссылка) | (нет голосов) Загрузка .
Цитата(Killer_13 @ 14.7.2010, 20:37 )
Если б показало на эту строку, догадался бы наверное, а так.. 🙁

так фактически показало :

Цитата(Killer_13 @ 14.7.2010, 19:02 )
before «namespace»

смотрим что before

Код
#include «artikel.h»
#include

раз инклуде заглядываем в его конец

и все

Цитата(kemiisto @ 14.7.2010, 20:39 )
«C/C++: Для новичков» — это оксюморон

тут просто новички должны быть другими (чем в разделах других ЯП) .. более предпреимчивыми и находчивыми

Это сообщение отредактировал(а) mes — 14.7.2010, 22:34

boostcoder
Дата 14.7.2010, 22:28 (ссылка) | (голосов:4) Загрузка .

pattern`щик

Профиль
Группа: Завсегдатай
Сообщений: 5458
Регистрация: 1.4.2010

Репутация: 20
Всего: 110

Опытный

Профиль
Группа: Участник
Сообщений: 740
Регистрация: 12.1.2008
Где: Germany

Репутация: 1
Всего: 1

Killer_13
Дата 14.7.2010, 22:30 (ссылка) | (нет голосов) Загрузка .

любитель

Профиль
Группа: Участник Клуба
Сообщений: 7954
Регистрация: 14.1.2006

Репутация: 79
Всего: 250

mes
Дата 14.7.2010, 22:36 (ссылка) | (нет голосов) Загрузка .
Цитата(boostcoder @ 14.7.2010, 21:28 )
просто

давайте не переходить на личности..

kemiisto
Дата 14.7.2010, 23:16 (ссылка) | (нет голосов) Загрузка .

Дикий Кот. =^.^=

Награды: 1

Профиль
Группа: Участник Клуба
Сообщений: 3292
Регистрация: 29.7.2007

Репутация: 5
Всего: 160

Цитата(mes @ 14.7.2010, 23:36 )
давайте не переходить на личности..

Он, видимо, не умеет по-иному.

Эх, andrew_121, как-то твои реинкарнации уже эммм. начинают утомлять.

Пей, кури, пиши на си!

borisbn
Дата 14.7.2010, 23:37 (ссылка) | (нет голосов) Загрузка .

Эксперт

Профиль
Группа: Завсегдатай
Сообщений: 4875
Регистрация: 6.2.2010
Где: Ростов-на-Дону

Репутация: 21
Всего: 135

Цитата(mes @ 14.7.2010, 21:57 )
раз инклуде заглядываем в его конец Цитата(Killer_13 @ 14.7.2010, 19:13 )код C++1:2:3:class Artikel <. >highlightSyntax(‘cpp_zQzZTl’,’cpp’);и все

mes, ну поделись, плиз, как ты на винграде выделяешь фон текста, причём внутри тэга code

любитель

Профиль
Группа: Участник Клуба
Сообщений: 7954
Регистрация: 14.1.2006

Репутация: 79
Всего: 250

mes
Дата 15.7.2010, 01:04 (ссылка) | (нет голосов) Загрузка .
Цитата(borisbn @ 14.7.2010, 22:37 )
причём внутри тэга code

другого не знаю..

Добавлено через 4 минуты и 3 секунды

Цитата(borisbn @ 14.7.2010, 22:37 )
ну поделись

такое ощущение (по интонации), что это не первая просьба ко мне.. и что я как будто чего то скрываю

Это сообщение отредактировал(а) mes — 15.7.2010, 01:06

borisbn
Дата 15.7.2010, 06:56 (ссылка) | (нет голосов) Загрузка .

Эксперт

Профиль
Группа: Завсегдатай
Сообщений: 4875
Регистрация: 6.2.2010
Где: Ростов-на-Дону

Репутация: 21
Всего: 135

1. Публиковать ссылки на вскрытые компоненты

2. Обсуждать взлом компонентов и делиться вскрытыми компонентами

  • Действия модераторов можно обсудить здесь
  • С просьбами о написании курсовой, реферата и т.п. обращаться сюда
  • Вопросы по реализации алгоритмов рассматриваются здесь
  • FAQ раздела лежит здесь!

Если Вам понравилась атмосфера форума, заходите к нам чаще! С уважением, JackYF, bsa.

Правила форума «C/C++: Для новичков»
0 Пользователей читают эту тему (0 Гостей и 0 Скрытых Пользователей)
0 Пользователей:
« Предыдущая тема | C/C++: Для новичков | Следующая тема »

[ Время генерации скрипта: 0.1636 ] [ Использовано запросов: 21 ] [ GZIP включён ]

Источник

Читайте также:  Sound devices open error

Adblock
detector

Hi, i’m an italian automation engineering student at 1st year of studies. I’ve just bought a PICkit3 to start mocking around with somethig different from Arduino or Cubloc controllers but after only 10 min of led blinking program develop i’m blocked by a stupid compiler error..

make -f nbproject/Makefile-default.mk SUBPROJECTS= .build-conf
make[1]: Entering directory `/Volumes/Emanuele/MPLABXProjects/LED BLINK.X'
make  -f nbproject/Makefile-default.mk dist/default/production/LED_BLINK.X.production.hex
make[2]: Entering directory `/Volumes/Emanuele/MPLABXProjects/LED BLINK.X'
"/Applications/microchip/xc8/v1.20/bin/xc8" --pass1  --chip=16F84 -Q -G  --double=24 --float=24 --opt=default,+asm,-asmfile,+speed,-space,-debug --addrqual=ignore --mode=free -P -N255 --warn=0 --asmlist --summary=default,-psect,-class,+mem,-hex,-file --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,+osccal,-resetbits,-download,-stackcall,+clib --output=-mcof,+elf "--errformat=%f:%l: error: %s" "--warnformat=%f:%l: warning: %s" "--msgformat=%f:%l: advisory: %s"  -obuild/default/production/newmain.p1  newmain.c
"/Applications/microchip/xc8/v1.20/bin/xc8"  --chip=16F84 -G -mdist/default/production/LED_BLINK.X.production.map  --double=24 --float=24 --opt=default,+asm,-asmfile,+speed,-space,-debug --addrqual=ignore --mode=free -P -N255 --warn=0 --asmlist --summary=default,-psect,-class,+mem,-hex,-file --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,+osccal,-resetbits,-download,-stackcall,+clib --output=-mcof,+elf "--errformat=%f:%l: error: %s" "--warnformat=%f:%l: warning: %s" "--msgformat=%f:%l: advisory: %s"   -odist/default/production/LED_BLINK.X.production.elf  build/default/production/newmain.p1     
:: warning: Omniscient Code Generation not available in Free mode
Microchip MPLAB XC8 C Compiler V1.20
Copyright (C) 2013 Microchip Technology Inc.
License type: Node Configuration

:0: error: undefined symbols:
        _ReadTimer0(dist/default/production/LED_BLINK.X.production.obj) _OpenTimer0(dist/default/production/LED_BLINK.X.production.obj) _WriteTimer0(dist/default/production/LED_BLINK.X.production.obj)
make[2]: Leaving directory `/Volumes/Emanuele/MPLABXProjects/LED BLINK.X'
make[1]: Leaving directory `/Volumes/Emanuele/MPLABXProjects/LED BLINK.X'
(908) exit status = 1
make[2]: *** [dist/default/production/LED_BLINK.X.production.hex] Error 1
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2

BUILD FAILED (exit value 2, total time: 768ms)


obviously in my code i’ve included /plib/timers.h and the IDE doesn’t put the «red dot» near the lines where i use OpenTimer0() or ReadTimer0()
but i get this error.. can anyone help me?

MPLAB X is running under MAC OSX 10.7.5 with XC8 compiler..

thanks and sorry for bad bad english.. |O


Форум программистов Vingrad

Модераторы: bsa

Страницы: (2) Все [1] 2 
( Перейти к первому непрочитанному сообщению )

Поиск:

Ответ в темуСоздание новой темы
Создание опроса
> Ошибка компилятора — не могу понять что исправить. 

V

   

Опции темы

Killer_13
  Дата 14.7.2010, 20:02 (ссылка)
| (нет голосов)
Загрузка ... Загрузка …




Быстрая цитата

Цитата

Опытный
**

Профиль
Группа: Участник
Сообщений: 740
Регистрация: 12.1.2008
Где: Germany

Репутация: 1
Всего: 1

Компилирую проект.
И мне вот такое.

Код

"/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make[1]: Entering directory `/d/NetBeans/CppApplication_Kap14'
"/bin/make"  -f nbproject/Makefile-Debug.mk dist/Debug/MinGW-Windows/cppapplication_kap14.exe
make[2]: Entering directory `/d/NetBeans/CppApplication_Kap14'
mkdir -p build/Debug/MinGW-Windows
rm -f build/Debug/MinGW-Windows/main.o.d
g++.exe    -c -g -MMD -MP -MF build/Debug/MinGW-Windows/main.o.d -o build/Debug/MinGW-Windows/main.o main.cpp
                 from c:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/ios:48,
                 from c:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/ostream:45,
                 from c:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/iostream:45,
                 from main.cpp:10:
In file included from c:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/localefwd.h:48,
c:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/functexcept.h:36: error: expected unqualified-id before "namespace"
make[2]: Leaving directory `/d/NetBeans/CppApplication_Kap14'
make[2]: *** [build/Debug/MinGW-Windows/main.o] Error 1
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2
make[1]: Leaving directory `/d/NetBeans/CppApplication_Kap14'

BUILD FAILED (exit value 2, total time: 2s)

Не знаю в чем ошибка.

Если кликнуть по ссылке(c:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/functexcept.h:36: error: expected unqualified-id before «namespace»), то откроется файл «functexcep.h» с вот таким содержанием.

Код

// Function-Based Exception Support -*- C++ -*-

// Copyright (C) 2001 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library.  This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.

// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING.  If not, write to the Free
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
// USA.

// As a special exception, you may use this file as part of a free software
// library without restriction.  Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License.  This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.

//
// ISO C++ 14882: 19.1  Exception classes
//

#include <exception_defines.h>

namespace std
{
  // Helper for exception objects in <except>
  void
  __throw_bad_exception(void);

  // Helper for exception objects in <new>
  void
  __throw_bad_alloc(void);

  // Helper for exception objects in <typeinfo>
  void
  __throw_bad_cast(void);

  void
  __throw_bad_typeid(void);

  // Helpers for exception objects in <stdexcept>
  void
  __throw_logic_error(const char* __s);

  void
  __throw_domain_error(const char* __s);

  void
  __throw_invalid_argument(const char* __s);

  void
  __throw_length_error(const char* __s);

  void
  __throw_out_of_range(const char* __s);

  void
  __throw_runtime_error(const char* __s);

  void
  __throw_range_error(const char* __s);

  void
  __throw_overflow_error(const char* __s);

  void
  __throw_underflow_error(const char* __s);

  // Helpers for exception objects in basic_ios
  void
  __throw_ios_failure(const char* __s);
} // namespace std

Программка складывается из 3 файликов в каждом есть «using namespace::std;»

PM MAIL   Вверх
mes
Дата 14.7.2010, 20:05 (ссылка)
| (нет голосов)
Загрузка ... Загрузка …




Быстрая цитата

Цитата

любитель
****

Профиль
Группа: Участник Клуба
Сообщений: 7954
Регистрация: 14.1.2006

Репутация: 79
Всего: 250

прежде чем думать на библиотеку свое проверьте,
файл main.cpp в студию 
smile

а лучше все три.. 

при том не все а только начало и конец.. середина не нужна.. 

Это сообщение отредактировал(а) mes — 14.7.2010, 20:08

———————

http://opendots.net

PM MAIL WWW   Вверх
Killer_13
Дата 14.7.2010, 20:13 (ссылка)
| (нет голосов)
Загрузка ... Загрузка …




Быстрая цитата

Цитата

Опытный
**

Профиль
Группа: Участник
Сообщений: 740
Регистрация: 12.1.2008
Где: Germany

Репутация: 1
Всего: 1

Код

#include <cstdlib>
#include "artikel.h"
#include <iostream>
#include <iomanip>
#include <string>

using namespace::std;
void test();

Artikel artikel1(1111, "Voleyball", 59.9);

int main() {

    cout<<"Die erste Anweisung in main().n"<<endl;
    Artikel artikel2(2222,"Turnschule",199.99);

    artikel1.print();
    artikel2.print();

    Artikel& schuhe = artikel2;

    schuhe.setNr(2233);
    schuhe.setName("Jogging Schhue");
    schuhe.setVK(schuhe.getVK() - 50.0);

    cout<<"n Die neuen Werte des Schuh-Objekts:n";
    schuhe.print();

    cout<<"nDer erste Aufruf von test()."<<endl;
    test();

    cout<<"nDer zweite Aufruf von test()."<<endl;
    test();

    cout<<"nDie letzte Anweisung in main().n"<<endl;

    return 0;
}

void test(){
    Artikel hemd (3333,"T-Shirt", 29.9);
    hemd.print();

    static Artikel netz(4444,"Volleyball-Netz", 99.0);
    netz.print();
    cout<<"nDie letzte Anweisung in der Funktion test()"<<endl;

}

Код

#include "artikel.h"
#include <iostream>
#include <iomanip>

using namespace::std;

int anzahl=0;

//-----------------------------------------------------------------------

Artikel::Artikel(long nr, const string& name, double vk){

    setNr(nr);
    setName(name);
    setVK(vk);

    ++anzahl;

    cout<<"Es wird ein Objekt fuer ein Artikel"<<name<<"angelegt.n"
        <<"Das ist der Anzahl"<<anzahl<<"-te Artikel!"<<endl;

}

//-----------------------------------------------------------------------

Artikel::~Artikel(){

    cout<<"Das Objekt fuer den Artikel"<<name<<"wird zerstort.n"
        <<"Es giebt noch"<<--anzahl<<" Artikel!"<<endl;

}

//-----------------------------------------------------------------------

void Artikel::print(){
    long savedFlags = cout.flags();

    cout<<fixed<<setprecision(2)
        <<"-------------------------------------------------------n"
        <<"Artikel-Daten:n"
        <<"   Nummer.......:"<<nr  <<'n'
        <<"   Name.........:"<<name  <<'n'
        <<"   Verkaufspreis:"<<vk  <<'n'
        <<"-------------------------------------------------------"
        <<endl;

    cout.flags(savedFlags);
    cout<<"---- Weiter mit der Return Taste ----";

    cin.get();

}

Код

#ifndef ARTIKEL_H
#define    ARTIKEL_H

#include <string>

using namespace::std;

class Artikel{
private:
    long nr;
    string name;
    double vk;

public:
    Artikel(long nr=0 ,const string& name="noname", double vk=0.0);
    ~Artikel();

    void print();
//-----------------------------------------------------------------------

    long getNr() const {return nr;}
    const string& getName() const {return name;}
    double getVK() const {return vk;}

//-----------------------------------------------------------------------

    void setNr(long n) {nr=n;}

    bool setName(const string& s) {

        if(s.size()<1)
            return false;
        name = s;
        return true;
    }
    void setVK(double v) {
        vk=vk<0.0?0.0:v;
    }

//-----------------------------------------------------------------------

}

#endif

PM MAIL   Вверх
mes
Дата 14.7.2010, 21:03 (ссылка)
| (нет голосов)
Загрузка ... Загрузка …




Быстрая цитата

Цитата

любитель
****

Профиль
Группа: Участник Клуба
Сообщений: 7954
Регистрация: 14.1.2006

Репутация: 79
Всего: 250

42 строчка в 3м блоке.. смотрите сами внимательно 
smile

Добавлено через 44 секунды
кстати, а середину то зачем выложили ? я ж предупредил, что она не нужна smile

———————

http://opendots.net

PM MAIL WWW   Вверх
kemiisto
Дата 14.7.2010, 21:12 (ссылка)
| (нет голосов)
Загрузка ... Загрузка …




Быстрая цитата

Цитата

Дикий Кот. =^.^=
****
Награды: 1

Профиль
Группа: Участник Клуба
Сообщений: 3292
Регистрация: 29.7.2007

Репутация: 5
Всего: 160

smile И вновь блеск и нищета С++. Препрцессор преврашает и без того закриптованные исходники в кровавое месиво, скармливает это дело компилятору. А тот лишь загадочно плюётся…

———————

XMPP-канал.

Unit testing isn’t enough. You need static typing.

Пей, кури, пиши на си! smile

PM MAIL WWW GTalk Jabber   Вверх
Killer_13
Дата 14.7.2010, 21:37 (ссылка)
| (нет голосов)
Загрузка ... Загрузка …




Быстрая цитата

Цитата

Опытный
**

Профиль
Группа: Участник
Сообщений: 740
Регистрация: 12.1.2008
Где: Germany

Репутация: 1
Всего: 1

Баламут я точку с запятой забыл. smile Пасиб. smile Если б показало на эту строку, догадался бы наверное, а так.. :(

PM MAIL   Вверх
kemiisto
Дата 14.7.2010, 21:39 (ссылка)
| (нет голосов)
Загрузка ... Загрузка …




Быстрая цитата

Цитата

Дикий Кот. =^.^=
****
Награды: 1

Профиль
Группа: Участник Клуба
Сообщений: 3292
Регистрация: 29.7.2007

Репутация: 5
Всего: 160

Цитата(Killer_13 @  14.7.2010,  22:37 Найти цитируемый пост)
Если б показало на эту строку, догадался бы наверное, а так.. :(  

Мораль сей басни такова: название раздела «C/C++: Для новичков» — это оксюморон. smile  

———————

XMPP-канал.

Unit testing isn’t enough. You need static typing.

Пей, кури, пиши на си! smile

PM MAIL WWW GTalk Jabber   Вверх
mes
Дата 14.7.2010, 21:57 (ссылка)
| (нет голосов)
Загрузка ... Загрузка …




Быстрая цитата

Цитата

любитель
****

Профиль
Группа: Участник Клуба
Сообщений: 7954
Регистрация: 14.1.2006

Репутация: 79
Всего: 250

Цитата(Killer_13 @  14.7.2010,  20:37 Найти цитируемый пост)
 Если б показало на эту строку, догадался бы наверное, а так.. :(  

так фактически показало :

Цитата(Killer_13 @  14.7.2010,  19:02 Найти цитируемый пост)
before «namespace»

смотрим что before

Цитата(Killer_13 @  14.7.2010,  19:13 Найти цитируемый пост)
Код

#include "artikel.h" 
#include <iostream>

раз инклуде заглядываем в его конец 

Цитата(Killer_13 @  14.7.2010,  19:13 Найти цитируемый пост)
Код

class Artikel{
...
}  

и все 
smile

Добавлено @ 21:58

Цитата(kemiisto @  14.7.2010,  20:39 Найти цитируемый пост)
«C/C++: Для новичков» — это оксюморон

тут просто новички должны быть другими (чем в разделах других ЯП) .. более предпреимчивыми и находчивыми 
smile

Это сообщение отредактировал(а) mes — 14.7.2010, 22:34

———————

http://opendots.net

PM MAIL WWW   Вверх
boostcoder
Дата 14.7.2010, 22:28 (ссылка)
 | (голосов:4)
Загрузка ... Загрузка …




Быстрая цитата

Цитата

pattern`щик
****

Профиль
Группа: Завсегдатай
Сообщений: 5458
Регистрация: 1.4.2010

Репутация: 20
Всего: 110

Модератор: Сообщение скрыто.

———————

компилятор онлайн с поддержкой C++11
сборки компиляторов MinGW

PM WWW   Вверх
Killer_13
Дата 14.7.2010, 22:30 (ссылка)
| (нет голосов)
Загрузка ... Загрузка …




Быстрая цитата

Цитата

Опытный
**

Профиль
Группа: Участник
Сообщений: 740
Регистрация: 12.1.2008
Где: Germany

Репутация: 1
Всего: 1

Да, согласен. Еще нет такого набитого глаза и понимания где сразу нужно смотреть. :(
Спасибо, вопрос решен.

PM MAIL   Вверх
mes
Дата 14.7.2010, 22:36 (ссылка)
| (нет голосов)
Загрузка ... Загрузка …




Быстрая цитата

Цитата

любитель
****

Профиль
Группа: Участник Клуба
Сообщений: 7954
Регистрация: 14.1.2006

Репутация: 79
Всего: 250

Цитата(boostcoder @  14.7.2010,  21:28 Найти цитируемый пост)
просто

давайте не переходить на личности.. 

———————

http://opendots.net

PM MAIL WWW   Вверх
kemiisto
Дата 14.7.2010, 23:16 (ссылка)
| (нет голосов)
Загрузка ... Загрузка …




Быстрая цитата

Цитата

Дикий Кот. =^.^=
****
Награды: 1

Профиль
Группа: Участник Клуба
Сообщений: 3292
Регистрация: 29.7.2007

Репутация: 5
Всего: 160

Цитата(mes @  14.7.2010,  23:36 Найти цитируемый пост)
давайте не переходить на личности.. 

Он, видимо, не умеет по-иному.

Эх, andrew_121, как-то твои реинкарнации уже эммм… начинают утомлять. smile

———————

XMPP-канал.

Unit testing isn’t enough. You need static typing.

Пей, кури, пиши на си! smile

PM MAIL WWW GTalk Jabber   Вверх
borisbn
Дата 14.7.2010, 23:37 (ссылка)
| (нет голосов)
Загрузка ... Загрузка …




Быстрая цитата

Цитата

Эксперт
****

Профиль
Группа: Завсегдатай
Сообщений: 4875
Регистрация: 6.2.2010
Где: Ростов-на-Дону

Репутация: 21
Всего: 135

Цитата(mes @  14.7.2010,  21:57 Найти цитируемый пост)
раз инклуде заглядываем в его конец Цитата(Killer_13 @  14.7.2010,  19:13 )код C++1:2:3:class Artikel{…}  highlightSyntax(‘cpp_zQzZTl’,’cpp’);и все 

mes, ну поделись, плиз, как ты на винграде выделяешь фон текста, причём внутри тэга code

———————

Женщины отличаются от программистов тем, что у них чары состоят из стрингов

PM MAIL Jabber   Вверх
mes
Дата 15.7.2010, 01:04 (ссылка)
| (нет голосов)
Загрузка ... Загрузка …




Быстрая цитата

Цитата

любитель
****

Профиль
Группа: Участник Клуба
Сообщений: 7954
Регистрация: 14.1.2006

Репутация: 79
Всего: 250

Цитата(borisbn @  14.7.2010,  22:37 Найти цитируемый пост)
причём внутри тэга code

Код

       <- жирный шрифт для пробелов 

другого не знаю..

Добавлено через 4 минуты и 3 секунды

Цитата(borisbn @  14.7.2010,  22:37 Найти цитируемый пост)
ну поделись

такое ощущение (по интонации), что это не первая просьба ко мне.. и что я как будто чего то скрываю smile

Это сообщение отредактировал(а) mes — 15.7.2010, 01:06

———————

http://opendots.net

PM MAIL WWW   Вверх
borisbn
Дата 15.7.2010, 06:56 (ссылка)
| (нет голосов)
Загрузка ... Загрузка …




Быстрая цитата

Цитата

Эксперт
****

Профиль
Группа: Завсегдатай
Сообщений: 4875
Регистрация: 6.2.2010
Где: Ростов-на-Дону

Репутация: 21
Всего: 135

   mes   , спасибо, просто это не первая    моя    просьба рассказать, как выделять фон. Всё, хватит флуда (это я себе) smile

———————

Женщины отличаются от программистов тем, что у них чары состоят из стрингов

PM MAIL Jabber   Вверх



















Страницы: (2) Все [1] 2 

Ответ в темуСоздание новой темы
Создание опроса
Правила форума «C/C++: Для новичков»
JackYF
bsa

Запрещается!

1. Публиковать ссылки на вскрытые компоненты

2. Обсуждать взлом компонентов и делиться вскрытыми компонентами

  • Действия модераторов можно обсудить здесь
  • С просьбами о написании курсовой, реферата и т.п. обращаться сюда
  • Вопросы по реализации алгоритмов рассматриваются здесь

  • FAQ раздела лежит здесь!

Если Вам понравилась атмосфера форума, заходите к нам чаще! С уважением, JackYF, bsa.

 

0 Пользователей читают эту тему (0 Гостей и 0 Скрытых Пользователей)
0 Пользователей:
« Предыдущая тема | C/C++: Для новичков | Следующая тема »

The build fails at make step with the error:

[ 87%] Linking CXX static library libmicrosim_devices.a
[ 87%] Built target microsim_devices
[ 87%] Linking CXX static library libmicrosim.a
[ 87%] Built target microsim
make: *** [Makefile:141: all] Error 2

More information below.

cmake ../.. output:

-- CMAKE_BINARY_DIR: /home/parthj/sumo-1.6.0
-- CMAKE_SOURCE_DIR: /home/parthj/sumo-1.6.0
-- 
-- Platform: 
--     Host: Linux-3.10.0-1062.12.1.el7.x86_64 x86_64
--     Target: Linux-3.10.0-1062.12.1.el7.x86_64 x86_64
--     CMake: 3.8.2
--     CMake generator: Unix Makefiles
--     CMake build tool: /usr/bin/gmake
--     Compiler: GNU 5.4.0
-- 
-- Found Python: /cvmfs/soft.computecanada.ca/easybuild/software/2017/Core/python/3.6.3/bin/python
-- Found GTest: /cvmfs/soft.computecanada.ca/easybuild/software/2017/Core/gtest/1.10.0/lib64/libgtest.a  
-- Found Proj: /project/6019546/parthj/repos/sumo-gui-deps/proj-7.1.1/build/lib/libproj.so
-- Found Fox: -L/home/parthj/projects/def-ssanner/parthj/repos/fox-1.6.57/build/lib -lFOX-1.6 -lX11 -lXext -lfreetype -lfontconfig -lXft -lXcursor -lXrender -lXrandr -lXfixes -lXi -lGL -lGLU -ldl -lpthread -lrt -ljpeg -lpng -ltiff -lz -lbz2 -lGLU -lGL
-- Warning, could not run java -version
-- Found Java: /usr/bin/java  found components:  Development 
-- Warning, could not run java -version
-- Found Java: /usr/bin/java  
-- Enabled features: Linux-3.10.0-1062.12.1.el7.x86_64 x86_64 GNU 5.4.0 Release Proj GUI SWIG GDAL FFmpeg OSG GL2PS Eigen
-- Configuring done
-- Generating done
-- Build files have been written to: /home/parthj/sumo-1.6.0

Below error that shows in the middle of the make process, but make process continues to progress:

<path>/sumo-1.6.0/unittest/src/utils/common/StringTokenizerTest.cpp:22:25: fatal error: gtest/gtest.h: No such file or directory
compilation terminated.
make[2]: *** [unittest/src/utils/common/CMakeFiles/testcommon.dir/build.make:63: unittest/src/utils/common/CMakeFiles/testcommon.dir/StringTokenizerTest.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:5893: unittest/src/utils/common/CMakeFiles/testcommon.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....

The make error points to line 141 of MakeFile. Clipped code from that file with line numbers as comments:

# The main all target  # 138
all: cmake_check_build_system  # 139
	$(CMAKE_COMMAND) -E cmake_progress_start /home/parthj/sumo-1.6.0/CMakeFiles /home/parthj/sumo-1.6.0/CMakeFiles/progress.marks  # 140
	$(MAKE) -f CMakeFiles/Makefile2 all  # 141
	$(CMAKE_COMMAND) -E cmake_progress_start /home/parthj/sumo-1.6.0/CMakeFiles 0  # 142
.PHONY : all  # 143

Not sure where to proceed from here. Thanks.

Edit1:
Ran again with make -d -j$(nproc). Got the error:

[ 98%] Linking CXX executable ../../bin/testlibsumo
Reaping winning child 0x9fa370 PID 22778 
Live child 0x9fa370 (bin/testlibsumo) PID 22786 
/cvmfs/soft.computecanada.ca/nix/store/aj0bl3ac193y0y66iaj258n3z8hvz19f-binutils-2.28/bin/ld: warning: libFOX-1.6.so.0, needed by ../../tools/libsumo/libsumoc.so, not found (try using -rpath or -rpath-link)
../../tools/libsumo/libsumoc.so: undefined reference to `FX::FXCondition::signal()'
../../tools/libsumo/libsumoc.so: undefined reference to `FX::FXThread::join()'
../../tools/libsumo/libsumoc.so: undefined reference to `FX::FXCondition::FXCondition()'
../../tools/libsumo/libsumoc.so: undefined reference to `FX::FXThread::FXThread()'
../../tools/libsumo/libsumoc.so: undefined reference to `FX::FXMutex::unlock()'
../../tools/libsumo/libsumoc.so: undefined reference to `FX::FXCondition::~FXCondition()'
../../tools/libsumo/libsumoc.so: undefined reference to `FX::FXCondition::wait(FX::FXMutex&)'
../../tools/libsumo/libsumoc.so: undefined reference to `FX::FXThread::start(unsigned long)'
../../tools/libsumo/libsumoc.so: undefined reference to `FX::FXMutex::~FXMutex()'
../../tools/libsumo/libsumoc.so: undefined reference to `FX::FXMutex::lock()'
../../tools/libsumo/libsumoc.so: undefined reference to `typeinfo for FX::FXThread'
../../tools/libsumo/libsumoc.so: undefined reference to `FX::FXThread::~FXThread()'
../../tools/libsumo/libsumoc.so: undefined reference to `FX::FXMutex::FXMutex(unsigned char)'
collect2: error: ld returned 1 exit status
Reaping losing child 0x9fa370 PID 22786 
make[2]: *** [src/traci_testclient/CMakeFiles/testlibsumo.dir/build.make:96: bin/testlibsumo] Error 1
Removing child 0x9fa370 PID 22786 from chain.
Reaping losing child 0x1492fe0 PID 22773 
make[1]: *** [CMakeFiles/Makefile2:3294: src/traci_testclient/CMakeFiles/testlibsumo.dir/all] Error 2
Removing child 0x1492fe0 PID 22773 from chain.
Released token for child 0x1492fe0 (src/traci_testclient/CMakeFiles/testlibsumo.dir/all).
make[1]: *** Waiting for unfinished jobs....
Live child 0x159a6f0 (src/libsumo/CMakeFiles/libsumojni.dir/all) PID 22526 
Live child 0x15916d0 (src/libsumo/CMakeFiles/_libsumo.dir/all) PID 22527 
Reaping winning child 0x17f3de0 PID 22614 
Live child 0x17f3de0 (bin/liblibsumojni.so) PID 23338 
Error occurred during initialization of VM
Could not allocate metaspace: 1073741824 bytes
Reaping losing child 0x17f3de0 PID 23338 
make[2]: *** [src/libsumo/CMakeFiles/libsumojni.dir/build.make:165: bin/liblibsumojni.so] Error 1
make[2]: *** Deleting file 'bin/liblibsumojni.so'

Edit2:
Above seems error due to the fox library so adding below lines from CMakeCache.txt that represent fox paths:

//Path to a program.
FOX_CONFIG:FILEPATH=<path>/repos/fox-1.6.57/build/bin/fox-config

//Path to a file.
FOX_INCLUDE_DIR:PATH=<path>/repos/fox-1.6.57/build/include

//Path to a library.
FOX_LIBRARY:FILEPATH=<path>/repos/fox-1.6.57/build/lib/libFOX-1.6.so

Понравилась статья? Поделить с друзьями:
  • Major system error marmozets текст
  • Major system error marmozets аккорды
  • Mafia 2 вне диапазона как исправить
  • Mafia 2 runtime error
  • Mae mean absolute error это