错误c1083 canot找到DbManager.h头文件或没有这样的目录 [英] error c1083 canot find DbManager.h header file or No such directory

查看:268
本文介绍了错误c1083 canot找到DbManager.h头文件或没有这样的目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图连接oracle
错误c1083 canot找到DbManager.h heade文件或没有这样的目录。
下面是我写的代码。
//连接到DataBase.cpp:定义控制台应用程序的入口点。

  #includestdafx。 h
#define WIN32COMMON
#includeDbManager.h
#include< iostream>
#include< occi.h>

使用命名空间oracle :: occi;
using namespace std;

class DataBaseConnectionTest
{
public:
void test()
{
const string sqlstring(select * from info);
try
{
cout<<Hello<<'\\\
';
DbManager * db = new DbManager(system);
OracleServices * os = db-> getoracleServices();
Connection * conn = os-> connection();
语句* st = conn-> createStatement(sqlstring);
ResultSet * rs = st-> executeQuery();
string name;
while(rs-> next())
{
name = rs-> getString(1);
cout<<< name<<<<'\\\
';
}
st-> closeResultSet(rs);
conn-> terminateStatement(st);
}
catch(SQLException& se)
{
cout<<错误发生<<\\\
;
}

}
};

void main()
{
DataBaseConnectionTest * dbc = new DataBaseConnectionTest();
dbc-> test();
}

请帮我。

解决方案

在磁盘上查找DbManager.h。它可能位于Oracle客户端所在的文件夹深处。然后将该文件夹添加到项目属性作为附加包含文件夹。项目属性/配置属性/ C.C ++ / General,将包含DbManager.h的文件夹添加到Additional Include目录。



您可能需要提供类似的处理Oracle客户端所在的静态库文件。这是在同一个窗口中,在链接器下。


Hi i am using visual studio 2008. i got the following error when trying to connect with oracle error c1083 canot find DbManager.h heade file or No such directory. below is the code that i have written. // Connection to DataBase.cpp : Defines the entry point for the console application.

#include "stdafx.h"
#define WIN32COMMON 
#include"DbManager.h"
#include<iostream>
#include <occi.h>

using namespace oracle::occi;
using namespace std; 

class DataBaseConnectionTest
{
public:
    void test()
    {
        const string sqlstring("select * from info ");
        try
        { 
            cout<<"Hello"<<'\n';
            DbManager *db=new DbManager(system);
            OracleServices *os=db->getoracleServices();
            Connection *conn=os->connection();
            Statement *st=conn->createStatement(sqlstring);
            ResultSet *rs=st->executeQuery();
            string name;
            while(rs->next())
            {
                name=rs->getString(1);
                cout<<name<<" "<<'\n';
            }
            st->closeResultSet(rs);
            conn->terminateStatement(st);
        }
        catch(SQLException& se)
        {
            cout<<"Error Occured"<<"\n";
        }

    }
};

void main()
{
    DataBaseConnectionTest *dbc=new DataBaseConnectionTest();
    dbc->test();
}

Please help me on this.

解决方案

Find the DbManager.h on disk. It's probably somewhere deep in the folder where the Oracle client is. Then add that folder to the project properties as the additional include folder. Project properties/Configuration properties/C.C++/General, add the folder with DbManager.h to the Additional Include directories.

You'll probably need to provide similar treatment for the static library file where the Oracle client stuff is. That's in the same window, under Linker.

这篇关于错误c1083 canot找到DbManager.h头文件或没有这样的目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆