g++ compiling issue

The engine.
Post Reply
Gardiola
Posts: 29
Joined: Mon Mar 11, 2013 4:38 pm

g++ compiling issue

Post by Gardiola »

Good morning

I use g++ as a compiler ( and Eclipse for my C++ development ).

I copied all the files and then created a small test.

#include "smile.h"
///#include <utility>

using namespace std;

int main()
{
DSL_network theNet;
}
I got the following output
15:50:46 **** Incremental Build of configuration Debug for project TEST ****
Info: Internal Builder is used for build
g++ -O0 -g3 -Wall -c -fmessage-length=0 -o "src\\Main24.o" "..\\src\\Main24.cpp"
In file included from ..\src\Main24.cpp:34:0:
..\src\/smile.h:26:6: error: #error SMILE : in debug build the runtime library must be set to Multi-threaded Debug DLL
In file included from ..\src\/smile.h:77:0,
from ..\src\Main24.cpp:34:
..\src\/caselibrary.h:7:0: warning: ignoring #pragma warning [-Wunknown-pragmas]
In file included from ..\src\/smile.h:43:0,
from ..\src\Main24.cpp:34:
..\src\/simplecase.h: In constructor 'DSL_simpleCase::Item::Item(int)':
..\src\/simplecase.h:109:16: warning: 'DSL_simpleCase::Item::continous' will be initialized after [-Wreorder]
..\src\/simplecase.h:107:7: warning: 'int DSL_simpleCase::Item::type' [-Wreorder]
..\src\/simplecase.h:105:9: warning: when initialized here [-Wreorder]

15:50:46 Build Finished (took 359ms)
Any view on this ?

Thanks for this.

Didier
shooltz[BayesFusion]
Site Admin
Posts: 1417
Joined: Mon Nov 26, 2007 5:51 pm

Re: g++ compiling issue

Post by shooltz[BayesFusion] »

Try adding -DSMILE_VC_NO_AUTOLINK to the compiler command line.
shooltz[BayesFusion]
Site Admin
Posts: 1417
Joined: Mon Nov 26, 2007 5:51 pm

Re: g++ compiling issue

Post by shooltz[BayesFusion] »

Gardiola wrote:I use g++ as a compiler ( and Eclipse for my C++ development ).
BTW: if you use MinGW then you'll also have to define NDEBUG - we only provide SMILE library binaries with debug info for Visual C++.
Gardiola
Posts: 29
Joined: Mon Mar 11, 2013 4:38 pm

Re: g++ compiling issue

Post by Gardiola »

It looks like that Visual 2010 C++ will be more easy to add the dll. let s try this one. Didier
Gardiola
Posts: 29
Joined: Mon Mar 11, 2013 4:38 pm

Re: g++ compiling issue

Post by Gardiola »

I struggle to add a dll with Visual 2010 Express.

so at the moment I am stuck with my current issue... I use MinGW
BTW: if you use MinGW then you'll also have to define NDEBUG - we only provide SMILE library binaries with debug info for Visual C++.
how I can do that ?
DSMILE_VC_NO_AUTOLINK to the compiler command line.
how I can do that ?

Thanks for this

Didier
shooltz[BayesFusion]
Site Admin
Posts: 1417
Joined: Mon Nov 26, 2007 5:51 pm

Re: g++ compiling issue

Post by shooltz[BayesFusion] »

-DSMILE_VC_NO_AUTOLINK to the compiler command line.
how I can do that ?
I have no idea - never used Eclipse with C++. It must be somewhere in the project settings.

Re: Visual Studio - you don't add a 'dll' to use SMILE. You'd be using a static library (a file with the .lib extension)
Gardiola
Posts: 29
Joined: Mon Mar 11, 2013 4:38 pm

Re: g++ compiling issue

Post by Gardiola »

I installed VC++ 2010 and I added the static lib in the linker - > General - > additional library directories.

It works !

now I need to learn your formalism before to come back to you.

Thanks for your help.

Didier
Post Reply