jondgoodwin / conehome Goto Github PK
View Code? Open in Web Editor NEWCone build environment
License: MIT License
Cone build environment
License: MIT License
Seems to be a Cone issue around usage u32
not being the same type as imm glSTATIC_DRAW = 0x88E4
among others.
pc@localhost:~/test> ./conec --version
Cone Compiler 0.1.0
pc@localhost:~/test> ./conec main.cone --wasm
Error 1013: Expression's type does not match declared parameter
--> pgm = glMakeShader(&vsSrc, &vsSrc, &fsSrc, &fsSrc)
^--- shader.cone:21:31
Error 1013: Expression's type does not match declared parameter
--> pgm = glMakeShader(&vsSrc, &vsSrc, &fsSrc, &fsSrc)
^--- shader.cone:21:47
Error 1013: Expression's type does not match declared parameter
--> posAttr = glGetAttrib(pgm, vpos, vpos)
^--- shader.cone:23:36
Error 1013: Expression's type does not match declared parameter
--> colorAttr = glGetAttrib(pgm, vcol, vcol)
^--- shader.cone:25:38
Error 1013: Expression's type does not match declared parameter
--> pmatUnif = glGetUniformLocation(pgm, uPMat, uPMat)
^--- shader.cone:27:47
Error 1013: Expression's type does not match declared parameter
--> mvmatUnif = glGetUniformLocation(pgm, uMVMat, uMVMat)
^--- shader.cone:29:49
Error 1013: Expression's type does not match declared parameter
--> glBindBuffer(glARRAY_BUFFER, uid)
^--- main.cone:19:16
Error 1013: Initialization value's type does not match variable's declared type
--> imm arrsize usize = array
^--- main.cone:21:23
Error 1025: No method named * matches the call's arguments.
--> glBufferData(glARRAY_BUFFER, arr, 4*arrsize, glSTATIC_DRAW)
^--- main.cone:22:38
Error 1013: Expression's type does not match declared parameter
--> glBufferData(glARRAY_BUFFER, arr, 4*arrsize, glSTATIC_DRAW)
^--- main.cone:22:16
Error 1013: Expression's type does not match declared parameter
--> glBufferData(glARRAY_BUFFER, arr, 4*arrsize, glSTATIC_DRAW)
^--- main.cone:22:38
Error 1013: Expression's type does not match declared parameter
--> glBufferData(glARRAY_BUFFER, arr, 4*arrsize, glSTATIC_DRAW)
^--- main.cone:22:48
Error 1013: Expression's type does not match declared parameter
--> glBindBuffer(glARRAY_BUFFER, uid)
^--- main.cone:25:16
Error 1013: Expression's type does not match declared parameter
--> glVertexAttribPointer(attrId, itemsize, glFLOAT, false, 0, 0)
^--- main.cone:26:43
Error 1013: Expression's type does not match declared parameter
--> glBindBuffer(glELEMENT_ARRAY_BUFFER, uid)
^--- main.cone:35:16
Error 1013: Initialization value's type does not match variable's declared type
--> imm arrsize usize = array
^--- main.cone:37:23
Error 1025: No method named * matches the call's arguments.
--> glBufferData(glELEMENT_ARRAY_BUFFER, arr, 2*arrsize, glSTATIC_DRAW)
^--- main.cone:38:46
Error 1013: Expression's type does not match declared parameter
--> glBufferData(glELEMENT_ARRAY_BUFFER, arr, 2*arrsize, glSTATIC_DRAW)
^--- main.cone:38:16
Error 1013: Expression's type does not match declared parameter
--> glBufferData(glELEMENT_ARRAY_BUFFER, arr, 2*arrsize, glSTATIC_DRAW)
^--- main.cone:38:46
Error 1013: Expression's type does not match declared parameter
--> glBufferData(glELEMENT_ARRAY_BUFFER, arr, 2*arrsize, glSTATIC_DRAW)
^--- main.cone:38:56
Error 1013: Expression's type does not match declared parameter
--> glClear(glCOLOR_BUFFER_BIT | glDEPTH_BUFFER_BIT)
^--- main.cone:177:29
Error 1013: Expression's type does not match declared parameter
--> glDrawArrays(glTRIANGLES, 0, 12)
^--- main.cone:185:15
Error 1013: Expression's type does not match declared parameter
--> glDrawElements(glTRIANGLES, 36, glUNSIGNED_SHORT, 0)
^--- main.cone:191:17
Error 1013: Expression's type does not match declared parameter
--> glDrawElements(glTRIANGLES, 36, glUNSIGNED_SHORT, 0)
^--- main.cone:191:34
Unsuccessful compile: 24 errors, 0 warnings
pc@localhost:~/test> LD_LIBRARY_PATH=. ./conec main.cone
Error 1013: Expression's type does not match declared parameter
--> pgm = glMakeShader(&vsSrc, &vsSrc, &fsSrc, &fsSrc)
^--- shader.cone:21:31
Error 1013: Expression's type does not match declared parameter
--> pgm = glMakeShader(&vsSrc, &vsSrc, &fsSrc, &fsSrc)
^--- shader.cone:21:47
Error 1013: Expression's type does not match declared parameter
--> posAttr = glGetAttrib(pgm, vpos, vpos)
^--- shader.cone:23:36
Error 1013: Expression's type does not match declared parameter
--> colorAttr = glGetAttrib(pgm, vcol, vcol)
^--- shader.cone:25:38
Error 1013: Expression's type does not match declared parameter
--> pmatUnif = glGetUniformLocation(pgm, uPMat, uPMat)
^--- shader.cone:27:47
Error 1013: Expression's type does not match declared parameter
--> mvmatUnif = glGetUniformLocation(pgm, uMVMat, uMVMat)
^--- shader.cone:29:49
Error 1013: Expression's type does not match lval's type
--> itemsize = itemsz
^--- main.cone:17:14
Error 1013: Expression's type does not match declared parameter
--> glBindBuffer(glARRAY_BUFFER, uid)
^--- main.cone:19:16
Error 1013: Initialization value's type does not match variable's declared type
--> imm arrsize usize = array
^--- main.cone:21:23
Error 1025: No method named * matches the call's arguments.
--> glBufferData(glARRAY_BUFFER, arr, 4*arrsize, glSTATIC_DRAW)
^--- main.cone:22:38
Error 1013: Expression's type does not match declared parameter
--> glBufferData(glARRAY_BUFFER, arr, 4*arrsize, glSTATIC_DRAW)
^--- main.cone:22:16
Error 1013: Expression's type does not match declared parameter
--> glBufferData(glARRAY_BUFFER, arr, 4*arrsize, glSTATIC_DRAW)
^--- main.cone:22:38
Error 1013: Expression's type does not match declared parameter
--> glBufferData(glARRAY_BUFFER, arr, 4*arrsize, glSTATIC_DRAW)
^--- main.cone:22:48
Error 1013: Expression's type does not match declared parameter
--> glBindBuffer(glARRAY_BUFFER, uid)
^--- main.cone:25:16
Error 1013: Expression's type does not match declared parameter
--> glVertexAttribPointer(attrId, itemsize, glFLOAT, false, 0, 0)
^--- main.cone:26:43
Error 1013: Expression's type does not match lval's type
--> itemsize = itemsz
^--- main.cone:33:14
Error 1013: Expression's type does not match declared parameter
--> glBindBuffer(glELEMENT_ARRAY_BUFFER, uid)
^--- main.cone:35:16
Error 1013: Initialization value's type does not match variable's declared type
--> imm arrsize usize = array
^--- main.cone:37:23
Error 1025: No method named * matches the call's arguments.
--> glBufferData(glELEMENT_ARRAY_BUFFER, arr, 2*arrsize, glSTATIC_DRAW)
^--- main.cone:38:46
Error 1013: Expression's type does not match declared parameter
--> glBufferData(glELEMENT_ARRAY_BUFFER, arr, 2*arrsize, glSTATIC_DRAW)
^--- main.cone:38:16
Error 1013: Expression's type does not match declared parameter
--> glBufferData(glELEMENT_ARRAY_BUFFER, arr, 2*arrsize, glSTATIC_DRAW)
^--- main.cone:38:46
Error 1013: Expression's type does not match declared parameter
--> glBufferData(glELEMENT_ARRAY_BUFFER, arr, 2*arrsize, glSTATIC_DRAW)
^--- main.cone:38:56
Error 1013: Expression's type does not match declared parameter
--> glClear(glCOLOR_BUFFER_BIT | glDEPTH_BUFFER_BIT)
^--- main.cone:177:29
Error 1013: Expression's type does not match declared parameter
--> glDrawArrays(glTRIANGLES, 0, 12)
^--- main.cone:185:15
Error 1013: Expression's type does not match declared parameter
--> glDrawElements(glTRIANGLES, 36, glUNSIGNED_SHORT, 0)
^--- main.cone:191:17
Error 1013: Expression's type does not match declared parameter
--> glDrawElements(glTRIANGLES, 36, glUNSIGNED_SHORT, 0)
^--- main.cone:191:34
Unsuccessful compile: 26 errors, 0 warnings
Hi.
I tried to compile a hello world example:
// Hello world!
extern fn print(str *u8)
fn main()
print("Hello world!")
with congo
and it fails with the following error:
Compile finished in 0.00372612 sec (84 kb). 0 warnings detected
/usr/sbin/ld: release/main.o: relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIC
/usr/sbin/ld: final link failed: nonrepresentable section on output
collect2: error: ld returned 1 exit status
Trying manually with gcc
gives me the same result.
I'm on ArchLinux.
Thanks for your help.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.