mfc >> Which .lib to include for using the function ConfigDSN

by vikrant » Sun, 30 Nov 2003 22:04:51 GMT

Hey Friends I want use the function ConfifDSN to configure a DSN

but i am getting linking error for ConfigDSN

Which .lib to include for using the function ConfigDSN ?




mfc >> Which .lib to include for using the function ConfigDSN

by GuitarBill » Tue, 02 Dec 2003 12:10:49 GMT


ODBC32.lib ?

configure a DSN



Similar Threads

1. what lib for configDSN

I'm trying to programmatically setup a DSN. I'm using configDSN but keep 
getting an "unresolved external" error. Anyone know where the lib for this 
function is? Can't find it on msdn or the web.

thanks,

Colin 


2. How to find what functions are included in a lib

3. why vc alwayys links kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib

I wonder why the linker is always searching these libraries, and where I 
can switch that off.

I can imagine why kernel32 is linked, but what do I need gdi for in a dos 
app and odbc and so on?

cheers
Ingo

4. Using c libraries: zlib.lib, libjpeg.lib - CSharp/C#

5. using stdlib.h from /usr/include or /usr/vacpp/include

Hi,
When i try to use stdlib.h from /usr/vacpp/include i get compilation
errors but if i pick up the header file from /usr/include i do not get
compilation problems. By default for a C++ compiler i think header
files will be picked up from the compiler header file location(/usr/
vacpp) and not system location (/usr/inlcude).

Is there a rule that stdlib.h should be included from /usr/include
area and not /usr/vacppp area.

Platform : AIX, Power6
Complier : xlC (C++)

Code :
#include <stdio.h>
#include <strings.h>
#include </usr/include/stdlib.h>

int main()
{
    char * hello = "hello";
    int i = abs(2);
    char ss[10];
    strcpy(ss, hello);
    printf ("%s\n",hello);
    printf ("%d\n",i);
    return 0;
}

xlC 1.cpp


error :
"/usr/vacpp/include/stdlib.h", line 133.22: 1540-0403 (S) "div(int,
int)" is already defined.
"/usr/include/stdlib.h", line 727.22: 1540-0425 (I) "div" is defined
on line 727 of "/usr/include/stdlib.h".
"/usr/include/stdlib.h", line 275.33: 1540-0424 (I) "div" is declared
on line 275 of "/usr/include/stdlib.h".
"/usr/vacpp/include/stdlib.h", line 134.36: 1540-0403 (S) "div(long,
long)" is already defined.
"/usr/include/stdlib.h", line 728.36: 1540-0425 (I) "div" is defined
on line 728 of "/usr/include/stdlib.h".
"/usr/vacpp/include/stdlib.h", line 135.23: 1540-0403 (S) "ldiv(long,
long)" is already defined.
"/usr/include/stdlib.h", line 729.23: 1540-0425 (I) "ldiv" is defined
on line 729 of "/usr/include/stdlib.h"
....
....
....


thanks
shankha

6. how to include a lib?

7. Bug including a static lib in a MC++ application

Hello,

I think I found a bug in VC 7.1 concerning destruction of stack
objects when linking a static, non managed, C++ library within a
managed C++ application. Here is a repro case :

1) Build a static, unmanaged, library containing the following 2
files. Compiles with /MDd.
// FILE BaseHolder.h
#pragma once
#include <boost/shared_ptr.hpp>

class Base
{};

class Derived : public Base
{};

class Holder
{
public:
   Holder(boost::shared_ptr<Base> pointer);
private:
   boost::shared_ptr<Base> my_pointer;
};

//FILE BaseHolder.cpp
#include "StdAfx.h"
#include ".\baseholder.h"


Holder::Holder(boost::shared_ptr<Base> pointer)
> my_pointer(pointer)
{
}

2) Build a MC++ console application with the following main file (also
compiles with /MDd) :
#include "stdafx.h"
#using <mscorlib.dll>
#include <boost/shared_ptr.hpp>
#include "../static_lib/BaseHolder.h"

void Function()
{
   boost::shared_ptr<Derived> pointer (new Derived);  //line 1
   Holder my_holder (pointer);                        //line 2
}

int _tmain()
{
   Function();
   return 0;
}

3) Now, put breakpoints on boost::detail::sp_counted_base::add_ref()
and boost::detail::sp_counted_base::release() to see the shared_ptr
counter goes up and down : these are lines 119 and 129 of
shared_count.hpp in my version of Boost()

Run the program and observes the behaviour :
1) On line 2, add_ref() is called when copying a copy of pointer for
the parameter of Holder constructor.
2) BUG!!! release() is called from somewhere deep inside mscorwks.dll.
There is no shared_ptr to be destroyed at this point (the Holder
contructor has not yet been called).
3) The Holder constructor is called
4) add_ref is called during construction of Holder::my_pointer (counst
is now 2, should be 3).
5) Normal stuff continues (the parameter of Holder constructor is
destroyed, etc etc...). However, we have leaked an abnormal release,
and the program hangs (in
boost::detail::lightweight_mutex::scoped_lock constructor) during
leaving Function, when trying to delete twice the shared_ptr counter.

If you compile the main application as traditionnal C++ (not managed),
everything goes smooth, so I believe the problem lies somewhere within
mscorwks.dll.

If anyone has an idea on a workaround...

Arnaud
MVP - VC


8. set up include and lib path in .NET?