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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T19:28:41+00:00 2026-05-12T19:28:41+00:00

I have a a Win32 DLL project in VS2008, it is written in a

  • 0

I have a a Win32 DLL project in VS2008, it is written in a handful of C modules.
Because I also want to be able to build outside VS2008, with no dependency on VS2008, I have produced a custom makefile, that does all the build and link steps. All this is set up just fine.

Now I’d like to add a couple C++ modules to this DLL.
I have modified the custom makefile to compile the .cpp modules as C++, and the .c modules as regular C (/Tc) . This all works. It links everything together, no problem .

Can I configure the VS2008 project to do the same?

Can I mix C++ and C in the same VS2008 project?

Or do I need a custom build step for this?

Thanks.


ANSWER

I had the VS2008 project set to compile as C. I needed to change it to Compile As “Default”. Right click the project, select Properties, and then… :

alt text

Thanks, Pavel.

  • 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-12T19:28:41+00:00Added an answer on May 12, 2026 at 7:28 pm

    First of all, you shouldn’t even need /Tc if you’re building it yourself – cl.exe uses file extension to determine the type, so .c files will be compiled as C by default, and .cpp and .cxx files as C++.

    For VS projects, it works in exact same way, except that you can’t override this behavior (or at least I do not know how).

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

Sidebar

Related Questions

I have a win32 library (DLL) project that was originally written in Delphi. It
I have a win32 COM dll. I want to register this dll for different
I have a third-party (Win32) DLL, written in C, that exposes the following interface:
I have a VC++ Win32 DLL project. I wonder if anyone can help me
First_Layer I have a win32 dll written in VC++6 service pack 6. Let's call
I have a C# project consisting of stored procedures that reference a win32 dll
I have a VS generated C++ Win32 DLL project. It has the following files:
I have a VS2008 solution containing two C++ projects. One is a Win32/console .dll
I have created a dll project in VS2010 (Win32 console application>dll). I put some
I have two project in my solution: C/C++ Win32 DLL and some C# application.

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.