Quite to my surprise I got a linker error with a module named "files":
/usr/lib/gcc-lib/i386-linux/2.95.4/libgpc.a(files.o): In function `init_Files': files.o(.text+0xb28): multiple definition of `init_Files' general/target/files.o(.text+0xea4): first defined here /usr/bin/ld: Warning: size of symbol `init_Files' changed from 99 to 67 in /usr/lib/gcc-lib/i386-linux/2.95.4/libgpc.a(files.o) collect2: ld returned 1 exit status
Changing the module name to e.g. "ffiles" get's me around this, bummers that I've to change the name in all imports.
What other (module) names are forbidden in my code?
And is there any change that a future release will do better then to polute my namespace with module names I didn't (explicitly) import?
Carel Fellinger wrote:
Quite to my surprise I got a linker error with a module named "files":
/usr/lib/gcc-lib/i386-linux/2.95.4/libgpc.a(files.o): In function `init_Files': files.o(.text+0xb28): multiple definition of `init_Files' general/target/files.o(.text+0xea4): first defined here /usr/bin/ld: Warning: size of symbol `init_Files' changed from 99 to 67 in /usr/lib/gcc-lib/i386-linux/2.95.4/libgpc.a(files.o) collect2: ld returned 1 exit status
Changing the module name to e.g. "ffiles" get's me around this, bummers that I've to change the name in all imports.
What other (module) names are forbidden in my code?
And is there any change that a future release will do better then to polute my namespace with module names I didn't (explicitly) import?
The names were not forbidden intentionally. I hadn't noticed this asmname conflict of the initializers. It will be fixed in the next release. Thanks for the report. (carel1.pas)
Frank
On Sun, Apr 07, 2002 at 09:11:15PM +0200, Frank Heckenbach wrote:
Carel Fellinger wrote:
...
And is there any change that a future release will do better then to polute my namespace with module names I didn't (explicitly) import?
The names were not forbidden intentionally. I hadn't noticed this
Great! The fun thing is that it didn't cross my mind that it could be a bug. Saw some C code the other day and that brought back painfull memeories of the days that C struct field names were simple offsets and foo named field names of *all* structs could end up having the same offset. Hence the bitter tone when I thought I hit a similar brick in gpc. I should have known better, Pascal is no C:).
asmname conflict of the initializers. It will be fixed in the next release. Thanks for the report. (carel1.pas)
Thanks for fixing it. As a simple work-around, I will temporarily alter the module name, but not the export or import's nor the file itself. Yep this simple edit solves the problem for the moment.