- Отметить как новое
- Закладка
- Подписаться
- Отключить
- Подписка на RSS-канал
- Выделить
- Печать
- Сообщить о недопустимом содержимом
Tried building the following snip:
INTEGER(4) FUNCTION UTL_TIME_ADD_SEC_F ( FIRST, SECOND, RESULT )
!DEC$ ATTRIBUTES DEFAULT, DLLEXPORT :: UTL_TIME_ADD_SEC_F
IMPLICIT NONE
INCLUDE 'utl_structs.inc'
INCLUDE 'utl_time.inc'
*
* Calling Arguments
*
RECORD /timeStamp/ FIRST
RECORD /timeStamp/ SECOND
RECORD /timeStamp/ RESULT
*
* Declare the interface to the 'C' routine
*
INTERFACE
INTEGER(4) FUNCTION utl_time_add_sec(
+ first,
+ second,
+ result)
!DEC$ ATTRIBUTES DEFAULT, DLLEXPORT :: UTL_TIME_ADD_SEC_F
IMPLICIT NONE
INCLUDE 'utl_structs.inc'
INCLUDE 'utl_time.inc'
*
* Calling Arguments
*
RECORD /timeStamp/ FIRST
RECORD /timeStamp/ SECOND
RECORD /timeStamp/ RESULT
*
* Declare the interface to the 'C' routine
*
INTERFACE
INTEGER(4) FUNCTION utl_time_add_sec(
+ first,
+ second,
+ result)
INCLUDE 'utl_structs.inc'
RECORD /timeStamp/ first
RECORD /timeStamp/ second
RECORD /timeStamp/ result
RECORD /timeStamp/ second
RECORD /timeStamp/ result
!DEC$ ATTRIBUTES STDCALL,DLLIMPORT :: utl_time_add_sec
!DEC$ ATTRIBUTES REFERENCE :: first
!DEC$ ATTRIBUTES REFERENCE :: second
!DEC$ ATTRIBUTES REFERENCE :: result
END FUNCTION
END INTERFACE
*
*********************************
* Start of executable code
*********************************
*
!DEC$ ATTRIBUTES REFERENCE :: first
!DEC$ ATTRIBUTES REFERENCE :: second
!DEC$ ATTRIBUTES REFERENCE :: result
END FUNCTION
END INTERFACE
*
*********************************
* Start of executable code
*********************************
*
*
* Call 'C' routine
*
UTL_TIME_ADD_SEC_F = utl_time_add_sec(FIRST, SECOND, RESULT)
* Call 'C' routine
*
UTL_TIME_ADD_SEC_F = utl_time_add_sec(FIRST, SECOND, RESULT)
RETURN
END
END
I get the following error:
Z:onlineutlutl_libsrcutl_time_f.for(64) : Error: This symbol has multiply declared DEC$ ATTRIBUTES DEFAULT attribute. [UTL_TIME_ADD_SEC_F]
!DEC$ ATTRIBUTES DEFAULT,DLLEXPORT::UTL_TIME_ADD_SEC_F
!DEC$ ATTRIBUTES DEFAULT,DLLEXPORT::UTL_TIME_ADD_SEC_F
I removed the DEFAULT attribute and it built fine.
I removed the DLLEXPORT attribute and got the same error.
Is DEC$ ATTRIBUTES DEFAULT not supported in CVF 6.6c?
This compiled fine in CVF 6.6b, although I got a link error. An earlier post indicated a workaround to the link error using a .DEF file, but I'm trying to avoid adding this to all of my projects. I was hoping the link error was fixed in 6.6c.
Is DEC$ ATTRIBUTES DEFAULT not supported in CVF 6.6c?
Ссылка скопирована
2 Ответы
- Отметить как новое
- Закладка
- Подписаться
- Отключить
- Подписка на RSS-канал
- Выделить
- Печать
- Сообщить о недопустимом содержимом
The DEFAULT attribute is supported. I can't compile your example as-is (don't have the include files), but if I reduce it some, it compiles ok for me.
- Отметить как новое
- Закладка
- Подписаться
- Отключить
- Подписка на RSS-канал
- Выделить
- Печать
- Сообщить о недопустимом содержимом
My problem was that I had the DEFAULT argument used for the same symbol in the .inc and the .for file. Previous versions of CVF did not flag this error.

Ответить
Параметры темы
- Подписка на RSS-канал
- Отметить тему как новую
- Отметить тему как прочитанную
- Выполнить отслеживание данной Тема для текущего пользователя
- Закладка
- Подписаться
- Страница в формате печати