Reputation: 133
How do I use c library in large C++ codebase?
I have found some good c library, and since c and c++ are compatible that's awesome for me. I have this big codebase with many projects, and i want to use that library inside one of projects.
So I built library on C drive, and after that I just placed it into folder with the project i want to use it with, changed references in project properties to target that library etc.
After that I have called from one of cpp files function in my send.c file which included some library files, and got error during building
Precompiled header is from previous version of compiler
So I wanted to ask:
Thanks !
Note 1: I am using Visual Studio 2015 on Windows Server 2012 R2.
Upvotes: 2
Views: 13308
Reputation: 41
Find the .pch file in the projects debug folder. Delete or rename the file. Now you should be able to compile your C++ project.
Upvotes: 4
Reputation: 133
Fixed this by following steps:
Since this was not fixing the error I did some few more things:
And this fixed my problem :)
Upvotes: 8