library conflicts?

The engine.
sjin
Posts: 10
Joined: Wed May 20, 2009 12:38 am

library conflicts?

Post by sjin »

Hi, I'm using Visual Studio C++ to run my SMILE application. I get runtime errors when I load my network after reading data from a text file. Could you please take take a look at my source code to see any possible erros? The compiling information is attached below as well. Any comments are highly appreciated!

#include "stdafx.h"
#include <iostream>
#include <fstream>
#include <sstream>
#include <vector>

#include "smile.h"

using namespace std;

struct DataStruct {
string ld;
string lde;
string wd;
string wde;
};

vector<DataStruct> vData;

void ReadData(void);
void MyNetwork(void);

int main()
{
ReadData();
MyNetwork();
};

void ReadData(void) {
ifstream m_FileStream;
m_FileStream.open("inputData.txt");
while (!m_FileStream.eof()) {
string Line;
getline(m_FileStream, Line);
if (Line.empty()) continue;
istringstream Stream(Line);
DataStruct myData;
Stream >> myData.ld >> myData.lde >> myData.wd >> myData.wde;
vData.push_back(myData);
}
}

void MyNetwork(void) {
int i;
for (i=0;i<=10;i++) {
cout << vData.at(i).ld << endl << vData.at(i).lde << endl << vData.at(i).wd << endl << vData.at(i).wde << endl << endl;
}
DSL_network theNet;
theNet.ReadFile("myNetwork.xdsl");
int a= theNet.FindNode("a");
int b= theNet.FindNode("b");
int c= theNet.FindNode("c");
int d= theNet.FindNode("d");
for (i=0;i<=9;i++) {
theNet.GetNode(a)->Value()->SetTemporalEvidence(i, vData.at(i).ld);
theNet.GetNode(b)->Value()->SetTemporalEvidence(i, vData.at(i).lde);
theNet.GetNode(c)->Value()->SetTemporalEvidence(i, vData.at(i).wd);
theNet.GetNode(d)->Value()->SetTemporalEvidence(i, vData.at(i).wde);
}
theNet.UpdateBeliefs();

int e= theNet.FindNode("e");
DSL_Dmatrix* theResult = theNet.GetNode(e)->Value()->GetMatrix();

printf("%lf\n",theResult->Subscript(0));
printf("size = %d\n", theResult->GetSize());
printf("# of dimension = %d\n", theResult->GetNumberOfDimensions());
printf("Size of dimension 1= %d\n", theResult->GetSizeOfDimension(1));
printf("Size of dimension 0= %d\n", theResult->GetSizeOfDimension(0));

theNet.WriteFile("my.dsl");
}


Input Data format (inputData.txt):

ab4500 ab0 ab600 ab0 ab0
ab5000 ab0 ab600 ab100 ab0
ab5000 ab0 ab600 ab_100 ab_200
ab4500 ab_200 ab600 ab0 ab200
ab5000 ab200 ab400 ab_100 ab200


Compiling information:

1>------ Rebuild All started: Project: TailEvent, Configuration: Debug Win32 ------
1>Deleting intermediate and output files for project 'TailEvent', configuration 'Debug|Win32'
1>Compiling...
1>stdafx.cpp
1>Compiling...
1>TailEvent.cpp
1>Compiling manifest to resources...
1>Linking...
1>LINK : C:\Projects\TailEvent\myGeNleSmile\TailEvent\Debug\TailEvent.exe not found or not built by the last incremental link; performing full link
1> Creating library C:\Projects\TailEvent\myGeNleSmile\TailEvent\Debug\TailEvent.lib and object C:\Projects\TailEvent\myGeNleSmile\TailEvent\Debug\TailEvent.exp
1>LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library
1>Embedding manifest...
1>Build log was saved at "file://c:\Projects\TailEvent\myGeNleSmile\TailEvent\TailEvent\Debug\BuildLog.htm"
1>TailEvent - 0 error(s), 1 warning(s)
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========
shooltz[BayesFusion]
Site Admin
Posts: 1473
Joined: Mon Nov 26, 2007 5:51 pm

Re: library conflicts?

Post by shooltz[BayesFusion] »

sjin wrote:Hi, I'm using Visual Studio C++ to run my SMILE application. I get runtime errors when I load my network after reading data from a text file. Could you please take take a look at my source code to see any possible erros? The compiling information is attached below as well. Any comments are highly appreciated!
Most likely you added smile.lib in linker settings explicitly. On Windows smile.h takes care of specifying the right library for your project configuration, as described on the download page.
sjin
Posts: 10
Joined: Wed May 20, 2009 12:38 am

Re: library conflicts?

Post by sjin »

Actually, I tested my code several times, and found out that it seemed not to be the runtime library problem. The real problem is it doesn't allow me to do "theNet.ReadFile("myNetwork.xdsl");". If I just replace .xdsl to .dsl file for example "theNet.ReadFile("myNetwork.dsl"), there're no more runtime error any more. But the thing is if I use dsl network instead of xdsl, I'm not doing a dynamic BN as I want, and the output matrix is one dimensional instead of two dimensional. What shall I do? Do you have an DBN sample code that can read data file, set temporal evidence and output the result matrix? Thanks a lot!
shooltz[BayesFusion]
Site Admin
Posts: 1473
Joined: Mon Nov 26, 2007 5:51 pm

Re: library conflicts?

Post by shooltz[BayesFusion] »

sjin wrote:Actually, I tested my code several times, and found out that it seemed not to be the runtime library problem.
The warning you're getting from the linker strongly suggests the C/C++ runtime mismatch. Can you post your .vcproj file (zipped)?
sjin
Posts: 10
Joined: Wed May 20, 2009 12:38 am

Re: library conflicts?

Post by sjin »

my .vcproj file?

<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8.00"
Name="TailEvent"
ProjectGUID="{18C35B55-A279-4F5B-A444-A05CBB6DC8A7}"
RootNamespace="TailEvent"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
RuntimeLibrary="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="smile.lib"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath=".\TailEvent.cpp"
>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
</Filter>
<Filter
Name="Resource Files"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

do you mean this file? Thanks!

The warning you're getting from the linker strongly suggests the C/C++ runtime mismatch. Can you post your .vcproj file (zipped)?[/quote]
shooltz[BayesFusion]
Site Admin
Posts: 1473
Joined: Mon Nov 26, 2007 5:51 pm

Re: library conflicts?

Post by shooltz[BayesFusion] »

Open project properties and perform the following changes:

1) remove smile.lib from "Additional dependencies" under "Linker / Input"
2) set "Multi-threaded Debug DLL" in "Runtime Library" under "C/C++ / Code Generation". Currently it's set to "Multi-threaded Debug"; SMILE does not support static CRT in Debug configuration.

Rebuild the project and the linker warning LNK4098 should disappear from the build output.
sjin
Posts: 10
Joined: Wed May 20, 2009 12:38 am

Re: library conflicts?

Post by sjin »

Thanks for your help. But I did try to remove the smile.lib and set the run time library to Mult-threaded Debug DLL. But I got more errors though it's different. Can you help me again to find out the problem?

1>------ Rebuild All started: Project: TailEvent, Configuration: Debug Win32 ------
1>Deleting intermediate and output files for project 'TailEvent', configuration 'Debug|Win32'
1>Compiling...
1>TailEvent.cpp
1>Linking...
1> Creating library C:\Documents and Settings\d3m956\Desktop\May28TailEvent\TailEvent\Debug\TailEvent.lib and object C:\Documents and Settings\d3m956\Desktop\May28TailEvent\TailEvent\Debug\TailEvent.exp
1>smile_dbg.lib(tstriangulator.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base_secure::_Orphan_all(void)const " (__imp_?_Orphan_all@_Container_base_secure@std@@QBEXXZ)
1>smile_dbg.lib(messagehybrid.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base_secure::_Orphan_all(void)const " (__imp_?_Orphan_all@_Container_base_secure@std@@QBEXXZ)
1>smile_dbg.lib(xmlreaderimpl.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base_secure::_Orphan_all(void)const " (__imp_?_Orphan_all@_Container_base_secure@std@@QBEXXZ) referenced in function "protected: void __thiscall std::_Tree<class std::_Tset_traits<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,0> >::_Tidy(void)" (?_Tidy@?$_Tree@V?$_Tset_traits@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@U?$less@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@$0A@@std@@@std@@IAEXXZ)
1>smile_dbg.lib(xmlgenieload.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base_secure::_Orphan_all(void)const " (__imp_?_Orphan_all@_Container_base_secure@std@@QBEXXZ)
1>smile_dbg.lib(xmlwriterimpl.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base_secure::_Orphan_all(void)const " (__imp_?_Orphan_all@_Container_base_secure@std@@QBEXXZ)
1>smile_dbg.lib(samplenodehybrid.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base_secure::_Orphan_all(void)const " (__imp_?_Orphan_all@_Container_base_secure@std@@QBEXXZ)
1>smile_dbg.lib(hbnsamplingadapter.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base_secure::_Orphan_all(void)const " (__imp_?_Orphan_all@_Container_base_secure@std@@QBEXXZ)
1>smile_dbg.lib(defhybrid.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base_secure::_Orphan_all(void)const " (__imp_?_Orphan_all@_Container_base_secure@std@@QBEXXZ)
1>smile_dbg.lib(helement.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base_secure::_Orphan_all(void)const " (__imp_?_Orphan_all@_Container_base_secure@std@@QBEXXZ)
1>smile_dbg.lib(mixgaussian.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base_secure::_Orphan_all(void)const " (__imp_?_Orphan_all@_Container_base_secure@std@@QBEXXZ)
1>smile_dbg.lib(expression.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base_secure::_Orphan_all(void)const " (__imp_?_Orphan_all@_Container_base_secure@std@@QBEXXZ)
1>smile_dbg.lib(xmlload.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base_secure::_Orphan_all(void)const " (__imp_?_Orphan_all@_Container_base_secure@std@@QBEXXZ)
1>smile_dbg.lib(xmlsave.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base_secure::_Orphan_all(void)const " (__imp_?_Orphan_all@_Container_base_secure@std@@QBEXXZ)
1>smile_dbg.lib(samplenethybrid.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base_secure::_Orphan_all(void)const " (__imp_?_Orphan_all@_Container_base_secure@std@@QBEXXZ)
1>smile_dbg.lib(defnoisymax.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base_secure::_Orphan_all(void)const " (__imp_?_Orphan_all@_Container_base_secure@std@@QBEXXZ)
1>smile_dbg.lib(defmau.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base_secure::_Orphan_all(void)const " (__imp_?_Orphan_all@_Container_base_secure@std@@QBEXXZ)
1>smile_dbg.lib(valequationevaluation.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base_secure::_Orphan_all(void)const " (__imp_?_Orphan_all@_Container_base_secure@std@@QBEXXZ)
1>smile_dbg.lib(valcontinuous.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base_secure::_Orphan_all(void)const " (__imp_?_Orphan_all@_Container_base_secure@std@@QBEXXZ)
1>smile_dbg.lib(simplecase.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base_secure::_Orphan_all(void)const " (__imp_?_Orphan_all@_Container_base_secure@std@@QBEXXZ)
1>smile_dbg.lib(extradefinition.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base_secure::_Orphan_all(void)const " (__imp_?_Orphan_all@_Container_base_secure@std@@QBEXXZ)
1>smile_dbg.lib(defequationscc.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base_secure::_Orphan_all(void)const " (__imp_?_Orphan_all@_Container_base_secure@std@@QBEXXZ)
1>smile_dbg.lib(defequation.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base_secure::_Orphan_all(void)const " (__imp_?_Orphan_all@_Container_base_secure@std@@QBEXXZ)
1>smile_dbg.lib(netica.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base_secure::_Orphan_all(void)const " (__imp_?_Orphan_all@_Container_base_secure@std@@QBEXXZ)
1>smile_dbg.lib(equationsolver.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base_secure::_Orphan_all(void)const " (__imp_?_Orphan_all@_Container_base_secure@std@@QBEXXZ)
1>smile_dbg.lib(annealedmap.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base_secure::_Orphan_all(void)const " (__imp_?_Orphan_all@_Container_base_secure@std@@QBEXXZ)
1>smile_dbg.lib(simplegraphlayout.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base_secure::_Orphan_all(void)const " (__imp_?_Orphan_all@_Container_base_secure@std@@QBEXXZ)
1>smile_dbg.lib(network.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base_secure::_Orphan_all(void)const " (__imp_?_Orphan_all@_Container_base_secure@std@@QBEXXZ)
1>smile_dbg.lib(casemanager.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base_secure::_Orphan_all(void)const " (__imp_?_Orphan_all@_Container_base_secure@std@@QBEXXZ)
1>smile_dbg.lib(dbnimpl.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base_secure::_Orphan_all(void)const " (__imp_?_Orphan_all@_Container_base_secure@std@@QBEXXZ)
1>smile_dbg.lib(ki.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base_secure::_Orphan_all(void)const " (__imp_?_Orphan_all@_Container_base_secure@std@@QBEXXZ)
1>smile_dbg.lib(xmlwriterimpl.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::~_Container_base_secure(void)" (__imp_??1_Container_base_secure@std@@QAE@XZ)
1>smile_dbg.lib(samplenodehybrid.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::~_Container_base_secure(void)" (__imp_??1_Container_base_secure@std@@QAE@XZ)
1>smile_dbg.lib(tstriangulator.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::~_Container_base_secure(void)" (__imp_??1_Container_base_secure@std@@QAE@XZ)
1>smile_dbg.lib(messagehybrid.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::~_Container_base_secure(void)" (__imp_??1_Container_base_secure@std@@QAE@XZ)
1>smile_dbg.lib(helement.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::~_Container_base_secure(void)" (__imp_??1_Container_base_secure@std@@QAE@XZ)
1>smile_dbg.lib(mixgaussian.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::~_Container_base_secure(void)" (__imp_??1_Container_base_secure@std@@QAE@XZ)
1>smile_dbg.lib(xmlreaderimpl.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::~_Container_base_secure(void)" (__imp_??1_Container_base_secure@std@@QAE@XZ)
1>smile_dbg.lib(xmlgenieload.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::~_Container_base_secure(void)" (__imp_??1_Container_base_secure@std@@QAE@XZ) referenced in function "public: class std::_Vector_iterator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > > __thiscall std::_Vector_iterator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > >::operator-(int)const " (??G?$_Vector_iterator@U?$pair@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@@std@@V?$allocator@U?$pair@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@@std@@@2@@std@@QBE?AV01@H@Z)
1>smile_dbg.lib(xmlload.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::~_Container_base_secure(void)" (__imp_??1_Container_base_secure@std@@QAE@XZ)
1>smile_dbg.lib(xmlsave.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::~_Container_base_secure(void)" (__imp_??1_Container_base_secure@std@@QAE@XZ)
1>smile_dbg.lib(samplenethybrid.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::~_Container_base_secure(void)" (__imp_??1_Container_base_secure@std@@QAE@XZ)
1>smile_dbg.lib(defhybrid.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::~_Container_base_secure(void)" (__imp_??1_Container_base_secure@std@@QAE@XZ)
1>smile_dbg.lib(defnoisymax.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::~_Container_base_secure(void)" (__imp_??1_Container_base_secure@std@@QAE@XZ)
1>smile_dbg.lib(defmau.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::~_Container_base_secure(void)" (__imp_??1_Container_base_secure@std@@QAE@XZ)
1>smile_dbg.lib(valequationevaluation.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::~_Container_base_secure(void)" (__imp_??1_Container_base_secure@std@@QAE@XZ)
1>smile_dbg.lib(valcontinuous.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::~_Container_base_secure(void)" (__imp_??1_Container_base_secure@std@@QAE@XZ)
1>smile_dbg.lib(simplecase.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::~_Container_base_secure(void)" (__imp_??1_Container_base_secure@std@@QAE@XZ)
1>smile_dbg.lib(extradefinition.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::~_Container_base_secure(void)" (__imp_??1_Container_base_secure@std@@QAE@XZ)
1>smile_dbg.lib(defequationscc.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::~_Container_base_secure(void)" (__imp_??1_Container_base_secure@std@@QAE@XZ)
1>smile_dbg.lib(defequation.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::~_Container_base_secure(void)" (__imp_??1_Container_base_secure@std@@QAE@XZ)
1>smile_dbg.lib(netica.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::~_Container_base_secure(void)" (__imp_??1_Container_base_secure@std@@QAE@XZ)
1>smile_dbg.lib(equationsolver.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::~_Container_base_secure(void)" (__imp_??1_Container_base_secure@std@@QAE@XZ)
1>smile_dbg.lib(annealedmap.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::~_Container_base_secure(void)" (__imp_??1_Container_base_secure@std@@QAE@XZ)
1>smile_dbg.lib(simplegraphlayout.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::~_Container_base_secure(void)" (__imp_??1_Container_base_secure@std@@QAE@XZ)
1>smile_dbg.lib(network.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::~_Container_base_secure(void)" (__imp_??1_Container_base_secure@std@@QAE@XZ)
1>smile_dbg.lib(casemanager.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::~_Container_base_secure(void)" (__imp_??1_Container_base_secure@std@@QAE@XZ)
1>smile_dbg.lib(dbnimpl.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::~_Container_base_secure(void)" (__imp_??1_Container_base_secure@std@@QAE@XZ)
1>smile_dbg.lib(ki.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::~_Container_base_secure(void)" (__imp_??1_Container_base_secure@std@@QAE@XZ)
1>smile_dbg.lib(samplenodehybrid.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::_Container_base_secure(void)" (__imp_??0_Container_base_secure@std@@QAE@XZ) referenced in function "public: class std::_Vb_iterator<unsigned int,int,class std::vector<bool,class std::allocator<bool> > > __thiscall std::vector<bool,class std::allocator<bool> >::begin(void)" (?begin@?$vector@_NV?$allocator@_N@std@@@std@@QAE?AV?$_Vb_iterator@IHV?$vector@_NV?$allocator@_N@std@@@std@@@2@XZ)
1>smile_dbg.lib(tstriangulator.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::_Container_base_secure(void)" (__imp_??0_Container_base_secure@std@@QAE@XZ)
1>smile_dbg.lib(messagehybrid.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::_Container_base_secure(void)" (__imp_??0_Container_base_secure@std@@QAE@XZ)
1>smile_dbg.lib(mixgaussian.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::_Container_base_secure(void)" (__imp_??0_Container_base_secure@std@@QAE@XZ)
1>smile_dbg.lib(xmlreaderimpl.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::_Container_base_secure(void)" (__imp_??0_Container_base_secure@std@@QAE@XZ)
1>smile_dbg.lib(xmlgenieload.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::_Container_base_secure(void)" (__imp_??0_Container_base_secure@std@@QAE@XZ)
1>smile_dbg.lib(xmlwriterimpl.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::_Container_base_secure(void)" (__imp_??0_Container_base_secure@std@@QAE@XZ)
1>smile_dbg.lib(xmlload.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::_Container_base_secure(void)" (__imp_??0_Container_base_secure@std@@QAE@XZ)
1>smile_dbg.lib(xmlsave.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::_Container_base_secure(void)" (__imp_??0_Container_base_secure@std@@QAE@XZ)
1>smile_dbg.lib(defhybrid.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::_Container_base_secure(void)" (__imp_??0_Container_base_secure@std@@QAE@XZ)
1>smile_dbg.lib(helement.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::_Container_base_secure(void)" (__imp_??0_Container_base_secure@std@@QAE@XZ)
1>smile_dbg.lib(defnoisymax.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::_Container_base_secure(void)" (__imp_??0_Container_base_secure@std@@QAE@XZ)
1>smile_dbg.lib(defmau.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::_Container_base_secure(void)" (__imp_??0_Container_base_secure@std@@QAE@XZ)
1>smile_dbg.lib(valequationevaluation.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::_Container_base_secure(void)" (__imp_??0_Container_base_secure@std@@QAE@XZ)
1>smile_dbg.lib(valcontinuous.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::_Container_base_secure(void)" (__imp_??0_Container_base_secure@std@@QAE@XZ)
1>smile_dbg.lib(simplecase.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::_Container_base_secure(void)" (__imp_??0_Container_base_secure@std@@QAE@XZ)
1>smile_dbg.lib(extradefinition.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::_Container_base_secure(void)" (__imp_??0_Container_base_secure@std@@QAE@XZ)
1>smile_dbg.lib(defequationscc.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::_Container_base_secure(void)" (__imp_??0_Container_base_secure@std@@QAE@XZ)
1>smile_dbg.lib(defequation.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::_Container_base_secure(void)" (__imp_??0_Container_base_secure@std@@QAE@XZ)
1>smile_dbg.lib(netica.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::_Container_base_secure(void)" (__imp_??0_Container_base_secure@std@@QAE@XZ)
1>smile_dbg.lib(equationsolver.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::_Container_base_secure(void)" (__imp_??0_Container_base_secure@std@@QAE@XZ)
1>smile_dbg.lib(annealedmap.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::_Container_base_secure(void)" (__imp_??0_Container_base_secure@std@@QAE@XZ)
1>smile_dbg.lib(simplegraphlayout.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::_Container_base_secure(void)" (__imp_??0_Container_base_secure@std@@QAE@XZ)
1>smile_dbg.lib(network.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::_Container_base_secure(void)" (__imp_??0_Container_base_secure@std@@QAE@XZ)
1>smile_dbg.lib(casemanager.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::_Container_base_secure(void)" (__imp_??0_Container_base_secure@std@@QAE@XZ)
1>smile_dbg.lib(dbnimpl.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::_Container_base_secure(void)" (__imp_??0_Container_base_secure@std@@QAE@XZ)
1>smile_dbg.lib(ki.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::_Container_base_secure(void)" (__imp_??0_Container_base_secure@std@@QAE@XZ)
1>smile_dbg.lib(defhybrid.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base_secure::_Swap_aux(class std::_Container_base_secure &)" (__imp_?_Swap_aux@_Container_base_secure@std@@QAEXAAV12@@Z) referenced in function "public: __thiscall DSL_defHybrid::DSL_defHybrid(int,class DSL_network *)" (??0DSL_defHybrid@@QAE@HPAVDSL_network@@@Z)
1>smile_dbg.lib(mixgaussian.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base_secure::_Swap_aux(class std::_Container_base_secure &)" (__imp_?_Swap_aux@_Container_base_secure@std@@QAEXAAV12@@Z)
1>smile_dbg.lib(simplegraphlayout.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base_secure::_Swap_aux(class std::_Container_base_secure &)" (__imp_?_Swap_aux@_Container_base_secure@std@@QAEXAAV12@@Z)
1>smile_dbg.lib(defequation.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base_secure::_Swap_aux(class std::_Container_base_secure &)" (__imp_?_Swap_aux@_Container_base_secure@std@@QAEXAAV12@@Z)
1>smile_dbg.lib(defmau.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base_secure::_Swap_aux(class std::_Container_base_secure &)" (__imp_?_Swap_aux@_Container_base_secure@std@@QAEXAAV12@@Z)
1>smile_dbg.lib(xmlload.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base_secure::_Swap_aux(class std::_Container_base_secure &)" (__imp_?_Swap_aux@_Container_base_secure@std@@QAEXAAV12@@Z)
1>smile_dbg.lib(defhybrid.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base_secure::_Swap_all(class std::_Container_base_secure &)const " (__imp_?_Swap_all@_Container_base_secure@std@@QBEXAAV12@@Z) referenced in function "public: __thiscall DSL_defHybrid::DSL_defHybrid(int,class DSL_network *)" (??0DSL_defHybrid@@QAE@HPAVDSL_network@@@Z)
1>smile_dbg.lib(mixgaussian.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base_secure::_Swap_all(class std::_Container_base_secure &)const " (__imp_?_Swap_all@_Container_base_secure@std@@QBEXAAV12@@Z)
1>smile_dbg.lib(simplegraphlayout.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base_secure::_Swap_all(class std::_Container_base_secure &)const " (__imp_?_Swap_all@_Container_base_secure@std@@QBEXAAV12@@Z)
1>smile_dbg.lib(defequation.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base_secure::_Swap_all(class std::_Container_base_secure &)const " (__imp_?_Swap_all@_Container_base_secure@std@@QBEXAAV12@@Z)
1>smile_dbg.lib(defmau.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base_secure::_Swap_all(class std::_Container_base_secure &)const " (__imp_?_Swap_all@_Container_base_secure@std@@QBEXAAV12@@Z)
1>smile_dbg.lib(xmlload.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base_secure::_Swap_all(class std::_Container_base_secure &)const " (__imp_?_Swap_all@_Container_base_secure@std@@QBEXAAV12@@Z)
1>C:\Documents and Settings\d3m956\Desktop\May28TailEvent\TailEvent\Debug\TailEvent.exe : fatal error LNK1120: 5 unresolved externals
1>Build log was saved at "file://c:\Documents and Settings\d3m956\Desktop\May28TailEvent\TailEvent\TailEvent\Debug\BuildLog.htm"
1>TailEvent - 98 error(s), 0 warning(s)
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
shooltz[BayesFusion]
Site Admin
Posts: 1473
Joined: Mon Nov 26, 2007 5:51 pm

Re: library conflicts?

Post by shooltz[BayesFusion] »

The project builds correctly - I just had to comment out four calls to SetTemporalEvidence with std::string as 2nd argument.

Do you have VS 2005 SP1 installed? What are the sizes/timestamps of the smile*.lib files?
sjin
Posts: 10
Joined: Wed May 20, 2009 12:38 am

Re: library conflicts?

Post by sjin »

shooltz wrote:The project builds correctly - I just had to comment out four calls to SetTemporalEvidence with std::string as 2nd argument.

Do you have VS 2005 SP1 installed? What are the sizes/timestamps of the smile*.lib files?
Hi, Shooltz, I didn't install VS 2005 SP1. The size of the smile*.lib files is 73.4 MB. I downloaded the VC 9.0 SP1 [12.1 MB] (April 16, 2009) version.

Thanks!
shooltz[BayesFusion]
Site Admin
Posts: 1473
Joined: Mon Nov 26, 2007 5:51 pm

Re: library conflicts?

Post by shooltz[BayesFusion] »

sjin wrote:Hi, Shooltz, I didn't install VS 2005 SP1. The size of the smile*.lib files is 73.4 MB. I downloaded the VC 9.0 SP1 [12.1 MB] (April 16, 2009) version.
VC 9.0 is included in Visual Studio 2008. You need either to install that version of the IDE, or download SMILE for VS 2005. Since our binaries are built with most recent service packs, you should also update your install with the relevant SP.

To reiterate: you need to match the compiled SMILE libs with the exact Visual Studio version (including the service pack) used to build the libraries.
sjin
Posts: 10
Joined: Wed May 20, 2009 12:38 am

Re: library conflicts?

Post by sjin »

shooltz wrote:
sjin wrote:Hi, Shooltz, I didn't install VS 2005 SP1. The size of the smile*.lib files is 73.4 MB. I downloaded the VC 9.0 SP1 [12.1 MB] (April 16, 2009) version.
VC 9.0 is included in Visual Studio 2008. You need either to install that version of the IDE, or download SMILE for VS 2005. Since our binaries are built with most recent service packs, you should also update your install with the relevant SP.

To reiterate: you need to match the compiled SMILE libs with the exact Visual Studio version (including the service pack) used to build the libraries.
Thanks, but which one in the following is for VS 2005 on your downloading page?

VC 9.0 SP1 [12.1 MB] (April 16, 2009)
VC 8.0 SP1 [11.7 MB] (April 16, 2009)
VC 7.1 SP1 [11.7 MB] (April 16, 2009)
VC 6.0 SP6 [5.71 MB] (April 16, 2009)

and I tried Linux (x86): gcc 4.1.1 [1.39 MB] (April 16, 2009) as well. I uncompressed the file smile_1_1_linux_gcc_4_1_1.tar.gz, and compile the code with the following command:

g++ -O3 -DNDEBUG -ffast-math try.o -o try -L libsmile.a
try.o(.text+0x292): In function `MyNetwork()':
: undefined reference to `DSL_network::DSL_network()'
try.o(.text+0x2c2): In function `MyNetwork()':
: undefined reference to `DSL_network::ReadFile(char const*, int, void*)'
try.o(.text+0x2e2): In function `MyNetwork()':
: undefined reference to `DSL_network::FindNode(char const*) const'
try.o(.text+0x312): In function `MyNetwork()':
: undefined reference to `DSL_network::FindNode(char const*) const'
try.o(.text+0x342): In function `MyNetwork()':
: undefined reference to `DSL_network::FindNode(char const*) const'
try.o(.text+0x372): In function `MyNetwork()':
: undefined reference to `DSL_network::FindNode(char const*) const'
try.o(.text+0x4b2): In function `MyNetwork()':
: undefined reference to `DSL_nodeValue::SetTemporalEvidence(int, int)'
try.o(.text+0x562): In function `MyNetwork()':
: undefined reference to `DSL_nodeValue::SetTemporalEvidence(int, int)'
try.o(.text+0x612): In function `MyNetwork()':
: undefined reference to `DSL_nodeValue::SetTemporalEvidence(int, int)'
try.o(.text+0x6c2): In function `MyNetwork()':
: undefined reference to `DSL_nodeValue::SetTemporalEvidence(int, int)'
try.o(.text+0x6f2): In function `MyNetwork()':
: undefined reference to `DSL_network::UpdateBeliefs()'
try.o(.text+0x712): In function `MyNetwork()':
: undefined reference to `DSL_network::FindNode(char const*) const'
try.o(.text+0x832): In function `MyNetwork()':
: undefined reference to `DSL_Dmatrix::Subscript(int)'
try.o(.text+0x8e2): In function `MyNetwork()':
: undefined reference to `DSL_Dmatrix::GetSizeOfDimension(int) const'
try.o(.text+0x922): In function `MyNetwork()':
: undefined reference to `DSL_Dmatrix::GetSizeOfDimension(int) const'
try.o(.text+0x952): In function `MyNetwork()':
: undefined reference to `DSL_network::~DSL_network()'
try.o(.text+0xc82): In function `MyNetwork()':
: undefined reference to `DSL_network::~DSL_network()'
collect2: ld returned 1 exit status

Why the library is not recognized? Sorry for so many questions, but I really want to find a way out to make the program run properly either in Windows or Linux. Thanks a lot!
shooltz[BayesFusion]
Site Admin
Posts: 1473
Joined: Mon Nov 26, 2007 5:51 pm

Re: library conflicts?

Post by shooltz[BayesFusion] »

sjin wrote:Thanks, but which one in the following is for VS 2005 on your downloading page?
VS 2005 contains Visual C++ 8.0.
and I tried Linux (x86): gcc 4.1.1 [1.39 MB] (April 16, 2009) as well. I uncompressed the file smile_1_1_linux_gcc_4_1_1.tar.gz, and compile the code with the following command:

g++ -O3 -DNDEBUG -ffast-math try.o -o try -L libsmile.a
Try this:

Code: Select all

g++ -O3 -DNDEBUG -ffast-math yourfile.cpp -o try -L<location of smile libs> -I<location of smile headers> -lsmilearn -lsmile
sjin
Posts: 10
Joined: Wed May 20, 2009 12:38 am

Re: library conflicts?

Post by sjin »

shooltz wrote:
sjin wrote:Thanks, but which one in the following is for VS 2005 on your downloading page?
VS 2005 contains Visual C++ 8.0.
and I tried Linux (x86): gcc 4.1.1 [1.39 MB] (April 16, 2009) as well. I uncompressed the file smile_1_1_linux_gcc_4_1_1.tar.gz, and compile the code with the following command:

g++ -O3 -DNDEBUG -ffast-math try.o -o try -L libsmile.a
Try this:

Code: Select all

g++ -O3 -DNDEBUG -ffast-math yourfile.cpp -o try -L<location of smile libs> -I<location of smile headers> -lsmilearn -lsmile
In my GCC directory, I created a lib folder, and put everything I uncompressed from smile_1_1_linux_gcc_4_1_1.tar.gz inside lib. and I compiled my code like this:
[host ~/GCC]$ ls
lib try.cpp
[host ~/GCC]$ g++ -O3 -DNDEBUG -ffast-math try.cpp -o try -L./lib -I./lib -lsmilearn -lsmile
/usr/bin/ld: skipping incompatible ./lib/libsmilearn.a when searching for -lsmilearn
/usr/bin/ld: cannot find -lsmilearn
collect2: ld returned 1 exit status

Did I make any mistake? Thanks again!
shooltz[BayesFusion]
Site Admin
Posts: 1473
Joined: Mon Nov 26, 2007 5:51 pm

Re: library conflicts?

Post by shooltz[BayesFusion] »

sjin wrote:/usr/bin/ld: skipping incompatible ./lib/libsmilearn.a when searching for -lsmilearn
What's the output from the following two commands?
uname -a
gcc --version
sjin
Posts: 10
Joined: Wed May 20, 2009 12:38 am

Re: library conflicts?

Post by sjin »

shooltz wrote:
sjin wrote:/usr/bin/ld: skipping incompatible ./lib/libsmilearn.a when searching for -lsmilearn
What's the output from the following two commands?
uname -a
gcc --version
[host ~/GCC]$ uname -a
Linux hnj 2.6.9-pnnlkf03smp #1 SMP Mon Sep 26 14:10:51 PDT 2005 ia64 ia64 ia64 GNU/Linux
[host ~/GCC]$ gcc --version
gcc (GCC) 3.4.6 20060404 (Red Hat 3.4.6-10)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Post Reply