home Forums Search Search Results for 'visual studio'

Viewing 10 results - 11 through 20 (of 65 total)
  • Author
    Search Results
  • #2086

    Hi,

    I think there is something wrong with your code. If you were able to build and run the example application, then the problem is with your new application. I am not familiar with Visual Studio, but I think you should try using CMake with “NMake Makefiles”, like I do in “build.bat”.

    A quick option to test the library is to build it and execute fuzzylite.exe. Do you have this file in your system?

    #2082
    Unknown
    Member

    Hi,
    Thank you for quick answering..
    actually, I have changed CMakeLists.txt and run the example. Unfortunately, I got this error:

    1>—— Build started: Project: FL_Ex2, Configuration: Debug Win32 ——
    1>Build started 3/3/2016 12:16:09 AM.
    1>InitializeBuildStatus:
    1> Touching “Debug\FL_Ex2.unsuccessfulbuild”.
    1>ClCompile:
    1> All outputs are up-to-date.
    1>main.obj : error LNK2019: unresolved external symbol “public: virtual __thiscall fl::FldExporter::~FldExporter(void)” (??1FldExporter@fl@@UAE@XZ) referenced in function _main
    1>main.obj : error LNK2019: unresolved external symbol “public: __thiscall fl::FldExporter::FldExporter(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)” (??0FldExporter@fl@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) referenced in function _main
    1>main.obj : error LNK2019: unresolved external symbol “public: static bool __cdecl fl::fuzzylite::logging(void)” (?logging@fuzzylite@fl@@SA_NXZ) referenced in function _main
    1>main.obj : error LNK2019: unresolved external symbol “public: static class fl::Engine * __cdecl fl::Console::mamdani(void)” (?mamdani@Console@fl@@SAPAVEngine@2@XZ) referenced in function _main
    1>c:\users\user\documents\visual studio 2010\Projects\FL_Ex2\Debug\FL_Ex2.exe : fatal error LNK1120: 4 unresolved externals
    1>
    1>Build FAILED.
    1>
    1>Time Elapsed 00:00:01.95
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

    #2079
    Unknown
    Member

    Hi …
    I have compiled fuzzylite with cMake for visual studio 2010. I have tried to run an example to see whether my library is work properly or not. unfortunately, I got this error “LINK : fatal error LNK1104: cannot open file ‘D:\fuzzylite-release\fuzzylite\debug\bin.obj”.
    I added the directories: fuzzylite and fuzzylite/bin to include and library in VC++ directories (project properties).
    I still have same error.
    Could you please help…
    Thank you for your help and time.

    #2073
    Unknown
    Member

    Hi .
    thanks for wonderful work.
    my problem is very strange.
    In vsiual c++ I want to use fuzzylite library to create a dll.
    when I create my class that using library in the form (myclass.h , myclass.cpp)
    the project compiles fine.
    and fuzzylite headers are included in the myclass.h
    but if i add (#include “stdafx.h”) at the top of myclass.cpp or add (#include “fl/Headers.h”) to the stdafx.h I get about 100 errors.
    any idea?

    #2020

    In reply to: Execution speed

    Unknown
    Member

    Hi,

    I have loaded symbols from pdb files in visual studio 2013 to do performance analysis with cpu sampling.
    see below for most time consuming functions:

    Nom de la fonction	Échantillons inclusifs	Échantillons exclusifs	% d'échantillons inclusifs	% d'échantillons exclusifs
    std::_Lockit::_Lockit	                7 216	7 216	3,07	3,07
    operator delete	                        7 145	7 145	3,04	3,04
    std::_Lockit::~_Lockit	                7 121	7 121	3,03	3,03
    operator new	                        5 456	5 456	2,32	2,32
    fl::Antecedent::activationDegree	78 861	5 094	33,56	2,17
    _RTC_CheckStackVars	                3 684	3 684	1,57	1,57
    _RTC_CheckEsp	                        3 654	3 654	1,56	1,56
    std::_Iterator_base12::_Orphan_me	3 216	3 216	1,37	1,37
    fl::Operation::isEq	                7 520	3 131	3,20	1,33
    __RTDynamicCast	                        3 105	3 105	1,32	1,32
    fl::Accumulated::membership	        19 031	2 979	8,10	1,27
    free	                                2 970	2 970	1,26	1,26
    fl::Ramp::membership	                13 160	2 931	5,60	1,25
    std::_Iterator_base12::_Adopt	        11 232	2 875	4,78	1,22
    _BitBlt@36	                        2 814	2 814	1,20	1,20
    fl::Operation::isNaN<double>	        2 700	2 700	1,15	1,15
    fl::Activated::membership	        12 797	2 531	5,45	1,08
    std::_Iterator_base12::operator=	11 659	1 616	4,96	0,69
    std::_Iterator_base12::~_Iterator_base12	11 895	1 460	5,06	0,62
    _VEC_memset	                        1 226	1 226	0,52	0,52
    std::_Iterator_base12::_Iterator_base12	12 937	1 199	5,51	0,51
    std::_Container_base12::_Orphan_all	1 127	1 127	0,48	0,48
    fl::Centroid::defuzzify	                20 968	954	8,92	0,41
    std::vector<fl::Activated *,std::allocator<fl::Activated *> >::size	827	827	0,35	0,35
    std::_Vector_const_iterator<std::_Vector_val<std::_Simple_types<fl::Hedge *> > >::_Vector_const_iterator<std::_Vector_val<std::_Simple_types<fl::Hedge *> > >	14 616	730	6,22	0,31
    std::_Vector_const_iterator<std::_Vector_val<std::_Simple_types<fl::Hedge *> > >::~_Vector_const_iterator<std::_Vector_val<std::_Simple_types<fl::Hedge *> > >	14 033	669	5,97	0,28
    std::reverse_iterator<std::_Vector_const_iterator<std::_Vector_val<std::_Simple_types<fl::Hedge *> > > >::reverse_iterator<std::_Vector_const_iterator<std::_Vector_val<std::_Simple_types<fl::Hedge *> > > >	16 290	596	6,93	0,25
    std::_Iterator012<std::random_access_iterator_tag,fl::Hedge *,int,fl::Hedge * const *,fl::Hedge * const &,std::_Iterator_base12>::_Iterator012<std::random_access_iterator_tag,fl::Hedge *,int,fl::Hedge * const *,fl::Hedge * const &,std::_Iterator_base12>	13 700	586	5,83	0,25
    fl::Operation::isLt	2 929	574	1,25	0,24

    I have deleted lines related to other libraries.
    Dynamical allocation is very time consuming.
    I have replaced dynamic_cast by static_cast for Variable but there is no significant improvement.

    In Antecedent::activationDegree function, bottlenecks are at this lines :

    28.9%: return conjunction->compute(
                        this->activationDegree(conjunction, disjunction, fuzzyOperator->left),
                        this->activationDegree(conjunction, disjunction, fuzzyOperator->right));
    10.4%: if (fuzzyOperator->name == Rule::andKeyword()) {
    
    6.9%: for (std::vector<Hedge*>::const_reverse_iterator rit = proposition->hedges.rbegin();
    8.9%:                    rit != proposition->hedges.rend(); ++rit) {
    
    2.1%: result = proposition->term->membership(inputVariable->getInputValue());

    FFLL library is basic but fast, there are some explanations here :

    I need a fast library because I optimize a parameter so there are a lot of call to engine::process function.
    see below my controller:

    engine = new fl::Engine("fuzzy_engine");
    	
    osc = new fl::InputVariable("OSC", -300, 300);
    osc->setInputValue(0);
    osc->setEnabled(true);
    osc->addTerm(new fl::Ramp("UP", -134, -300));
    osc->addTerm(new fl::Ramp("DOWN", 134, 300));
    osc->addTerm(new fl::Ramp("EXIT_UP", -100, -300));
    osc->addTerm(new fl::Ramp("EXIT_DOWN", 100, 300));
    engine->addInputVariable(osc);
    	
    dosc = new fl::InputVariable();
    dosc->setName("DOSC");
    dosc->setRange(-300, 300);
    dosc->setEnabled(true);
    dosc->addTerm(new fl::Ramp("DOWN", 0,  -300));
    dosc->addTerm(new fl::Ramp("UP", 0, 300));
    engine->addInputVariable(dosc );
    
    dvar2 = new fl::InputVariable("DVAR2", -100, 100);
    dvar2->setInputValue(0);
    dvar2->addTerm(new fl::Ramp("DOWN", -4.3, -100));
    dvar2->addTerm(new fl::Ramp("UP", 4.3, 100));
    engine->addInputVariable(dvar2);
    
    dvar3 = new fl::InputVariable();
    dvar3->setName("DVAR3");
    dvar3->setRange(-5, 5);
    dvar3->setEnabled(true);
    dvar3->addTerm(new fl::Ramp("DOWN", -0.8, -5));
    dvar3->addTerm(new fl::Ramp("UP", 0.8, 5));
    engine->addInputVariable(dvar3 );
    
    dvar12 = new fl::InputVariable();
    dvar12->setName("DVAR12");
    dvar12->setRange(-10, 10);
    dvar12->setEnabled(true);
    dvar12->addTerm(new fl::Ramp("DOWN", 0, -10));
    dvar12->addTerm(new fl::Ramp("UP", 0, 10));
    engine->addInputVariable(dvar12);
    
    dvar1a = new fl::InputVariable();
    dvar1a->setName("DVAR1A");
    dvar1a->setRange(-30, 30);
    dvar1a->setEnabled(true);
    dvar1a->addTerm(new fl::Ramp("DOWN", -2, -10));
    dvar1a->addTerm(new fl::Ramp("UP", 2, 10));
    dvar1a->addTerm(new fl::Ramp("EXIT_DOWN", -17, -30));
    dvar1a->addTerm(new fl::Ramp("EXIT_UP", 17, 30));
    engine->addInputVariable(dvar1a );
    
    dvarb1 = new fl::InputVariable();
    dvarb1->setName("DVARB1");
    dvarb1->setRange(-30, 30);
    dvarb1->setEnabled(true);
    dvarb1->addTerm(new fl::Ramp("UP", -2, -10));
    dvarb1->addTerm(new fl::Ramp("DOWN", 2, 10));
    dvarb1->addTerm(new fl::Ramp("EXIT_UP", -17, -30));
    dvarb1->addTerm(new fl::Ramp("EXIT_DOWN", 17, 30));
    engine->addInputVariable(dvarb1 );
    
    entry = new fl::OutputVariable("ENTRY", -1, 1);
    entry->setDefaultValue(0.0);
    entry->setEnabled(true);
    entry->fuzzyOutput()->setAccumulation(new fl::Maximum);
    entry->setDefuzzifier(new fl::Centroid(200));
    entry->addTerm(new fl::Ramp("ENTRY1", 0, -1));
    entry->addTerm(new fl::Ramp("ENTRY2", 0, 1));
    engine->addOutputVariable(entry);
    
    exit = new fl::OutputVariable("EXIT", -1, 1);
    exit->setDefaultValue(0.0);
    exit->setEnabled(true);
    exit->fuzzyOutput()->setAccumulation(new fl::Maximum);
    exit->setDefuzzifier(new fl::Centroid(200));
    exit->addTerm(new fl::Ramp("EXIT2", 0, -1));
    exit->addTerm(new fl::Ramp("EXIT1", 0, 1));
    engine->addOutputVariable(exit);
    
    ruleblock = new fl::RuleBlock("rules");
    ruleblock->setEnabled(true);
    ruleblock->setConjunction(new fl::Minimum());
    ruleblock->setDisjunction(new fl::Maximum);
    ruleblock->setActivation(new fl::Minimum);
    ruleblock->addRule(fl::Rule::parse("if OSC is DOWN and DOSC is DOWN and DVAR2 is DOWN and DVAR3 is DOWN and DVARB1 is DOWN then ENTRY is ENTRY2", engine));
    ruleblock->addRule(fl::Rule::parse("if OSC is UP and DOSC is UP and DVAR2 is UP and DVAR3 is UP and DVAR1A is UP then ENTRY is ENTRY1", engine));
    ruleblock->addRule(fl::Rule::parse("if OSC is EXIT_DOWN and DOSC is DOWN and DVARB1 is EXIT_DOWN then EXIT is EXIT1", engine));
    ruleblock->addRule(fl::Rule::parse("if OSC is EXIT_UP and DOSC is UP and DVAR1A is EXIT_UP then EXIT is EXIT2", engine));
    
    engine->addRuleBlock(ruleblock);

    Thanks a lot for your help!

    Cheers

    Unknown
    Member

    My project work with my new dll compiled with visual studio 2013 (platform toolset v120)

    Unknown
    Member

    i can generate project files with this command :
    cmake . -G “Visual Studio 12 2013”

    I can compile if i replace std::max by std::fmax and if i replace this line in FclImporter.cpp:
    ex << “[syntax error] expected property of type ‘start .. end’, ”
    << “but found <” << range << “> in line: ” << line;
    by this:
    ex << “[syntax error] expected property of type ‘start .. end’, ”
    << “but found <” << range.str() << “> in line: ” << line;

    Unknown
    Member

    Hi,
    Thank you very much for the FuzzyLite library!

    I have integrated your library in my win32 project. I have copy paste your c++ example in my source. I can compile it under visual studio 2013 without problem then run my executable with your dll but i get read/write memory acces errors. In debug mode, there is no error so i can not found any error.

    I also try the Free Fuzzy Logic library and i have no problem but this c++ library is too basic.

    I have tried to compile the fuzzylite library in visual studio 2013 so i run C:\fuzzylite-5.0\fuzzylite>build.bat from the Visual Studio Terminal x86 but i get :

    NMAKE : fatal error U1064: MAKEFILE introuvable et aucune cible spécifiée
    Stop.
    I have tried cmake then nmake:
    C:\fuzzylite-5.0\fuzzylite>cmake . -G “NMake Makefiles”
    Windows
    CMake Warning (dev) at CMakeLists.txt:65 (if):
    Policy CMP0054 is not set: Only interpret if() arguments as variables or
    keywords when unquoted. Run “cmake –help-policy CMP0054” for policy
    details. Use the cmake_policy command to set the policy and suppress this
    warning.

    Quoted variables like “MSVC” will no longer be dereferenced when the policy
    is set to NEW. Since the policy is not set the OLD behavior will be used.
    This warning is for project developers. Use -Wno-dev to suppress it.

    =====================================
    fuzzylite v.5.0b1408

    FL_USE_FLOAT=OFF
    FL_BACKTRACE=OFF
    FL_CPP11=ON
    Build=Release
    =====================================

    — Configuring done
    — Generating done
    — Build files have been written to: C:/fuzzylite-5.0/fuzzylite

    but i have errors with this command:
    C:\fuzzylite-5.0\fuzzylite>nmake /f makefile

    C:\fuzzylite-5.0\fuzzylite\.\fl/defuzzifier/Defuzzifier.h(44) : error C2610: ‘fl::Defuzzifier::Defuzzifier(fl::Defuzzifier &&)’ : n’est pas une fonction membre spéciale qui peut être définie par défaut

    with FL_CPP11 at OFF, i have the same errors

    Can you tell me why this error is coming from compiling with build.bat or nmake?

    Thanks for your help !

    Regards

    Unknown
    Member

    Hello all,
    I have read the posts regarding undefined reference linker errors but still did not find a solution.
    I tried to compile the example (http://fuzzylite.com/cpp) using gcc/i686-w64-mingw32/4.6.3 and link against fuzzylite (4.0). BTW, I do not get these errors when I use MS VisualStudio10.

    This is how the errors look like:

    D:\R_analysis\VC++_NVT\Fuzzy>make
    g++ -O1 -Wall -Ifuzzylite -c -o “main.o” “main.cpp”
    g++ -O1 -Wall -Lfuzzylite_CMake/bin/Release -o main main.o -lfuzzylite
    main.o:main.cpp:(.text+0xcb): undefined reference to `fl::Engine::Engine(std::string const&)’
    main.o:main.cpp:(.text+0x151): undefined reference to `fl::InputVariable::InputVariable(std::string const&, double, doub
    le)’
    ….
    collect2: ld returned 1 exit status
    make: *** [main] Error 1

    What did I do wrong?

    #1958

    Hi,

    sorry for the late reply.

    The current binaries in the download page are for 32bits. For 64bits, I am not sure what you need to do in VS. In Unix, is just passing a -m64 parameter to the compiler.

    In order to compile fuzzylite in Windows, you need to execute the build.bat from the Visual Studio Terminal (or Console) available amongst the applications in the Visual Studio group when you installed Visual Studio.

    Let me know if this helped.

    Cheers,

    Juan

Viewing 10 results - 11 through 20 (of 65 total)