FreeBasic
Главная
Вход
Регистрация
Пятница, 19.04.2024, 14:11Приветствую Вас Гость | RSS
[ Новые сообщения · Участники · Правила форума · Поиск · RSS ]
  • Страница 1 из 1
  • 1
Форум » Freebasic » Вопросы по языку FreeBasic » Вышла новая версия компилятора FreeBasic (1.03.0)
Вышла новая версия компилятора FreeBasic (1.03.0)
haavДата: Пятница, 03.07.2015, 07:22 | Сообщение # 1
Генералиссимус
Группа: Администраторы
Сообщений: 1361
Репутация: 49
Статус: Offline
Вышла новая версия компилятора FreeBasic (1.03.0)


Очередной выход новой версии. Разработчики держат свое слово, выпуская версии приблизительно каждый квартал. Данная версия в основном направлена на исправление ошибок, в том числе в заголовках (что немаловажно). Из нового я сумел заметить:

1) Теперь разрешено дублирование объявления констант. Например такой пример, теперь не вызовет ошибку:
Код
Const i = 6
Const i = 6

2) Теперь компилятор будет выдавать предупреждение (не ошибку!), когда будет неопределенность в параметре оператора SizeOf. Например такой код выдаст предупреждение, но компиляция пройдет успешно:

Код
Type Q
  i As Integer
End Type
Dim Q As Q
? SizeOf(Q)
sleep


Но стоит изменить название переменной Q на любое другое имя и предупреждение исчезнет:

Код
Type Q
  i As Integer
End Type
Dim T As Q
? SizeOf(Q)
sleep


Радует, что заголовки из мною опробованных прописаны хорошо, даже заметил некоторые добавления(определения функций), которых не было в прошлых версиях.

Весь список изменений:
Цитата
Version 1.03.0

[changed]

- -print now only prints the information, and then stops the compiler

- non-standalone builds: -target no longer searches libs in lib/freebasic/, but rather in the normal lib/freebasic/ directory. I.e. the directory layout for native or cross compiling is the same, making packaging and distribution easier.

[added]

- IUP binding updated to 3.13

- #742: fbc can now use lib64/freebasic/... instead of lib/freebasic/ if built with ENABLE_LIB64=1

- -print fblibdir option

- All the recently updated bindings now have copyright/license information

- New libbzip2 binding (64bit-capable)

- New libcaca binding (64bit-capable), libcaca-0.99.beta19

- New BASS 2.4 & BASSMOD 2.0 bindings (64bit-capable)

- New OpenAL (openal-soft-1.16.0) and freealut (1.1.0) bindings (64bit-capable)

- New ASpell 0.60.6.1 binding (64bit-capable)

- New libbfd binding (64bit-capable), supporting all binutils versions from 2.16 to 2.25

- New CanvasDraw 5.8.1 binding (64bit-capable)

- Updated CGUI binding to 2.0.4 (from CGUI project's CVS)

- Redundant constant declarations (CONST A = 1 : CONST A = 1) are now allowed, just like redundant #defines

- logic operation optimization: x <> 0 => x if x is a comparison operation already, and = 0 => , and NOT =>

- ASM backend: slightly better code generation: Integer operand register will be re-used as Long result registers now (and vice-versa), which is ok since this is 32bit-only

- len/sizeof/typeof will now warn if the given identifier is ambigious (i.e. if it could refer to both a type or a procedure/variable symbol), because currently the type will be preferred, which is typically unexpected, at least for len() on strings.

- crt/longdouble.bi: ARM support

- LLVM backend: global variable initializers

- LLVM backend: fixed-size array variables/fields

[fixed]

- Windows API binding: win/ntddndis.bi and win/olectlid.bi headers were missing their content (and thus, the dependencies of ntddndis were missing too)

- LLVM backend: local vars were emitted twice

- LLVM backend: the signature emitted for calls will now use the same param dtypes as in the declaration, as required by LLVM

- LLVM backend: self-BOPs, and the self negation UOP, weren't working

- LLVM backend: field accesses, pointer derefs, global var accesses, with or without offsets, were mostly broken

- LLVM backend: procedure pointers weren't implemented properly

- 1.00.0 regression: compiler crash on assignments with a dereferenced constant on the left side

- 1.00.0 regression: C backend: bad code for pointer array parameter accesses (resulting in gcc error reports)

- Better error recovery after byref function result assignment type mismatch errors

- 1.01.0/1.02.0 regression: Various bindings: some macros using sizeof() were badly translated (doing sizeof((T)), which doesn't compile, instead of sizeof(T))

- Various bindings: macros whose body is a scope block with just one statement are now translated as single-line statements, so that they can be used with single-line IF blocks

- 1.01.0 regression: CGUI binding: InitCgui() macro was broken

- 1.01.0 regression: GLib binding: G_N_ELEMENTS() macro was broken

- Windows API binding: added #inclib "msimg32" to wingdi.bi, for using functions like GradientFill()

- C backend: Bitfields in nested anonymous Types/Unions should no longer cause __fb_struct_size errors - fbc now uses the same work-around for them as for Types with bitfields at the toplevel, i.e. such Types are emitted as byte arrays, because fbc's/gcc's bitfield layout rules differ.

- 1.02.0 regression: Windows API binding: The select() function from winsock headers is now renamed to select_() again, as before

- 1.02.0 regression: Windows API binding: opensocket/selectsocket aliases for the socket_/select_ functions were missing

- 1.02.0 regression: Windows API binding: can be used with MinGW.org again, for the most part, although some individual functions still won't work as they use MinGW-w64-specific helper functions

- Various bindings: Some trivial "inline" functions are now turned into macros; fixed some cases of missing information about renamed symbols (e.g. in SDL2 binding)

- Some built-in functions with wstring parameters (e.g. Val(), Left(), Right()) accepted integers and pointers in place of the wstring (e.g. Val(0)). This triggers an error now.

- #772: Types with the same name but in different namespaces compared as equal in #if typeof(...) = typeof(...) checks and #print typeof(...) output, because the namespace prefix was not included in textual typeof()'s result string.

- For dynamic array parameters with specified number of dimensions (e.g. <(any) as integer> instead of <() as integer>), the number of dimensions in accesses and REDIMs is now checked at compile-time, like dynamic array variables

- 1.00.0 regression: Arrays declared with unknown dimensions ("()") could no longer be accessed with inconsistent dimension counts. This is now allowed again. If precise dimension count checking is wanted, the array should be declared using the "myArray(any, any, ...)" syntax.

- 1.02.0 regression: GL/glext.bi on Windows no longer automatically #included GL/gl.bi



Скачать новую версию можно ОТСЮДА или с оф. сайта


Вы сохраняете власть над людьми покуда оставляете им что-то…Отберите у человека все, и этот человек уже будет неподвластен вам…
 
WQДата: Воскресенье, 05.07.2015, 13:16 | Сообщение # 2
Полковник
Группа: Проверенные
Сообщений: 215
Репутация: 7
Статус: Offline
Код
- IUP binding updated to 3.13

Что-то не работает, если просто пример запустить, или я делаю что-то не так

Я методом тыка собрал себе сборку IUP 3.14, вроде все работает в Windows и Linux, кроме IM-функций работы с изображениями, но и это можно обойти


Сообщение отредактировал WQ - Воскресенье, 05.07.2015, 13:16
 
haavДата: Воскресенье, 05.07.2015, 14:05 | Сообщение # 3
Генералиссимус
Группа: Администраторы
Сообщений: 1361
Репутация: 49
Статус: Offline
Я не стал в папку Lib запихивать статические библиотеки , а потестировал просто в отдельной папке те примеры, которые идут с компилятором. В общем взял в начале каждого примера добавил такую запись:

Код
#if defined(__FB_WIN32__)
# inclib "gdi32"
# inclib "user32"
# inclib "comdlg32"
# inclib "comctl32"
# inclib "shell32"
# inclib "advapi32"
# inclib "ole32"
# inclib "libuuid"
# ifndef IUP_DLL
#  libpath "lib/win32/"
# else
#  libpath "lib/win32dll/"
# endif
#else
# inclib "gtk-x11-2.0"
# inclib "gdk-x11-2.0"
# inclib "pangox-1.0"
# inclib "gdk_pixbuf-2.0"
# inclib "pango-1.0"
# inclib "gobject-2.0"
# inclib "gmodule-2.0"
# inclib "glib-2.0"
# ifndef linx24
#  libpath "lib/linux/"    ' 2.6 kernals
# else
#  libpath "lib/linux24/"  ' 2.4 kernals
# endif
#EndIf


Все примеры нормально запустились на системе windows. Конечно же проще данную запись вставить в файл iup.bi.


Вы сохраняете власть над людьми покуда оставляете им что-то…Отберите у человека все, и этот человек уже будет неподвластен вам…
 
Форум » Freebasic » Вопросы по языку FreeBasic » Вышла новая версия компилятора FreeBasic (1.03.0)
  • Страница 1 из 1
  • 1
Поиск: