We help IT Professionals succeed at work.
Get Started

unresolved external symbol _SQLConnect@28

axnst2
axnst2 asked
on
1,539 Views
Last Modified: 2011-08-18
Hi all,

  I am dealing with a C++ DLL without MFC and I have a simple function that retrieves a record from an access DB.  This exact function has worked in the past without any problems in other projects.  I included sql.h and sqlext.h, yet when I try to build the DLL I get the following errors:

XmlOut.obj : error LNK2001: unresolved external symbol _SQLGetDiagRec@32
XmlOut.obj : error LNK2001: unresolved external symbol _SQLDisconnect@4
XmlOut.obj : error LNK2001: unresolved external symbol _SQLFreeHandle@8
XmlOut.obj : error LNK2001: unresolved external symbol _SQLFetch@4
XmlOut.obj : error LNK2001: unresolved external symbol _SQLBindCol@24
XmlOut.obj : error LNK2001: unresolved external symbol _SQLExecDirect@12
XmlOut.obj : error LNK2001: unresolved external symbol _SQLConnect@28
XmlOut.obj : error LNK2001: unresolved external symbol _SQLSetEnvAttr@16
XmlOut.obj : error LNK2001: unresolved external symbol _SQLAllocHandle@12

I kind of remember having to have to include something under Project->Settings->Link, but I can't remember what it was.

Any help would be greatly appreciated,

Thanks,
axnst2
Comment
Watch Question
Commented:
This problem has been solved!
Unlock 1 Answer and 5 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE