News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

timeSetEvent

Started by jimg, March 01, 2019, 06:27:50 AM

Previous topic - Next topic

jimg

I've been reading the topic Visual Studio C++: inline assembly to C++ http://masm32.com/board/index.php?topic=6078.0 and thought I'd try on a program I've been studying.  The code compiles and runs fine with Pelles C, but I wanted to see an assembly language listing for some confusing parts.  I downloaded and installed community 2017, created a new project, and added the files.   I get the following errors:

1>------ Build started: Project: mt1, Configuration: Release Win32 ------
1>mt1.c
1>LINK : warning LNK4075: ignoring '/INCREMENTAL' due to '/OPT:ICF' specification
1>mt1.obj : error LNK2019: unresolved external symbol __imp__timeSetEvent@20 referenced in function _CmdDispatch
1>mt1.obj : error LNK2019: unresolved external symbol __imp__timeKillEvent@4 referenced in function _TransferRepeatDestroy
1>mt1.obj : error LNK2019: unresolved external symbol __imp__InitCommonControls@0 referenced in function _GlobalInitialize
1>F:\VCprogs\mt1\Release\mt1.exe : fatal error LNK1120: 3 unresolved externals
1>Done building project "mt1.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Here are my includes:
#include <windows.h>
#include <stdio.h>
#include <string.h>
#include <commctrl.h>
#include <timeapi.h>
#include <mmsystem.h>

The last two I added when I got the error, even though Pelles C didn't need them.

As a total noob at Visual C++, what am I missing here.   Is there someplace to specify the libraries to load (i.e. winmm.lib)?

TimoVJL

in source code, add#pragma comment(lib, "winmm.lib")or in VS project options.
Properties -> Linker -> Additional Dependencies
May the source be with you

jimg