| [ Return to Bugs & Features | Roadmap 1.1 | SVN ⇄ GIT ]
STR #1776
Application: | FLTK Library |
Status: | 1 - Closed w/Resolution |
Priority: | 2 - Low, e.g. a documentation error or undocumented side-effect |
Scope: | 3 - Applies to all machines and operating systems |
Subsystem: | FLUID |
Summary: | FLUID creates extern function in .h when function is marked private |
Version: | 1.1-current |
Created By: | CyberBotX |
Assigned To: | matt |
Fix Version: | 1.1-current (SVN: v6012) |
Update Notification: | |
Trouble Report Files:
|
#1 | CyberBotX 18:37 Dec 15, 2007 |
| test.fl 0k | |
|
#2 | CyberBotX 18:37 Dec 15, 2007 |
| test.cxx 0k | |
|
#3 | CyberBotX 18:38 Dec 15, 2007 |
| test.h 0k | |
Trouble Report Comments:
|
#1 | CyberBotX 07:51 Aug 29, 2007 |
| If you set a function to be private, the generated code is properly marked as static in the .cxx file. But the .h file still creates an entry for extern for the same function, causing the compiler to reject the function because it was marked extern when it was already made static. I have not looked through FLUID's code to see how this could be fixed. I have only been manually editing the generated code to not have the extern in the .h file. | |
|
#2 | CyberBotX 07:58 Aug 29, 2007 |
| I should also mention that the same thing happens with FLUID2 as well. If you mark the function was private and set it to static, it still makes an extern entry in the .h file. | |
|
#3 | mike 09:17 Dec 15, 2007 |
| Please attach an example .fl file that exhibits this problem. I just tried the current 1.1.x code and was not able to duplicate it. | |
|
#4 | CyberBotX 18:39 Dec 15, 2007 |
| I've attached the .fl I used, with the function marked as private. The attached .cxx and .h files show that the file is marked static in the .cxx yet is put into the .h as an extern. | |
|
#5 | matt 11:38 Dec 29, 2007 |
| A, ok. The "extern" declaration is generated by the callback and has nothing to do with the actual function which you defined. FLUID does not recognize them as equal. I will see if I can change something here. | |
|
#6 | matt 13:46 Jan 04, 2008 |
| Fixed in Subversion repository.
Make sure to set the return type of your callback to "void" though. | |
[ Return to Bugs & Features ]
|
| |