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

  • SEARCH
  • Home
  • 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 167979
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T12:22:18+00:00 2026-05-11T12:22:18+00:00

I am new to Windows and Visual Studio. I have a strong background in

  • 0

I am new to Windows and Visual Studio. I have a strong background in programming in Linux though. I’m trying to build (is build just one word for compile and link) a this sample code from a textbook. I made an empty project added the source and header files to the project. The code compiles fine. However, I get all these errors at link time. What’s happening is that the code calls a bunch of functions that VS can’t find. Specifically all the errors are

ping.obj : error LNK2019 unresolved external symbol

The example code is from Ch11 or Network Programming for Windows. It’s about creating raw sockets to use to make a ping program. Also, the code came with a Makefile but I don’t know how to use it with VS…

So, basically I need to know how to just put some code into VS and have it build properly. If anyone could help me with that or point me to a decent resource I’d really appreciate it.

edit: I’m using VS 2008 and C++

edit2: I made a makefile project and filled in the build command with cl ping.cpp resolve.cpp -out:ping.exe Ws2_32.lib

now it’s telling me my build was successful, but there’s no .exe anywhere… arg!! Windows makes no sense to me.

Here is what it’s telling me:

1>------ Build started: Project: ping, Configuration: Debug Win32 ------ 1>Performing Makefile project actions 1>Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.21022.08 for 80x86 1>Copyright (C) Microsoft Corporation.  All rights reserved. 1>cl : Command line warning D9035 : option 'o' has been deprecated and will be removed           in a future release 1>ping.cpp 1>resolve.cpp 1>Generating Code... 1>Microsoft (R) Incremental Linker Version 9.00.21022.08 1>Copyright (C) Microsoft Corporation.  All rights reserved. 1>/out:ping.exe  1>/out:ut:ping.exe  1>ping.obj  1>resolve.obj  1>Ws2_32.lib  1>Build log was saved at 'file://c:\Documents and Settings\Devin.DEVIN-DESK\My      Documents\Visual Studio 2008\Projects\raw_socks\ping\Debug\BuildLog.htm' 1>ping - 0 error(s), 1 warning(s) ========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ========== 

edit3: this makes sense to me. I have two headers and two source files and I can’t seem to compile and link, no matter what I do. What’s a very straightforward and easy process in linux is convoluted in Windows.

  • 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. 2026-05-11T12:22:19+00:00Added an answer on May 11, 2026 at 12:22 pm

    My guess is that you are not linking to a required library, and since you’re writing a ping app, I’d guess its the Windows Sockets library. Chances are you need to add ws2_32.lib as a linked module.

    Try doing this: Go to Project Options->Linker->Input

    Add Ws2_32.lib

    If that doesn’t fix it, please post the entire link error. It should make it more clear what is missing.

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

Sidebar

Related Questions

Background In Visual Studio 2008 Create a new Windows Forms Application, this will create
In Visual Studio, two files are created when you create a new Windows Form
I have made a new windows service which works fine using barebone code (just
I'm new to windows programming and I'm trying to get notified of all changes
I've just created a new Windows XP VM on my Mac using VMware Fusion.
Wondering how to open many new windows with Javascript. I have found plenty of
I'm new to Windows programming and after reading the Petzold book I wonder: is
I'm new to Windows development and I have a question. I'm using a Mac
I have a Visual Studio 2010 extension, a .vsix file. I can obtain the
System: Windows7 Pro, Visual Studio 2010, C# I have a textbox: textBox1 I set

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.