Library creation error

Need help running MacroQuest2? Ask your questions about how to get things to work on your computer.

Moderator: MacroQuest Developers

discip1e
a ghoul
a ghoul
Posts: 133
Joined: Wed Dec 21, 2005 6:32 am

Library creation error

Post by discip1e » Wed Dec 21, 2005 9:40 am

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

discip1e
a ghoul
a ghoul
Posts: 133
Joined: Wed Dec 21, 2005 6:32 am

well. . .

Post by discip1e » Wed Dec 21, 2005 10:41 am

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.

pasini
a ghoul
a ghoul
Posts: 97
Joined: Thu Jun 09, 2005 3:19 pm

Post by pasini » Wed Dec 21, 2005 10:50 am

http://www.macroquest2.com/phpBB2/viewt ... sual++2005
I think you'll find something usefull in there.

discip1e
a ghoul
a ghoul
Posts: 133
Joined: Wed Dec 21, 2005 6:32 am

doesn't exist

Post by discip1e » Wed Dec 21, 2005 10:55 am

that post no longer exists

pasini
a ghoul
a ghoul
Posts: 97
Joined: Thu Jun 09, 2005 3:19 pm

Post by pasini » Wed Dec 21, 2005 10:58 am

Oh woops that's a post from the VIP section. It does exist though.

discip1e
a ghoul
a ghoul
Posts: 133
Joined: Wed Dec 21, 2005 6:32 am

hrmmm

Post by discip1e » Wed Dec 21, 2005 11:02 am

si i guess us "non-vipz" are just to remain lost. . .

User avatar
fearless
Not a Psychic
Posts: 2684
Joined: Wed Mar 10, 2004 3:52 pm

Post by fearless » Wed Dec 21, 2005 11:50 am

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).
Reading . . . it's not just for me.

[url=http://www.catb.org/~esr/faqs/smart-questions.html]How To Ask Questions The Smart Way[/url]
[quote="Ccomp5950"]Fearless showed me the light, you too shall learn.[/quote]

User avatar
dont_know_at_all
Developer
Developer
Posts: 5450
Joined: Sun Dec 01, 2002 4:15 am
Location: Florida, USA
Contact:

Re: Library creation error

Post by dont_know_at_all » Wed Dec 21, 2005 5:30 pm

discip1e wrote:recieved this warning for all files during conversion:
What conversion?
discip1e wrote:any help would be appreciated
Follow the directions.

bardomatic
a ghoul
a ghoul
Posts: 131
Joined: Thu Apr 29, 2004 12:09 am

Post by bardomatic » Thu Dec 22, 2005 9:26 am

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.

jrtrg
decaying skeleton
decaying skeleton
Posts: 1
Joined: Sun Oct 29, 2006 8:49 am

Post by jrtrg » Sun Oct 29, 2006 9:35 am

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!!!

CarlosT
decaying skeleton
decaying skeleton
Posts: 1
Joined: Fri Jun 06, 2008 6:16 am

Post by CarlosT » Sat Jun 07, 2008 3:39 am

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

exswitch
decaying skeleton
decaying skeleton
Posts: 7
Joined: Sun Feb 04, 2007 1:21 am

Post by exswitch » Sun Jun 08, 2008 2:39 am

arent you suppost to edit "CoreWin.vsprops" ??