CondorLang / Condor

A fast, simple, and intelligent new programming language
BSD 3-Clause "New" or "Revised" License
34 stars 11 forks source link

Shell building #8

Closed Berkmann18 closed 7 years ago

Berkmann18 commented 7 years ago

Expected Behavior

No errors and some eventual log outputed onto the terminal

Current Behavior

g++  -I ./ test/shell.cc -Iinclude build/libcondor.a -o build/linux/condor
test/shell.cc: In function ‘int main(int, const char**)’:
test/shell.cc:24:35: error: ‘to_string’ is not a member of ‘std’
  std::cout << "CondorLang (C) " + std::to_string(year) + "\n";
                                   ^
test/shell.cc:32:16: error: no matching function for call to ‘Condor::Script::Free()’
   script->Free();
                ^
In file included from test/shell.cc:6:0:
include/Condor.h:60:8: note: candidate: void Condor::Script::Free(Condor::Isolate*)
   void Free(Isolate* isolate);
        ^
include/Condor.h:60:8: note:   candidate expects 1 argument, 0 provided
Makefile:108: recipe for target 'shell' failed
make: *** [shell] Error 1

Possible Solution

  1. Making sure that to_string is a member of std (see l.24 of the code)
  2. Making sure that Free is an accessible method in Condor::Script (see l.32 of the code)
  3. Add the appropriate argument to Free (see 2. above)

    Steps to Reproduce

git clone https://github.com/CondorLang/Condor/
cd Condor
make all
make || make mt
make shell

Context (Environment)

I was trying to set up the CondorLang dev environment (to use/test/improve it) on Linux Ubuntu 16.04 LTS (64-bit) and I run into this problem.

Berkmann18 commented 7 years ago

I've tried adding the method Free in (script.cc)[https://github.com/CondorLang/Condor/tree/master/src/condor/types/script/script.cc):


    /**
     * @description Added this to find a workout around for {@link https://github.com/CondorLang/Condor/issues/8}
     * @author Berkmann18
     * @since 29/10/16 19:45 BST
     */
    void Script::Free(Isolate* isolate){
        script->Free(isolate);
    }

But I still get the same error at test/shell.cc:32:16.

chaseWillden commented 7 years ago

@Berkmann18 Do you want to submit a pull request and I'll merge it?

Berkmann18 commented 7 years ago

Sure, it might not solve entirely that subproblem tho.

Berkmann18 commented 7 years ago

I have no idea why the PR is failing on Travis CI.

chaseWillden commented 7 years ago

@Berkmann18 See my comment in the pull request. https://github.com/CondorLang/Condor/pull/10

chaseWillden commented 7 years ago

Fixed with latest build