Страница 1 из 12
		
			
				Помогите начинающему
				
Добавлено: 
24.04.2007 14:21:03 DmiSb
				Установил FPC 2.0.4, MSEIDE согласно инструкции. Пытаюсь создать новый проект. 
При компиляции ругается :
mseguiintf.pas(1300,2) Error: GOTO and LABEL are not supported (use switch -Sg)
mseguiintf.pas(1336,8) Error: GOTO and LABEL are not supported (use switch -Sg)
mseguiintf.pas(1343,8) Error: GOTO and LABEL are not supported (use switch -Sg)
mseguiintf.pas(1367,2) Error: GOTO and LABEL are not supported (use switch -Sg)
mseguiintf.pas(1403,8) Error: GOTO and LABEL are not supported (use switch -Sg)
mseguiintf.pas(1409,8) Error: GOTO and LABEL are not supported (use switch -Sg)
mseguiintf.pas(3744,18) Warning: range check error while evaluating constants
mseguiintf.pas(3952) Fatal: There were 6 errors compiling module, stopping
mseguiintf.pas(7,73) Fatal: Compilation aborted
Подскажите, чем это лечиться.
ОС - Win XP
Заранее спасибо
			 
			
		
			
				
				
Добавлено: 
24.04.2007 15:06:53 shade
				Компилятор сам сказал, что лечиться это дело добавлением ключа -Sg
fpc -Sg ...
			 
			
		
			
				
				
Добавлено: 
24.04.2007 15:31:14 debi12345
				shade писал(а):Компилятор сам сказал, что лечиться это дело добавлением ключа -Sg
fpc -Sg ...
Не думаю. "Там" с опциями по умолчанию все в порядке - если проект по шаблону делается.
Обычно такая ругань идет, когда FreePascal неверно настроен - отсутствует или кривой "fpc.cfg". Особо вероятно при ручном переходе версий с 2.0.4 на 2.0.5 - смена версии требует ручной  корректировки конфига.
MakeCfg, кстати - создает неверный (для Win32) конфиг, с относительными путями, а нужны абсолютные.
 
			
		
			
				
				
Добавлено: 
24.04.2007 15:51:33 DmiSb
				> Компилятор сам сказал, что лечиться это дело добавлением ключа -Sg 
Добавил в опциях проекта ключик -Sg, вроде дальше пошло, но...
Fatal: Can't find unit fpimage
Fatal: Compilation aborted
Понятно, что FreePascal неверно настроен - fpc.cfg отсутствует. Версию не менял, только сегодня поставил.
Подскажите как сделать правильный конфиг.
			 
			
		
			
				
				
Добавлено: 
24.04.2007 17:30:51 shade
				Вот пример моего конфига, основанного на том который создал инсталлятор:
- Код: Выделить всё
- #
 # Config file generated by fpcmkcfg on 18.12.2006 - 20:27
 # Example fpc.cfg for Free Pascal Compiler
 #
 
 # ----------------------
 # Defines (preprocessor)
 # ----------------------
 
 #
 # nested #IFNDEF, #IFDEF, #ENDIF, #ELSE, #DEFINE, #UNDEF are allowed
 #
 # -d is the same as #DEFINE
 # -u is the same as #UNDEF
 #
 
 #
 # Some examples (for switches see below, and the -? helppages)
 #
 # Try compiling with the -dRELEASE or -dDEBUG on the commandline
 #
 
 # For a release compile with optimizes and strip debuginfo
 #IFDEF RELEASE
 -O2p3
 -Xs
 #WRITE Compiling Release Version
 #ENDIF
 
 # For a debug version compile with debuginfo and all codegeneration checks on
 #IFDEF DEBUG
 -glh
 -Crtoi
 #WRITE Compiling Debug Version
 #ENDIF
 
 # ----------------
 # Parsing switches
 # ----------------
 
 # Pascal language mode
 #      -Mfpc      free pascal dialect (default)
 #      -Mobjfpc   switch some Delphi 2 extensions on
 #      -Mdelphi   tries to be Delphi compatible
 #      -Mtp       tries to be TP/BP 7.0 compatible
 #      -Mgpc      tries to be gpc compatible
 #      -Mmacpas   tries to be compatible to the macintosh pascal dialects
 #
 # Turn on Object Pascal extensions by default
 #-Mobjfpc
 
 # Assembler reader mode
 #      -Rdefault  use default assembler
 #      -Ratt      read AT&T style assembler
 #      -Rintel    read Intel style assembler
 #
 # All assembler blocks are AT&T styled by default
 #-Ratt
 
 # Semantic checking
 #      -S2        same as -Mobjfpc
 #      -Sc        supports operators like C (*=,+=,/= and -=)
 #      -Sa        include assertion code.
 #      -Sd        same as -Mdelphi
 #      -Se<x>     compiler stops after the <x> errors (default is 1)
 #      -Sg        allow LABEL and GOTO
 #      -Sh        Use ansistrings
 #      -Si        support C++ styled INLINE
 #      -SI<x>     set interface style to <x>
 #         -SIcomCOM compatible interface (default)
 #         -SIcorbaCORBA compatible interface
 #      -Sm        support macros like C (global)
 #      -So        same as -Mtp
 #      -Sp        same as -Mgpc
 #      -Ss        constructor name must be init (destructor must be done)
 #      -St        allow static keyword in objects
 #
 # Allow goto, inline, C-operators, C-vars
 -Sgic
 
 # ---------------
 # Code generation
 # ---------------
 
 # Uncomment the next line if you always want static/dynamic units by default
 # (can be overruled with -CD, -CS at the commandline)
 #-CS
 #-CD
 
 # Set the default heapsize to 8Mb
 #-Ch8000000
 
 # Set default codegeneration checks (iocheck, overflow, range, stack)
 #-Ci
 #-Co
 #-Cr
 #-Ct
 
 # Optimizer switches for i386 compiler
 # -Os        generate smaller code
 # -O1        level 1 optimizations (quick optimizations)
 # -O2        level 2 optimizations (-O1 + slower optimizations)
 # -O3        level 3 optimizations (same as -O2u)
 # -Oa=N      set alignment to N
 # -OoX       switch on optimalization X.
 # -OoNOX     switch off optimalization X.
 #               X is one of REGVAR UNCERTAIN STACKFRAME PEEPHOLE ASMCSE LOOPUNROLL
 # -OpCPU     set target processor.
 #             CPU is one of 386, PENTIUM, PENTIUM2, PENTIUM3, PENTIUM4, PENTIUMM
 
 
 # -----------------------
 # Set Filenames and Paths
 # -----------------------
 
 # Both slashes and backslashes are allowed in paths
 
 # path to the messagefile, not necessary anymore but can be used to override
 # the default language
 #-Frd:\bin\FPC\2.0.4/msg/errore.msg
 #-Frd:\bin\FPC\2.0.4/msg/errorn.msg
 #-Frd:\bin\FPC\2.0.4/msg/errores.msg
 #-Frd:\bin\FPC\2.0.4/msg/errord.msg
 #-Frd:\bin\FPC\2.0.4/msg/errorr.msg
 
 # path to the gcclib
 #-Fld:\bin\FPC\2.0.4/lib
 
 # searchpath for includefiles
 #-Fi/pp/inc;/pp/rtl/inc
 
 # searchpath for includefiles
 # release them only if you know what you do
 # because this could cause a rebuild of the runtime library
 # if you tell them compiler/ide to build the project (FK)
 #-Fid:\bin\FPC\2.0.4/source/rtl/inc;d:\bin\FPC\2.0.4/source/rtl/i386
 
 # searchpath for objectfiles
 #-Fod:\bin\FPC\2.0.4/source/rtl/inc;d:\bin\FPC\2.0.4/source/rtl/i386
 
 # searchpath for units and other system dependent things
 -FuD:\pp\units\$FPCTARGET/
 -FuD:\pp\units\$FPCTARGET/*
 -FuD:\pp\units\$FPCTARGET/rtl
 
 # searchpath for libraries
 #-Fld:\bin\FPC\2.0.4/lib
 #-Fl/lib;/usr/lib
 
 # searchpath for tools
 #-FDd:\bin\FPC\2.0.4/bin/$FPCTARGET
 
 
 # -------------
 # Linking
 # -------------
 
 # generate always debugging information for GDB (slows down the compiling
 # process)
 #      -gc        generate checks for pointers
 #      -gd        use dbx
 #      -gg        use gsym
 #      -gh        use heap trace unit (for memory leak debugging)
 #      -gl        use line info unit to show more info for backtraces
 #      -gv        generates programs tracable with valgrind
 #      -gw        generate dwarf debugging info
 #
 # Enable debuginfo and use the line info unit by default
 #-gl
 
 # always pass an option to the linker
 #-k-s
 
 # Always strip debuginfo from the executable
 -Xs
 
 
 # -------------
 # Miscellaneous
 # -------------
 
 # Write always a nice FPC logo ;)
 -l
 
 # Verbosity
 #      e : Show errors (default)       d : Show debug info
 #      w : Show warnings               u : Show unit info
 #      n : Show notes                  t : Show tried/used files
 #      h : Show hints                  m : Show defined macros
 #      i : Show general info           p : Show compiled procedures
 #      l : Show linenumbers            c : Show conditionals
 #      a : Show everything             0 : Show nothing (except errors)
 #      b : Show all procedure          r : Rhide/GCC compatibility mode
 #          declarations if an error    x : Executable info (Win32 only)
 #          occurs
 #
 # Display Info, Warnings, Notes and Hints
 -viwn
 # If you don't want so much verbosity use
 #-vw
Тебе нужно поправить пути в этих строчках, так же добавь туда пути к юнитам MSE
- Код: Выделить всё
- # searchpath for units and other system dependent things
 -FuD:\pp\units\$FPCTARGET/
 -FuD:\pp\units\$FPCTARGET/*
 -FuD:\pp\units\$FPCTARGET/rtl
 
			
		
			
				
				
Добавлено: 
05.09.2007 04:36:30 bw
				Здравствуйте:
- FPC 2.3.1 (svn 8373)
- MSEgui 1.3 unstable или что-то такое (svn 1537, вчерашний)
- MSEide 1.0
При попытке собрать MSEide из того же среза svn, как и при попытке собрать любой демо-проект, пишет:
- Код: Выделить всё
- Free Pascal Compiler version 2.3.1 [2007/08/29] for i386
 Copyright (c) 1993-2007 by Florian Klaempfl
 Target OS: Win32 for i386
 ...
 msegraphics.pas(636,72) Error: range check error while evaluating constants
 msegraphics.pas(638,65) Error: range check error while evaluating constants
 msegraphics.pas(640,54) Error: range check error while evaluating constants
 msegraphics.pas(961,73) Error: range check error while evaluating constants
 msegraphics.pas(963,62) Error: range check error while evaluating constants
 msegraphics.pas(1138,1) Fatal: There were 5 errors compiling module, stopping
 Fatal: Compilation aborted
 
То же самое присходило с MSEgui 1.0, но этой же версией FPC. Понимаю что это связано с версией FPC, но другую поставить не могу, что делать? Можно как-то вылечить?
p.s. Поставил флаг -n, что бы исключить загрузку конфига и возможно использования -Cr - не помогло. Поставил {$R-} в проблемный модуль - бесполезно. Дело явно в другом.
..bw
 
			
		
			
				
				
Добавлено: 
05.09.2007 08:14:42 debi12345
				добавьте "-dmse_FPC_2_2" в опциях MAKE.
			 
			
		
			
				
				
Добавлено: 
05.09.2007 08:35:32 bw
				Не помогло.
mse_FPC_2_2 в msegraphics.pas вообще не используется.
Ошибка возникает в строке и подобных с типом colorty:
property color: colorty read getcolor write setcolor default cl_text;
..bw
			 
			
		
			
				
				
Добавлено: 
05.09.2007 09:17:10 bw
				Исправил в msegraphics.pas:
colorty = type longword;
на
colorty = type longint;
Заработало.
Но вообще продукт похоже очень сырой. В facedemo при кликах на меню (не выпадающих) возникает исключение AV.
..bw
			 
			
		
			
				
				
Добавлено: 
05.09.2007 12:02:15 debi12345
				Понял, старый прикол - похоже, вы неправильно обновились на FPC 2.3 - поэтому FPC частично использует модули из старой версии ( если таковая есть на диске ). Скорее всего, перед сборкой версии 2.2/2.3 нужно исправить пути в "fpc.cfg".
Вообще, ручной апгрэйд с 2.0 на 2.2 - многоступенчатый процесс не для слабонервных.
			 
			
		
			
				
				
Добавлено: 
05.09.2007 14:20:44 bw
				Последней версией была 2.1.1. На ней я собрал компилятор 2.3.1 ну понятно дело RTL был от 2.3.1. Мне следует пересобрать компилятор уже с новой версией RTL?
Вообще не в тему, но я хочу остановиться на последней релизной версии или том срезе который ближе всего к последней релизной. Видимо это 2.2.0. Тогда мне лучше взять код из tags/release_2_2_0? Суть в том что я пишу RTL для KolibriOS и хочу что бы люди могли работать с этим RTL не обновляя постоянно код из SVN, а пользовались определенной релизной версией FPC (к примеру 2.2.0).
p.s. А старый прикол, это с типами или с AV?
..bw
			 
			
		
			
				
				
Добавлено: 
05.09.2007 14:49:28 debi12345
				p.s. А старый прикол, это с типами или с AV? 
msegraphics...
 
			
		
			
				
				
Добавлено: 
05.09.2007 16:14:53 debi12345
				пересобрать компилятор уже с новой версией RTL? 
Да, потому что версия зашивается в компилятор.
 
			
		
			
				
				
Добавлено: 
20.09.2007 00:05:29 Attid
				обновлв MSE  скомпилил из ком строки 
после это во всех проэктах сыпалось куча ошибок типа 
- Код: Выделить всё
- mseguiintf.pas(3435,25) Warning: Some fields coming after "name" weren't initialized
 mseguiintf.pas(3436,25) Warning: Some fields coming after "name" weren't initialized
 mseguiintf.pas(3437,27) Warning: Some fields coming after "name" weren't initialized
 mseguiintf.pas(3438,27) Warning: Some fields coming after "name" weren't initialized
перекомпили мсе из гуи все стало нармалек.
 
			
		
			
				
				
Добавлено: 
20.09.2007 12:06:25 haword
				Внесу свой глюк, 
- Код: Выделить всё
- Free Pascal Compiler version 2.2.1 [2007/09/05] for i386
 Copyright (c) 1993-2007 by Florian Klaempfl
 Target OS: Win32 for i386
 Compiling mseide.pas
 Compiling actionsmodule.pas
 Compiling main.pas
 Compiling sourcepage.pas
 Compiling breakpointsform.pas
 Compiling sourceform.pas
 Compiling sourcepage.pas
 Compiling pascaldesignparser.pas
 Compiling msedesigner.pas
 Compiling D:\VirtualPC\MY\msegui\lib\common\designutils\msedesignintf.pas
 Compiling msedesigner.pas
 Compiling D:\VirtualPC\MY\msegui\lib\common\designutils\msepropertyeditors.pas
 Compiling msedesigner.pas
 Compiling formdesigner.pas
 Compiling componentpaletteform.pas
 Compiling main.pas
 Compiling sourcepage.pas
 Compiling sourceform.pas
 Compiling projectoptionsform.pas
 Compiling sourceform.pas
 Compiling main.pas
 main.pas(36,76) Warning: Some fields coming after "flags" weren't initialized
 main.pas(37,53) Warning: Some fields coming after "flags" weren't initialized
 main.pas(38,51) Warning: Some fields coming after "flags" weren't initialized
 Compiling D:\VirtualPC\MY\msegui\lib\common\regcomponents\regwidgets.pas
 Compiling formdesigner.pas
 Compiling D:\VirtualPC\MY\msegui\lib\common\report\msereport.pas
 Compiling D:\VirtualPC\MY\msegui\lib\common\printer\msegdiprint.pas
 msegdiprint.pas(18,49) Error: Identifier not found "tcustomprinter"
 msegdiprint.pas(19,14) Error: There is no method in an ancestor class to be overridden: "tgdiprintcanvas.drawtext(var drawtextinfoty)"
 msegdiprint.pas(36,14) Error: There is no method in an ancestor class to be overridden: "tgdiprinter.endprint"
 msegdiprint.pas(44,1) Fatal: There were 3 errors compiling module, stopping
 Fatal: Compilation aborted