M2R Posted March 17, 2010 Posted March 17, 2010 C:\Masm32\Bin\RC.EXE /v "aPlib.rc"Microsoft ® Windows ® Resource Compiler, Version 5.00.1823.1 - Build 1823Copyright © Microsoft Corp. 1985-1998. All rights reserved.Using codepage 1252 as defaultCreating aPlib.RESRC: RCPP -CP 1252 -f C:\masm32\Belajar.Assembly\_plugin_masm\aPlib\RCa01884 -g C:\masm32\Belajar.Assembly\_plugin_masm\aPlib\RDa01884 -DRC_INVOKED -D_WIN32 -pc\:/ -E -I. -I .aPlib.rc.Writing ICON:1, lang:0x409, size 4264Writing GROUP_ICON:1, lang:0x409, size 20.Writing BITMAP:1, lang:0x409, size 42040C:\Masm32\Bin\ML.EXE /c /coff /Cp /nologo /I"C:\Masm32\Include" "aPlib.asm" Assembling: aPlib.asmC:\Masm32\Bin\LINK.EXE /SUBSYSTEM:WINDOWS /RELEASE /DLL /DEF:aPlib.def /LIBPATH:"C:\Masm32\Lib" /OUT:"aPlib.dll" "aPlib.obj"Microsoft ® Incremental Linker Version 5.12.8078Copyright © Microsoft Corp 1992-1998. All rights reserved. Creating library aPlib.lib and object aPlib.expLINK : fatal error LNK1104: cannot open file "aPlib.lib"LINK : fatal error LNK1141: failure during build of exports fileMake error(s) occured.Total compile time 235 msaPlib.rar=========================================================Why I can't link this program?Sorry for my english
kao Posted March 18, 2010 Posted March 18, 2010 You need to remove lines "includelib aPlib.lib" from aPlib.Asm and appack.inc
ghandi Posted March 18, 2010 Posted March 18, 2010 (edited) I think that the output file name needs to be different so that ML doesnt output a lib file of the same name. WinASM it is as simple as renaming the project or setting a different output file in the project properties. I dont know about RadASM as i've not used it much myself.Removing the included lib will result in the following messages:aPLib dll.exp : warning LNK4070: /OUT:aPlib.dll directive in .EXP differs from output filename 'C:\Documents and Settings\Ghandi\Desktop\aPLib\aPlib\aPLib.dll'; ignoring directiveaPlib.obj : error LNK2019: unresolved external symbol _aP_workmem_size referenced in function _PackFile@4aPlib.obj : error LNK2019: unresolved external symbol _aP_max_packed_size referenced in function _PackFile@4aPlib.obj : error LNK2019: unresolved external symbol _aPsafe_pack referenced in function _PackFile@4aPlib.obj : error LNK2019: unresolved external symbol _aPsafe_get_orig_size referenced in function _UnpackFile@0aPlib.obj : error LNK2019: unresolved external symbol _aPsafe_depack referenced in function _UnpackFile@0C:\Documents and Settings\Ghandi\Desktop\aPLib\aPlib\aPLib dll.dll : fatal error LNK1120: 5 unresolved externalsWhen the dll is made, it will try to make a lib file for that dll, named the same as the dll. In this particular case, the lib file will be named "aPLib.lib" which conflicts with the static library name. If the project is renamed to something else though, leaving in those includelib lines will allow you to assemble and link the plugin.I've renamed the project to "aPLib Dll" and assembled a dll, its attached to the post. Honestly though, instead of editing the example program that comes with aPLib, you would do better to start a new project with the name you will give it, such as "aPLib_Plugin" or some such name. Then there is no problems with naming convention and if you name your routines in a similar fashion, reusing code is simpler because you can copy whole routines out from one module and use them in another (if you dont want to compile a static lib with your functions).HR,GhandiaPLib dll.rar Edited March 18, 2010 by ghandi
M2R Posted March 19, 2010 Author Posted March 19, 2010 Ghandi, Yes, I agree with your solution and Thanks for all of you who reply my question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now