Missing winmm.lib, cant compile

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

Post Reply
doghousedean
Traffic Manager
Traffic Manager
Posts: 141
Joined: 30 Apr 2007 10:26

Missing winmm.lib, cant compile

Post by doghousedean »

Hello,

Im a bit of a programmer and would like to contribute to this project, but i've not done any C++ before, Im a fluent Blitz3D user and have been programming for years so i can do it just never in C++.

Anyway, i cant get the code to compile, after a couple of other 'missing file' errors i just cant get this one to go away

Code: Select all

2>Linking...
2>LINK : fatal error LNK1104: cannot open file 'winmm.lib'
Anyone got any ideas, ive gone through the wiki and it still dont work.


Thank peeps, and what a good project original TT was the first real PC game i played donkeys years ago...

Dean
doghousedean
Traffic Manager
Traffic Manager
Posts: 141
Joined: 30 Apr 2007 10:26

Post by doghousedean »

just a quick addition, im on Vista Ultimate. i have installed the SP1 for Vista for C++ Express edition
User avatar
CMircea
Chairman
Chairman
Posts: 887
Joined: 29 Dec 2006 14:05

Post by CMircea »

Did you follow the guide on the wiki?
doghousedean
Traffic Manager
Traffic Manager
Posts: 141
Joined: 30 Apr 2007 10:26

Re: Missing winmm.lib, cant compile

Post by doghousedean »

doghousedean wrote:Hello,

Anyone got any ideas, ive gone through the wiki and it still dont work.
yep!

Driving me mad as i want to get stuck in, even tho i have only done a bit of C++ with halflife modding years ago :)
Rubidium
OpenTTD Developer
OpenTTD Developer
Posts: 3815
Joined: 09 Feb 2006 19:15

Post by Rubidium »

It looks like the Platform SDK properly isn't installed properly.

Have you seen http://wiki.openttd.org/index.php/Micro ... 2B_Express ?
doghousedean
Traffic Manager
Traffic Manager
Posts: 141
Joined: 30 Apr 2007 10:26

Post by doghousedean »

see above post,

I will go through it again tho to make sure
doghousedean
Traffic Manager
Traffic Manager
Posts: 141
Joined: 30 Apr 2007 10:26

Post by doghousedean »

I was missing a line in the libraries section,

no i get lots (57) of unresolved external function errors

Code: Select all

win32.obj : error LNK2019: unresolved external symbol __imp__ShowCursor@4 referenced in function "bool __fastcall MyShowCursor(bool)" (?MyShowCursor@@YI_N_N@Z)
Arrggh!
Rubidium
OpenTTD Developer
OpenTTD Developer
Posts: 3815
Joined: 09 Feb 2006 19:15

Post by Rubidium »

doghousedean wrote:see above post,

I will go through it again tho to make sure
Well, the page I linked you was hardly findable on the wiki; you had to go via the MSVC6 page, now it's a little better.

And for your other problem (you could've searched first): http://www.tt-forums.net/viewtopic.php?t=31131
doghousedean
Traffic Manager
Traffic Manager
Posts: 141
Joined: 30 Apr 2007 10:26

Post by doghousedean »

Woohoo Fixed it.

Now for the hard part.
erdnis
Engineer
Engineer
Posts: 12
Joined: 12 Jan 2007 18:09
Location: Norway
Contact:

Post by erdnis »

Heh. That other topic was mine, but I didn't get a solution to my problem. I just gave up, assuming that nobody knew what the problem was and how to fix it.
So, doghousedean, how did you fix it? :P
doghousedean
Traffic Manager
Traffic Manager
Posts: 141
Joined: 30 Apr 2007 10:26

Post by doghousedean »

Basically i check the paths were ok, not copying the ones from the wiki but browsing to find the right paths for the libs and includes etc.

The last problem i had witht he unresolved external symbol was because i changed the wrong file with instead of editing corewin_express.vsprops i was editing corewin.vsprops hence i was missing all the winmm.lib etc entries.

fixed as soon as i edited it.
User avatar
CMircea
Chairman
Chairman
Posts: 887
Joined: 29 Dec 2006 14:05

Post by CMircea »

doghousedean wrote:Basically i check the paths were ok, not copying the ones from the wiki but browsing to find the right paths for the libs and includes etc.
If you install in default location then they'll be the same. I'll change the wiki article to say that.
erdnis
Engineer
Engineer
Posts: 12
Joined: 12 Jan 2007 18:09
Location: Norway
Contact:

Post by erdnis »

doghousedean wrote:Basically i check the paths were ok, not copying the ones from the wiki but browsing to find the right paths for the libs and includes etc.

The last problem i had witht he unresolved external symbol was because i changed the wrong file with instead of editing corewin_express.vsprops i was editing corewin.vsprops hence i was missing all the winmm.lib etc entries.
I still can't get it to work. I know I must have done something wrong, but I have no idea what I've done. From what doghousedean said (and by searching a bit around on the internet), it seems that these kind of errors come when one haven't edited the corewin_express.vsprops file. The problem is, I have edited that file. This is how it looks like:

Code: Select all

<?xml version="1.0"?>
<VisualStudioPropertySheet 
	ProjectType="Visual C++" 
	Version="8.00" 
	Name="Core Windows Libraries">
	<Tool 
		Name="VCLinkerTool" 
		AdditionalDependencies="kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib" />
</VisualStudioPropertySheet>
But I get the exact same error messages if I remove all those AdditionalDependencies and that line just says:

Code: Select all

AdditionalDependencies="kernel32.lib"
I don't think the error is with the VC++ Directories. If that was the problem, I would have gotten some kind of "Cannot open file" error, right?
If you install in default location then they'll be the same. I'll change the wiki article to say that.
Not for me. The default locations for me was:
C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2
and
C:\Program Files\Microsoft DirectX SDK (December 2006)
User avatar
CMircea
Chairman
Chairman
Posts: 887
Joined: 29 Dec 2006 14:05

Post by CMircea »

Thanks, I updated the DirectX SDK link to the April 2007 SDK.
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 19 guests