Что у меня есть:
Файл libs.h, в который я загружаю файлы lib (в свойствах проекта я настраиваю только пути .lib и загружаю библиотеки "по рука", как и заголовки):
Код: Выделить всё
#pragma once
#ifndef PCLTEST_LIBS
#define PCLTEST_LIBS
#ifdef _DEBUG
#pragma comment(lib, "pcl_apps-gd.lib")
#pragma comment(lib, "pcl_common-gd.lib")
// a bunch of other debug libs
#else
// the release libs
#endif
#endif
Код: Выделить всё
// load the libs
#ifndef PCLTEST_LIBS
#include "libs.h"
#endif
// pcltest includes
// if only this first one is #included, everything is OK
#include "opencvOperations.h"
// #including this one causes the error
#include "files.h"
// these ones are not working also
//#include "cloudOperations.h"
//#include "visualize.h"
// c++ headers
#include
#include
//#include
//#include
void writeInfo()
{
// some std::cout calls
}
int main( int argc, char* argv[] )
{
writeInfo();
// this function is in opencvOperations.h and works OK
pcltest::openLena();
}
Изменить:
Чтобы добавить больше деталей, мой заголовок files.h:
Код: Выделить всё
#pragma once
#ifndef PCLTEST_FILES
#define PCLTEST_FILES
// pcl headers
#ifndef PCL_COMMON_H_
#include
#endif
#ifndef PCL_IO_FILE_IO_H_
#include
#endif
#ifndef PCL_IO_PCD_IO_H_
#include
#endif
#ifndef PCL_IO_PLY_IO_H_
#include
#endif
// boost headers
#ifndef BOOST_FILESYSTEM_OPERATIONSX_HPP
#include
#endif
#endif
namespace pcltest
{
// function to open PCL or binary PLY files
pcl::PointCloud::Ptr openCloud(std::string filename);
// function to save the point cloud to PCD format
void saveCloud();
}
< Strong>Edit2:
Я нашел источник проблемы,
Код: Выделить всё
#include
Подробнее здесь: https://stackoverflow.com/questions/834 ... n-msvc2010