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 8062441
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T10:40:12+00:00 2026-06-05T10:40:12+00:00

I have a VS2010 Win32 console application. Within this console application I try to

  • 0

I have a VS2010 Win32 console application. Within this console application I try to attach a window as child to another Win32 app. But I do not get the application linked (it compiles, just the linker issue AFAIK):

Error   1   error LNK2019: unresolved external symbol "long __stdcall viewproc(struct HWND__ *,unsigned int,unsigned int,long)" (?viewproc@@YGJPAUHWND__@@IIJ@Z) referenced in function "void __cdecl createFSXWindow(void)" (?createFSXWindow@@YAXXZ)  H:\Projects\VisualStudioNet2010\FSXTests\Menu Items\Menu Items\MenuItems.obj    Menu Items

I have added all libs from a Win32 Windows project under Linker/include:

kernel32.lib;user32.lib;gdi32.lib;winspool.lib; comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib; odbccp32.lib;%(AdditionalDependencies)

Remark: Just to clarify, I do NOT(!) try to attach the window to the console window, but another Win32 application, so it is not about “Make a win32 console app display a window”

The issue comes in once I add the window code such as:

#include <windows.h>
#include <tchar.h>
#include <stdio.h>
#include <strsafe.h>
....

// window
WNDCLASSEX wc;
wc.style = CS_HREDRAW | CS_VREDRAW ;
wc.lpfnWndProc = viewproc;

When I check the command line of the linker the only difference between my console app and an Win32 app is SUBSYSTEM:CONSOLE vs. SUBSYSTEM:WINDOWS

Any hints?

  • 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-06-05T10:40:14+00:00Added an answer on June 5, 2026 at 10:40 am

    The linker error just tells you that you forgot to write the viewproc() function.

    You declared it, the compiler is happy, but didn’t implement it, the linker is unhappy. Or you wrote it but mistyped the definition. It is not a function that’s implemented in one of the standard libraries, you have to provide it. The window procedure is what you use to give a window custom behavior.

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

Sidebar

Related Questions

I have created a dll project in VS2010 (Win32 console application>dll). I put some
I created a c++ Win32 console application in VS2010, and in a separated class
I have a simple Win32 console (no vcl) app written in Borland C++ 5,
I have created a DeclarativeServiceLibrary using VS2010 beta 2, Please check this image of
We have a not very complicated but big (i.e. lots of files) Visual Studio
I have a VS2010 project which is a windows application that acquires data from
Hi want to develop a windows phone application. I have vs2010 ultimate installed in
I have a web application in VS2010 which has a number of DLLs that
I have a VS2010 C++ application with dendencies/references to two DLLs. After building the
I have a VS2010 running on a WTS machine (Windows2008). I'm trying to attach

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.