lib problem using VC2008, Win32 Console application

The engine.
Post Reply
zhongchu
Posts: 3
Joined: Thu Jan 28, 2010 6:27 pm

lib problem using VC2008, Win32 Console application

Post by zhongchu »

Hi,

using VC2008, Win32 Console application for the smile, there is an error as below

#include "stdafx.h"
#include "smile/smile.h"

int _tmain(int argc, _TCHAR* argv[])
{
return 0;
}

The error: LINK : fatal error LNK1104: cannot open file 'smile_dbg.lib'

thanks in advance.
zhongchu
Posts: 3
Joined: Thu Jan 28, 2010 6:27 pm

Re: lib problem using VC2008, Win32 Console application

Post by zhongchu »

And my visual c 2008 version information is:


Microsoft Visual Studio 2008
Version 9.0.30729.1 SP
Microsoft .NET Framework
Version 3.5 SP1

Installed Edition: Professional

Microsoft Visual Basic 2008 91605-270-5237227-60289
Microsoft Visual Basic 2008

Microsoft Visual C# 2008 91605-270-5237227-60289
Microsoft Visual C# 2008

Microsoft Visual C++ 2008 91605-270-5237227-60289
Microsoft Visual C++ 2008

Microsoft Visual Studio 2008 Tools for Office 91605-270-5237227-60289
Microsoft Visual Studio 2008 Tools for Office

Microsoft Visual Web Developer 2008 91605-270-5237227-60289
Microsoft Visual Web Developer 2008

Crystal Reports AAJ60-G0MSA4K-68000CF
Crystal Reports Basic for Visual Studio 2008


Hotfix for Microsoft Visual Studio 2008 Professional Edition - ENU (KB944899) KB944899
This hotfix is for Microsoft Visual Studio 2008 Professional Edition - ENU.
If you later install a more recent service pack, this hotfix will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/944899.

Hotfix for Microsoft Visual Studio 2008 Professional Edition - ENU (KB945282) KB945282
This hotfix is for Microsoft Visual Studio 2008 Professional Edition - ENU.
If you later install a more recent service pack, this hotfix will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/945282.

Hotfix for Microsoft Visual Studio 2008 Professional Edition - ENU (KB946040) KB946040
This hotfix is for Microsoft Visual Studio 2008 Professional Edition - ENU.
If you later install a more recent service pack, this hotfix will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/946040.

Hotfix for Microsoft Visual Studio 2008 Professional Edition - ENU (KB946308) KB946308
This hotfix is for Microsoft Visual Studio 2008 Professional Edition - ENU.
If you later install a more recent service pack, this hotfix will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/946308.

Hotfix for Microsoft Visual Studio 2008 Professional Edition - ENU (KB946344) KB946344
This hotfix is for Microsoft Visual Studio 2008 Professional Edition - ENU.
If you later install a more recent service pack, this hotfix will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/946344.

Hotfix for Microsoft Visual Studio 2008 Professional Edition - ENU (KB946581) KB946581
This hotfix is for Microsoft Visual Studio 2008 Professional Edition - ENU.
If you later install a more recent service pack, this hotfix will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/946581.

Hotfix for Microsoft Visual Studio 2008 Professional Edition - ENU (KB947171) KB947171
This hotfix is for Microsoft Visual Studio 2008 Professional Edition - ENU.
If you later install a more recent service pack, this hotfix will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/947171.

Hotfix for Microsoft Visual Studio 2008 Professional Edition - ENU (KB947173) KB947173
This hotfix is for Microsoft Visual Studio 2008 Professional Edition - ENU.
If you later install a more recent service pack, this hotfix will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/947173.

Hotfix for Microsoft Visual Studio 2008 Professional Edition - ENU (KB947180) KB947180
This hotfix is for Microsoft Visual Studio 2008 Professional Edition - ENU.
If you later install a more recent service pack, this hotfix will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/947180.

Hotfix for Microsoft Visual Studio 2008 Professional Edition - ENU (KB947540) KB947540
This hotfix is for Microsoft Visual Studio 2008 Professional Edition - ENU.
If you later install a more recent service pack, this hotfix will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/947540.

Hotfix for Microsoft Visual Studio 2008 Professional Edition - ENU (KB947789) KB947789
This hotfix is for Microsoft Visual Studio 2008 Professional Edition - ENU.
If you later install a more recent service pack, this hotfix will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/947789.

Hotfix for Microsoft Visual Studio 2008 Professional Edition - ENU (KB948127) KB948127
This hotfix is for Microsoft Visual Studio 2008 Professional Edition - ENU.
If you later install a more recent service pack, this hotfix will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/948127.

Hotfix for Microsoft Visual Studio 2008 Professional Edition - ENU (KB953256) KB953256
This hotfix is for Microsoft Visual Studio 2008 Professional Edition - ENU.
If you later install a more recent service pack, this hotfix will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/953256.

Hotfix for Microsoft Visual Studio 2008 Professional Edition - ENU (KB971091) KB971091
This hotfix is for Microsoft Visual Studio 2008 Professional Edition - ENU.
If you later install a more recent service pack, this hotfix will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/971091.

Hotfix for Microsoft Visual Studio 2008 Professional Edition - ENU (KB973674) KB973674
This hotfix is for Microsoft Visual Studio 2008 Professional Edition - ENU.
If you later install a more recent service pack, this hotfix will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/973674.

Microsoft Visual Studio 2008 Professional Edition - ENU Service Pack 1 (KB945140) KB945140
This service pack is for Microsoft Visual Studio 2008 Professional Edition - ENU.
If you later install a more recent service pack, this service pack will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/945140.

Microsoft Visual Studio 2008 Professional Edition - ENU Service Pack 1 (KB947888) KB947888
This service pack is for Microsoft Visual Studio 2008 Professional Edition - ENU.
If you later install a more recent service pack, this service pack will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/947888.

Update for Microsoft Visual Studio 2008 Professional Edition - ENU (KB972221) KB972221
This update is for Microsoft Visual Studio 2008 Professional Edition - ENU.
If you later install a more recent service pack, this update will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/972221.
zhongchu wrote:Hi,

using VC2008, Win32 Console application for the smile, there is an error as below

#include "stdafx.h"
#include "smile/smile.h"

int _tmain(int argc, _TCHAR* argv[])
{
return 0;
}

The error: LINK : fatal error LNK1104: cannot open file 'smile_dbg.lib'

thanks in advance.
shooltz[BayesFusion]
Site Admin
Posts: 1417
Joined: Mon Nov 26, 2007 5:51 pm

Re: lib problem using VC2008, Win32 Console application

Post by shooltz[BayesFusion] »

You need to tell the linker where are the SMILE libraries. You can do that at the project level or globally.

At the project level: open the Project settings window, then select Configuration Properties|Linker|General and set 'Additional Library Directories' property. Note that this works per-configuration, so you'll have to do that for both debug and release builds. Using this approach works best with relative paths (for example, when you have SMILE libs/headers in some subdirectory in the project dir).

To set it globally, from the main menu select Tools|Options, then Projects and Solutions|VC++ directories. Select 'Library files' from the dropdown list and add SMILE directory to the list of recognized library directories.
zhongchu
Posts: 3
Joined: Thu Jan 28, 2010 6:27 pm

Re: lib problem using VC2008, Win32 Console application

Post by zhongchu »

shooltz wrote:You need to tell the linker where are the SMILE libraries. You can do that at the project level or globally.

At the project level: open the Project settings window, then select Configuration Properties|Linker|General and set 'Additional Library Directories' property. Note that this works per-configuration, so you'll have to do that for both debug and release builds. Using this approach works best with relative paths (for example, when you have SMILE libs/headers in some subdirectory in the project dir).

To set it globally, from the main menu select Tools|Options, then Projects and Solutions|VC++ directories. Select 'Library files' from the dropdown list and add SMILE directory to the list of recognized library directories.

It works! Thanks a lot!
Post Reply