-
-
Save zacharycarter/e2937f718c21bc62e13306884c46a372 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/Users/zacharycarter/dev/junkers/src/ozz.nim(38, 7) Hint: 'f' is declared but not used [XDeclaredButNotUsed] | |
/Users/zacharycarter/dev/junkers/src/ozz.nim(32, 6) Hint: 'constructStream' is declared but not used [XDeclaredButNotUsed] | |
CC: ozz.nim | |
/Users/zacharycarter/.cache/nim/ozz_d/@mozz.nim.cpp:62:29: error: no matching constructor for initialization of 'ozz::io::File' | |
N_LIB_PRIVATE ozz::io::File f__bB9c2jWHU9cutANbte9by7cXw; | |
^ | |
/Users/zacharycarter/dev/junkers/lib/ozz-animation/include/ozz/base/io/stream.h:103:12: note: candidate constructor not viable: requires single argument '_file', but no | |
arguments were provided | |
explicit File(void* _file); | |
^ | |
/Users/zacharycarter/dev/junkers/lib/ozz-animation/include/ozz/base/io/stream.h:89:7: note: candidate constructor (the implicit copy constructor) not viable: requires 1 | |
argument, but 0 were provided | |
class File : public Stream { | |
^ | |
/Users/zacharycarter/dev/junkers/lib/ozz-animation/include/ozz/base/io/stream.h:99:3: note: candidate constructor not viable: requires 2 arguments, but 0 were provided | |
File(const char* _filename, const char* _mode); | |
^ | |
1 error generated. | |
Error: execution of an external compiler program 'clang++ -c -std=gnu++14 -funsigned-char -Ilib/ozz-animation/include -I/Users/zacharycarter/dev/Nim/lib -I/Users/zacharycarter/dev/junkers/src -o /Users/zacharycarter/.cache/nim/ozz_d/@mozz.nim.cpp.o /Users/zacharycarter/.cache/nim/ozz_d/@mozz.nim.cpp' failed with exit code: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Generated by Nim Compiler v1.3.5 */ | |
/* (c) 2020 Andreas Rumpf */ | |
/* The generated code is subject to the original license. */ | |
/* Compiled for: MacOSX, amd64, clang */ | |
/* Command for C compiler: | |
clang++ -c -std=gnu++14 -funsigned-char -Ilib/ozz-animation/include -I/Users/zacharycarter/dev/Nim/lib -I/Users/zacharycarter/dev/junkers/src -o /Users/zacharycarter/.cache/nim/ozz_d/@mozz.nim.cpp.o /Users/zacharycarter/.cache/nim/ozz_d/@mozz.nim.cpp */ | |
#define NIM_INTBITS 64 | |
/* section: NIM_merge_HEADERS */ | |
#include "nimbase.h" | |
#include "/Users/zacharycarter/dev/junkers/lib/ozz-animation/include/ozz/base/io/stream.h" | |
#undef LANGUAGE_C | |
#undef MIPSEB | |
#undef MIPSEL | |
#undef PPC | |
#undef R3000 | |
#undef R4000 | |
#undef i386 | |
#undef linux | |
#undef mips | |
#undef near | |
#undef far | |
#undef powerpc | |
#undef unix | |
/* section: NIM_merge_FRAME_DEFINES */ | |
# define nimfr_(proc, file) \ | |
TFrame FR_; \ | |
FR_.procname = proc; FR_.filename = file; FR_.line = 0; FR_.len = 0; nimFrame(&FR_); | |
# define nimfrs_(proc, file, slots, length) \ | |
struct {TFrame* prev;NCSTRING procname;NI line;NCSTRING filename; NI len; VarSlot s[slots];} FR_; \ | |
FR_.procname = proc; FR_.filename = file; FR_.line = 0; FR_.len = length; nimFrame((TFrame*)&FR_); | |
# define nimln_(n, file) \ | |
FR_.line = n; FR_.filename = file; | |
/* section: NIM_merge_FORWARD_TYPES */ | |
struct TNimType; | |
/* section: NIM_merge_TYPES */ | |
struct TNimType { | |
void* destructor; | |
NI size; | |
NI align; | |
NCSTRING name; | |
void* traceImpl; | |
void* disposeImpl; | |
}; | |
/* section: NIM_merge_PROC_HEADERS */ | |
static N_INLINE(void, initStackBottomWith)(void* locals); | |
static N_INLINE(void, nimFrame)(TFrame* s); | |
N_LIB_PRIVATE N_NOINLINE(void, callDepthLimitReached__mMRdr4sgmnykA9aWeM9aDZlw)(void); | |
static N_INLINE(void, popFrame)(void); | |
N_LIB_PRIVATE N_NIMCALL(void, systemDatInit000)(void); | |
N_LIB_PRIVATE N_NIMCALL(void, systemInit000)(void); | |
N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void); | |
/* section: NIM_merge_VARS */ | |
N_LIB_PRIVATE ozz::io::File f__bB9c2jWHU9cutANbte9by7cXw; | |
extern TFrame* framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw; | |
extern TFrame* framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw; | |
extern TFrame* framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw; | |
extern TFrame* framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw; | |
extern TFrame* framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw; | |
extern TFrame* framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw; | |
/* section: NIM_merge_PROCS */ | |
static N_INLINE(void, initStackBottomWith)(void* locals) { | |
} | |
static N_INLINE(void, nimFrame)(TFrame* s) { | |
{ | |
if (!(framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw == NIM_NIL)) goto LA3_; | |
{ (*s).calldepth = ((NI16) 0); | |
} } | |
goto LA1_; | |
LA3_: ; | |
{ | |
(*s).calldepth = (NI16)((*framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw).calldepth + ((NI16) 1)); | |
} | |
LA1_: ; | |
(*s).prev = framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw; | |
framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw = s; | |
{ | |
if (!((*s).calldepth == ((NI16) 2000))) goto LA8_; | |
{ callDepthLimitReached__mMRdr4sgmnykA9aWeM9aDZlw(); | |
} } | |
LA8_: ; | |
} | |
static N_INLINE(void, popFrame)(void) { | |
framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw = (*framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw).prev; | |
} | |
N_LIB_PRIVATE void PreMainInner(void) { | |
} | |
N_LIB_PRIVATE int cmdCount; | |
N_LIB_PRIVATE char** cmdLine; | |
N_LIB_PRIVATE char** gEnv; | |
N_LIB_PRIVATE void PreMain(void) { | |
void (*volatile inner)(void); | |
inner = PreMainInner; | |
systemDatInit000(); | |
initStackBottomWith((void *)&inner); | |
systemInit000(); | |
(*inner)(); | |
} | |
N_LIB_PRIVATE N_CDECL(void, NimMainInner)(void) { | |
NimMainModule(); | |
} | |
N_CDECL(void, NimMain)(void) { | |
void (*volatile inner)(void); | |
PreMain(); | |
inner = NimMainInner; | |
initStackBottomWith((void *)&inner); | |
(*inner)(); | |
} | |
int main(int argc, char** args, char** env) { | |
cmdLine = args; | |
cmdCount = argc; | |
gEnv = env; | |
NimMain(); | |
return nim_program_result; | |
} | |
N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void) { | |
{ | |
nimfr_("ozz", "/Users/zacharycarter/dev/junkers/src/ozz.nim"); | |
nimln_(38, "/Users/zacharycarter/dev/junkers/src/ozz.nim"); | |
f__bB9c2jWHU9cutANbte9by7cXw = ozz::io::File("skeleton.ozz", "rb"); | |
popFrame(); | |
} | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
const | |
ozzIncludePath = currentSourcePath.parentDir().parentDir()/"lib/ozz-animation/include" | |
type | |
Stream* {.importcpp: "ozz::io::stream", header: ozzIncludePath/"ozz/base/io/stream.h", inheritable.} = object | |
File* {.importcpp: "ozz::io::File", header: ozzIncludePath/"ozz/base/io/stream.h".} = object of Stream | |
proc constructStream():Stream {.constructor, importcpp: "ozz::io::Stream()", header: ozzIncludePath/"ozz/base/io/stream.h".} | |
proc constructFile*(): File {.constructor, importcpp: "ozz::io::File()", header: ozzIncludePath/"ozz/base/io/stream.h".} | |
proc constructFile*(filename: cstring; mode: cstring): File {.constructor, importcpp: "ozz::io::File(@)", header: ozzIncludePath/"ozz/base/io/stream.h".} | |
proc constructFile*(file: pointer): File {.constructor, importcpp: "ozz::io::File(@)", header: ozzIncludePath/"ozz/base/io/stream.h".} | |
when isMainModule: | |
let f = constructFile("skeleton.ozz", "rb") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment