The MASM Forum Archive 2004 to 2012

Project Support Forums => The GeneSys Development System => Topic started by: Vortex on July 20, 2006, 10:13:42 AM

Title: GeneSys master run-time library
Post by: Vortex on July 20, 2006, 10:13:42 AM
Here is my first attempt to create a master run-time library for GeneSys, it's one big library covering all these ones below :

comctl32.lib
comdlg32.lib
gdi32.lib
kernel32.lib
shell32.lib
user32.lib
advapi32.lib
GeneSys.lib


http://vortex.masmcode.com/files/GSmrt11.zip
Title: Re: GeneSys master run-time library
Post by: japheth on July 20, 2006, 10:29:53 AM

Hi,

You've forgotten advapi32.def
Title: Re: GeneSys master run-time library
Post by: Vortex on July 20, 2006, 10:42:26 AM
Thanks Japheth. New upload at the top.
Title: Re: GeneSys master run-time library
Post by: Vortex on July 20, 2006, 11:35:45 AM
It looks like that creating this master library is not a good idea. In a trial, Polink emitted this message :

POLINK: warning: Section '.data' is missing access flag; assuming READ/WRITE.
POLINK: error: Symbol 'GSmrt:.idata$2' is multiply defined ('GSmrt.lib(kernel32.dll)' and 'GSmrt.lib(user32.dll)').
POLINK: error: Symbol 'GSmrt:.idata$2' is multiply defined ('GSmrt.lib(kernel32.dll)' and 'GSmrt.lib(gdi32.dll)').


...and no executable.
Title: Re: GeneSys master run-time library
Post by: hutch-- on July 20, 2006, 12:14:43 PM
I think the trick is to ensure you have no duplicate entries with API names before you construct the library. You should be able to do this with the DEF file(s) but its a bit of messing around to  get it right.
Title: Re: GeneSys master run-time library
Post by: japheth on July 20, 2006, 01:31:46 PM

the error may disappear with option /force:multiple, but it possibly still isn't a good idea if the issue cannot be solved otherwise.
Title: Re: GeneSys master run-time library
Post by: Mark Jones on July 20, 2006, 04:05:48 PM
Hutch, can we see one of your sort routines implemented to locate the duplicates in the libraries? :wink
Title: Re: GeneSys master run-time library
Post by: Vortex on July 20, 2006, 05:11:06 PM
Hi Hutch,

I dumped all the exported fuctions to a text file and sorted all the names with the help of Excel. I had a quick look and I could not find duplicate function names but I will check it once more.

Hi Japheth,

Thanks for the tip. I tried /FORCE:MULTIPLE but I got the error message below after running the test executable :

The procedure entry point 1450760 could not be located in the dynamic link library kernel32.dll
Title: Re: GeneSys master run-time library
Post by: PBrennick on July 20, 2006, 05:53:37 PM
Vortex,
I used link.exe instead of polink.exe and the problem disappeared.  I had the same thing happen to me when I tried to build the DLL version of the static library.  When I switched to link.exe, it worked.

From what I saw with my DLL problem, it was NOT complaining about function duplication, exactly.  It was complaining about function duplication caused by multiple inclusions of the same external library in GSmrt.lib, this is caused when kernel32.lib is included in multiple functions in that library, for example.

Shouldn't that be GSrtm.lib?

Paul