Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7412917
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T06:36:55+00:00 2026-05-29T06:36:55+00:00

I have two projects in my solution; one which builds a static lib, another

  • 0

I have two projects in my solution; one which builds a static lib, another which uses it and tests it.

I’ve got these linkers errors (2019) when using this function in my test app… yet I can link other declared stuff (soley classes) without problem.

The test-app is dependent on the static lib, and it has reference to it as well so it should link (I only get that linker error as well)

Why is this? Am I missing something? I can’t think of anything else that couldve gone wrong.

PortableTime.h

#ifndef _PORTABLE_TIME_H
#define _PORTABLE_TIME_H

#if defined _WIN32 || _WIN64
#include <WinSock2.h>
#else
#include <time.h>
#endif

#include <stdint.h>

uint64_t GetTimeSinceEpoch();

#endif

PortableTime.cpp

#include "PortableTime.h"

uint64_t GetTimeSinceEpoch()
{
    #if defined _WIN32 || _WIN64
        return (uint64_t)timeGetTime();
    #else
        struct timeval tv;
        gettimeofday(&tv, 0); 
        return (((uint64_t)tv.tv_sec)*(uint64_t)1000) + (((uint64_t)tv.tv_usec)/(uint64_t)1000);
    #endif
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T06:36:56+00:00Added an answer on May 29, 2026 at 6:36 am

    timeGetTime function requires Winmm.lib library, so you have to specify it among additional dependencies.

    Configuration Properties -> Linker -> Input -> Additional Dependencies.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a VS solution with two projects: one is the actual code (which
I have one solution in VS2010 containing two MVC 3 projects. These are two
I have two projects in my Solution. One implements my business logic and has
I have a solution with two projects. One for project for the production code
I have a solution that contains two projects. One project is an ASP.NET Web
I have an solution in VS 2008 which contains two class library projects and
I have an older asp.net mvc solution (s#arp framework) whith two projects one for
I have two Visual Studio 2005 solutions, one of which builds a binary and
I have two C++ projects in a solution both of which need to share
I have two projects in my Visual Studio solution: The one is a WcfService

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.