Need some info about possible causes to linking problem...

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

Moderator: MacroQuest Developers

tristpost
orc pawn
orc pawn
Posts: 16
Joined: Fri Jul 13, 2007 1:15 pm

Need some info about possible causes to linking problem...

Post by tristpost » Fri Jul 13, 2007 1:51 pm

Ok I have tried three times to follow all the steps on the wiki to compile MQ2 with VS2005 but each time I get the same problem with 5 unresolved externals (one is error LNK2019: unresolved external symbol __imp__CallNextHookEx@16).

Sadly enough the troubleshooting section simply say that I have done some misstake (I could figure that one out myself - lol).

As a programmer since 20 years (not in Windows environment!) I would very much appreciate some technical info like what lib file theese missing externals belong to so I can check that I indeed have this file in the SDK directory I told the linker to use (as in the instructrions) etc...

Can somebody confirm 100% that this problem only can occur if the library search information is wrong or can some of the cryptic "commenting of disable lines" also have something to do with it?

Simple instructions that one is suposed to follow "litterarly" without thinking are probably good in many situations but I would have loved a bot more info about WHY one needs to do the different steps since this could help understanding problems and solving them...

I am also curious about the instructions that there should only be one set of SDK headers and libraries in the respective search paths and that other referenses (except the one I added) - what lines exactly are SDK related? Should for instance FrameworkSDK be removed or not?

Why do one have to both add extra lib-files in the project default file AND add SDK directories to the include & lib paths in the IDE?

I have done a serious attemt to follow the instructions so please DONT flame me and tell me to do it all over a fourth time - instead try to give me a clue WHAT I MAY BE DOING WRONG EACH TIME so I can get this nice software to link!

I am sorry but I did not have much to add to the wiki - I did however indicate were in the trouble shooting section I think there should be more information instead of just a sugestion to start from the beginnig - the page is http://www.macroquest2.com/wiki/index.p ... _Compiling

Best Regards
Trist

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

Post by dont_know_at_all » Fri Jul 13, 2007 2:16 pm

google(CallNextHookEx)
first link

... Import library User32.lib ...

You are missing User32.lib from the SDK.

tristpost
orc pawn
orc pawn
Posts: 16
Joined: Fri Jul 13, 2007 1:15 pm

Post by tristpost » Sat Jul 14, 2007 12:11 am

Thanks for quick reply!

In VS 2005 / Library Files I have:

C:\Program\SDK\Lib
$(VCInstallLib)lib
$(FrameworkSDKDir)lib
$(VSInstallDir)
$(VSInstallDir)lib

Have I removed to much or am I missing something? I checked that User32.lib was in C:\Program\SDK\Lib...


Note - I have "european" Windows so C:\Program is my install location for programs - not C:\Program Files and I installed the SDK simply as "C:\Program\SDK instead of the long default name...

tristpost
orc pawn
orc pawn
Posts: 16
Joined: Fri Jul 13, 2007 1:15 pm

Post by tristpost » Sat Jul 14, 2007 12:22 am

I copied User32.lib to the lib directory under VS and thewn everything linked fine so for some reason what I specified under options / directories etc did not take hold ....

Thanks again for the help!

I added a little info about how to trouble shoot this linking problem on the wiki.

Best Regards
Trist

xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Need some info about possible causes to linking problem...

Post by xyilla » Sat Aug 16, 2025 4:22 am


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Need some info about possible causes to linking problem...

Post by xyilla » Sat Aug 16, 2025 4:24 am


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Need some info about possible causes to linking problem...

Post by xyilla » Sat Aug 16, 2025 4:25 am


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Need some info about possible causes to linking problem...

Post by xyilla » Sat Aug 16, 2025 4:26 am


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Need some info about possible causes to linking problem...

Post by xyilla » Sat Aug 16, 2025 5:03 am


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Need some info about possible causes to linking problem...

Post by xyilla » Sat Aug 16, 2025 5:04 am


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Need some info about possible causes to linking problem...

Post by xyilla » Sat Aug 16, 2025 5:05 am


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Need some info about possible causes to linking problem...

Post by xyilla » Sat Aug 16, 2025 5:06 am


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Need some info about possible causes to linking problem...

Post by xyilla » Sat Aug 16, 2025 5:08 am


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Need some info about possible causes to linking problem...

Post by xyilla » Sat Aug 16, 2025 5:09 am


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Need some info about possible causes to linking problem...

Post by xyilla » Sat Aug 16, 2025 5:10 am