|
|
Регистрация Восстановить пароль |
Регистрация | Задать вопрос |
Заплачу за решение |
Новые сообщения |
Сообщения за день |
Расширенный поиск |
Правила |
Всё прочитано |
|
|
Опции темы | Поиск в этой теме |
22.09.2011, 12:20 | #1 |
Форумчанин
Регистрация: 02.06.2011
Сообщений: 282
|
странное поведение компилятора
суть:
создаю в вижуале 10 обчный проект win32 console. подключаю библиотеку "mathx.h" и провожу некоторые действия с объектами описанными в этой библиотеке. компилирую все отлично. далее необходимо обернуть программу в оболочку. создаю проект MFC dialog based. так же подключаю эту библиотеку и провожу те же самые действия. компилирую и..... выдается куча ошибок внутри этой библиотеки. если важно, все фалы в библиотеке с расширением .h что такое?? Последний раз редактировалось Kukurudza; 22.09.2011 в 12:26. |
22.09.2011, 13:17 | #2 |
Старожил
Регистрация: 06.08.2009
Сообщений: 2,992
|
А что за ошибки?
|
22.09.2011, 13:25 | #3 |
Форумчанин
Регистрация: 02.06.2011
Сообщений: 282
|
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\common_mathx.h(242) : error C2062: type 'char' unexpected
1> c:\program files (x86)\microsoft visual studio 10.0\vc\include\uint_mathx.h(63) : see reference to function template instantiation 't &mathx_mul_t<uint_t<hi_lo>>(t *,const t &)' being compiled 1> with 1> [ 1> t=uint_t<mathx_u256>, 1> hi_lo=mathx_u256 1> ] 1> c:\program files (x86)\microsoft visual studio 10.0\vc\include\uint_mathx.h(63) : while compiling class template member function 'uint_t<hi_lo> &uint_t<hi_lo>:perator *=(const uint_t<hi_lo> &)' 1> with 1> [ 1> hi_lo=mathx_u256 1> ] 1> c:\program files (x86)\microsoft visual studio 10.0\vc\include\int_shared_mathx.h( 152) : see reference to class template instantiation 'uint_t<hi_lo>' being compiled 1> with 1> [ 1> hi_lo=mathx_u256 1> ] 1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\common_mathx.h(251) : warning C4091: '' : ignored on left of 'char' when no variable is declared 1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\common_mathx.h(251) : error C2143: syntax error : missing ';' before '*=' 1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\common_mathx.h(251) : error C2143: syntax error : missing ';' before '*=' 1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\common_mathx.h(255) : error C2062: type 'char' unexpected 1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\common_mathx.h(255) : error C2143: syntax error : missing ';' before '{' 1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\common_mathx.h(255) : error C2062: type 'char' unexpected 1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\common_mathx.h(255) : error C2513: 'char' : no variable declared before '=' 1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\common_mathx.h(261) : error C2062: type 'char' unexpected 1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\common_mathx.h(261) : error C2143: syntax error : missing ';' before ')' 1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\common_mathx.h(261) : error C2143: syntax error : missing ';' before ')' 1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\common_mathx.h(262) : error C2143: syntax error : missing ';' before '{' 1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\common_mathx.h(263) : error C2143: syntax error : missing ')' before '.' 1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\common_mathx.h(263) : error C2059: syntax error : '.' 1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\common_mathx.h(263) : error C2059: syntax error : ')' 1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\common_mathx.h(264) : warning C4091: '' : ignored on left of 'char' when no variable is declared 1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\common_mathx.h(264) : error C2143: syntax error : missing ';' before '>>=' 1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\common_mathx.h(264) : error C2143: syntax error : missing ';' before '>>=' |
22.09.2011, 13:26 | #4 |
Форумчанин
Регистрация: 02.06.2011
Сообщений: 282
|
во, что обнаружил. если закоментить все функции которые преобразуют числа в строки string то компилится
Последний раз редактировалось Kukurudza; 22.09.2011 в 13:35. |
22.09.2011, 13:35 | #5 |
Старожил
Регистрация: 06.08.2009
Сообщений: 2,992
|
Возможно, там одна-единственная проблема (common_mathx.h, строка 251), которая вызвала у компилятора такую истерику. Покажи код вокруг этого места.
|
22.09.2011, 13:44 | #6 |
Форумчанин
Регистрация: 02.06.2011
Сообщений: 282
|
Код:
|
22.09.2011, 13:52 | #7 |
Форумчанин
Регистрация: 02.06.2011
Сообщений: 282
|
Код:
|
22.09.2011, 14:04 | #8 |
Software Engineer
Участник клуба
Регистрация: 07.04.2007
Сообщений: 1,618
|
Возможно проблема с юникодом. Попробуйте отключить его в настройках проекта (или включить, если он отключен в данный момент)
Мужество есть лишь у тех, кто ощутил сердцем страх, кто смотрит в пропасть, но смотрит с гордостью в глазах. (с) Ария
|
22.09.2011, 14:19 | #9 |
Форумчанин
Регистрация: 02.06.2011
Сообщений: 282
|
properties -> general -> character set
попробовал все предложенные не помогло |
22.09.2011, 16:41 | #10 |
Старожил
Регистрация: 06.08.2009
Сообщений: 2,992
|
Попробуй наоборот, заменить в своём коде все char на wchar_t, string на wstring, и т. д.
|
|
Похожие темы | ||||
Тема | Автор | Раздел | Ответов | Последнее сообщение |
Странное поведение realloc | eraserhp | Общие вопросы C/C++ | 7 | 17.05.2010 09:52 |
Странное поведение gets | alex_alpha | Общие вопросы C/C++ | 3 | 27.03.2010 18:21 |
Странное поведение null | Vitalyk | JavaScript, Ajax | 6 | 13.02.2010 15:22 |
Странное поведение процедуры | Sergey1974 | Общие вопросы Delphi | 2 | 11.12.2009 21:41 |
Странное поведение DLL | Yurk@ | Компоненты Delphi | 4 | 01.02.2009 01:23 |