Hi,
When I run ion on the test1 and test2 packages in the bitwise/ion project directory, is runs successfully and creates the .c output files. But when I try to compile those output C files (with both MinGW gcc and Microsoft's cl), I got a long list of errors. When I checked the C files ion generates, I found that it seems to be broken. Here is an excerpt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29 | #line 16 "C:\\Users\\user\\bitwise\\ion\\test1\\subtest1\\subtest1.ion"
void test1_subtest1_func2);
#line 753 "C:\\Users\\user\\bitwise\\ion\\test1\\test1.ion"
extern test1_Thing test1_thing;
#line 506
void test1_print_any);
#line 529
void test1_print_type);
#line 147
struct test1_UartCtrl {
bool tx_enable;
#line 148
bool rx_enable;
};
#line 559
void test1_print_typeinfo);
#line 202
union test1_IntOrPtr {
int i;
int (*p);
};
"C:\\\user\\bitwise\\ion\\test1\\subtest1\\subtest1.ion"
void test1_subtest1_func3);
|
From your streams, this is obviously not happening to you or to other people trying ion, so I can only assume I am making some fundamental mistake in using it. The command I use to compile ion is
Either works fine. Then I use ion to compile a test package:
Again, that works, but it generates the broken output file. I must be doing something wrong, but I cannot figure out what. Any help will be appreciated.
I am on a Windows 10 PC. Here is info on compilers I am using.
| C:\Users\user\riscv-sim>gcc --version
gcc (GCC) 7.2.0
Copyright (C) 2017 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.
C:\Users\user\riscv-sim>cl
Microsoft (R) C/C++ Optimizing Compiler Version 19.11.25547 for x64
Copyright (C) Microsoft Corporation. All rights reserved.
|
I am using the github code for day 30.
Many thanks,
A.