3

I am creating a sample project (a Hello, World!) with libevent.

(Just for note: This question has got nothing to do with libevent but with Visual Studio. :-))

I compiled the library separately outside but under Visual Studio environment.

Wanted to test with a sample code and I started with creating a new project in VS2010. I selected Visual C++ --> General --> Empty Project.

When I selected the project properties to add the 'additional include directories' I do not find C/C++ node where it is usually added. This is how it looks: Additional include directories in VS2010 for an empty C++ project

However, when I select Visual C++ --> Win32 --> Win32 Console Application I will be able to see the C/C++ node and add the additional include directories.

I read this post and understood I can add the required directories in VC++ Directories --> Include Directories. But yet it's not so very advisable to change the default setting.

Is there any other way I can add additional include directories without selecting the C++ --> Win32 --> Win32 Console Application project? Just want to know.

Community
  • 1
  • 1
Ashwin
  • 1,942
  • 4
  • 30
  • 59

2 Answers2

5

You need to have at least one .cpp file added to the project to be able to see the C/C++ settings. Otherwise, being an empty project, VS does not know what language you are using

Attila
  • 28,265
  • 3
  • 46
  • 55
1

You have to have a C++ project. It doesn't need to be a console application; you could also create a static library (.lib) or dynamic library (.dll).

Daniel Rose
  • 17,233
  • 9
  • 65
  • 88