Page 1 of 2

Library creation error

Posted: Wed Dec 21, 2005 9:40 am
by discip1e
http://www.macroquest2.com/wiki/index.p ... leshooting

I get this for MQ2Main:

Creating library ..\Release/MQ2Main.lib and object ..\Release/MQ2Main.exp
MQ2Auth.obj : error LNK2019: unresolved external symbol __imp__CallNextHookEx@16 referenced in function "long __stdcall proc(int,unsigned int,long)" (?proc@@YGJHIJ@Z)
MQ2Main.obj : error LNK2001: unresolved external symbol __imp__CallNextHookEx@16
MQ2Commands.obj : error LNK2019: unresolved external symbol __imp__ShellExecuteA@24 referenced in function _Exec
MQ2DetourAPI.obj : error LNK2019: unresolved external symbol __imp__MessageBoxA@16 referenced in function "void __cdecl CrashDetected_Detour(unsigned long,unsigned long,unsigned long,unsigned long,unsigned long)" (?CrashDetected_Detour@@YAXKKKKK@Z)
MQ2Main.obj : error LNK2001: unresolved external symbol __imp__MessageBoxA@16
MQ2Utilities.obj : error LNK2001: unresolved external symbol __imp__MessageBoxA@16
MQ2Main.obj : error LNK2019: unresolved external symbol __imp__SetWindowsHookExA@16 referenced in function "void __cdecl InjectEnable(void)" (?InjectEnable@@YAXXZ)
MQ2Main.obj : error LNK2019: unresolved external symbol __imp__UnhookWindowsHookEx@4 referenced in function "void __cdecl InjectDisable(void)" (?InjectDisable@@YAXXZ)
..\Release/MQ2Main.dll : fatal error LNK1120: 5 unresolved externals

and this for MQ2HUD:

Creating library ..\Release/MQ2HUD.lib and object ..\Release/MQ2HUD.exp
MQ2HUD.obj : error LNK2019: unresolved external symbol __imp__GetForegroundWindow@0 referenced in function _OnDrawHUD
..\Release/MQ2HUD.dll : fatal error LNK1120: 1 unresolved externals

using visual c++ 2005 express on xp/pro box

recieved this warning for all files during conversion:

Visual C++ now supports a secure version of the C Runtime Library. Use of this library is turned on by default. You may see some warnings about deprecated functions when you build your project. It is advised that you correct these warnings, in order to make your code more secure.
The C/C++ compiler default settings have been modified to be more compliant with ISO Standard C++. Included in those changes are enforcing Standard C++ for loop scoping and supporting wchar_t as a native type. These changes may cause existing code to no longer compile without changes to the code or the compiler options with which it is built.
Due to a change in the exception handling switches for the C/C++ Compiler, /EHsc has been automatically converted to /EHa in this project.
Project upgraded successfully.
Due to the requirement that Visual C++ projects produce an embedded (by default) Windows SxS manifest, manifest files in the project are automatically excluded from building with the Manifest Tool. It is recommended that the dependency information contained in any manifest files be converted to "#pragma comment(linker,"<insert dependency here>")" in a header file that is included from your source code. If your project already embeds a manifest in the RT_MANIFEST resource section through a resource (.rc) file, the line will need to be commented out before the project will build correctly.
Due to a conformance change in the C++ compiler, code change may be required before your project will build without errors. Previous versions of the C++ compiler allowed specification of member function pointers by member function name (e.g. MemberFunctionName). The C++ standard requires a fully qualified name with the use of the address-of operator (e.g. &ClassName::MemberFunctionName). If your project contains forms or controls used in the Windows Forms Designer, you may have to change code in InitializeComponent because the designer generated code used the non-conformant syntax in delegate construction (used in event handlers).

any help would be appreciated

well. . .

Posted: Wed Dec 21, 2005 10:41 am
by discip1e
P.S. I searched the forums and out of the 102 posts, I found exactly 0 solutions. . .unless there is a problem loosely related to this one that i am unable to draw as a connection.

Posted: Wed Dec 21, 2005 10:50 am
by pasini
http://www.macroquest2.com/phpBB2/viewt ... sual++2005
I think you'll find something usefull in there.

doesn't exist

Posted: Wed Dec 21, 2005 10:55 am
by discip1e
that post no longer exists

Posted: Wed Dec 21, 2005 10:58 am
by pasini
Oh woops that's a post from the VIP section. It does exist though.

hrmmm

Posted: Wed Dec 21, 2005 11:02 am
by discip1e
si i guess us "non-vipz" are just to remain lost. . .

Posted: Wed Dec 21, 2005 11:50 am
by fearless
If you would compile with vs 2003 it would work.

If you would follow the instructions in the wiki it will probably work (cause it has worked for others).

Re: Library creation error

Posted: Wed Dec 21, 2005 5:30 pm
by dont_know_at_all
discip1e wrote:recieved this warning for all files during conversion:
What conversion?
discip1e wrote:any help would be appreciated
Follow the directions.

Posted: Thu Dec 22, 2005 9:26 am
by bardomatic
Go back to microsoft.com where you got VS Express. Click on the link that takes you to the SDK's. You will need to download and install the windows SDK. Then search microsoft for the instructions on how to configure express to use the SDK. Then search microsoft for the instructions on how to make the project recognize the SDK.
Basically you need to be asking this question in the microsoft forums. It took me only 15-20 minutes to get all the info needed from microsoft.com.

Posted: Sun Oct 29, 2006 9:35 am
by jrtrg
I had the same problem when compiling. Here was my mistake

"If you installed using default directories, navigate to C:\Program Files\Microsoft Visual Studio 8\VC\VCProjectDefaults and edit corewin_express.vsprops, changing the following:
Change AdditionalDependencies="kernel32.lib" to
AdditionalDependencies="kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib"

I changed these settings on the wrong file. I changed "CoreWin.vsprops"

well that fixed it for me hope that helps!!!

Posted: Sat Jun 07, 2008 3:39 am
by CarlosT
after searching for info with the same issue (and making same mistake of changing "CoreWin.vsprops" - then fixed that) was still having problems after double redoing everything until i closed VS express and restarted it...and now it works. just added info

Posted: Sun Jun 08, 2008 2:39 am
by exswitch
arent you suppost to edit "CoreWin.vsprops" ??

Re: Library creation error

Posted: Thu Jan 08, 2026 5:11 pm
by xyilla

Re: Library creation error

Posted: Thu Jan 08, 2026 5:12 pm
by xyilla

Re: Library creation error

Posted: Thu Jan 08, 2026 5:13 pm
by xyilla