Comments (4)
Looks like it compiles fine but does not link on my Windows machine.
C:/msys32/mingw32/bin/../lib/gcc/i686-w64-mingw32/7.3.0/../../../../i686-w64-mingw32/bin/ld.exe: C:\Users\gt\nimcache\tnimterop_c_d\nimterop_tnimterop_c.cpp.o:nimterop_tnimterop_c.cpp:(.text+0xeeb): undefined reference to `test_call_int()'
C:/msys32/mingw32/bin/../lib/gcc/i686-w64-mingw32/7.3.0/../../../../i686-w64-mingw32/bin/ld.exe: C:\Users\gt\nimcache\tnimterop_c_d\nimterop_tnimterop_c.cpp.o:nimterop_tnimterop_c.cpp:(.text+0x11d3): undefined reference to `_test_call_int_param_(int)'
C:/msys32/mingw32/bin/../lib/gcc/i686-w64-mingw32/7.3.0/../../../../i686-w64-mingw32/bin/ld.exe: C:\Users\gt\nimcache\tnimterop_c_d\nimterop_tnimterop_c.cpp.o:nimterop_tnimterop_c.cpp:(.text+0x14d0): undefined reference to `test_call_int_param2(int, STRUCT1)'
C:/msys32/mingw32/bin/../lib/gcc/i686-w64-mingw32/7.3.0/../../../../i686-w64-mingw32/bin/ld.exe: C:\Users\gt\nimcache\tnimterop_c_d\nimterop_tnimterop_c.cpp.o:nimterop_tnimterop_c.cpp:(.text+0x17cd): undefined reference to `test_call_int_param3(int, STRUCT1)'
C:/msys32/mingw32/bin/../lib/gcc/i686-w64-mingw32/7.3.0/../../../../i686-w64-mingw32/bin/ld.exe: C:\Users\gt\nimcache\tnimterop_c_d\nimterop_tnimterop_c.cpp.o:nimterop_tnimterop_c.cpp:(.text+0x1ab9): undefined reference to `test_call_int_param4(ENUM)'
collect2.exe: error: ld returned 1 exit status
Error: execution of an external program failed: 'g++.exe -o C:\Dropbox\Private\github\nimterop\tests\tnimterop_c.exe C:\Users\gt\nimcache\tnimterop_c_d\runtime.c.o C:\Users\gt\nimcache\tnimterop_c_d\test.c.o C:\Users\gt\nimcache\tnimterop_c_d\stdlib_system.cpp.o C:\Users\gt\nimcache\tnimterop_c_d\nimterop_tnimterop_c.cpp.o C:\Users\gt\nimcache\tnimterop_c_d\stdlib_unittest.cpp.o C:\Users\gt\nimcache\tnimterop_c_d\stdlib_macros.cpp.o C:\Users\gt\nimcache\tnimterop_c_d\stdlib_strutils.cpp.o C:\Users\gt\nimcache\tnimterop_c_d\stdlib_streams.cpp.o C:\Users\gt\nimcache\tnimterop_c_d\stdlib_times.cpp.o C:\Users\gt\nimcache\tnimterop_c_d\stdlib_sets.cpp.o C:\Users\gt\nimcache\tnimterop_c_d\stdlib_parseutils.cpp.o C:\Users\gt\nimcache\tnimterop_c_d\stdlib_math.cpp.o C:\Users\gt\nimcache\tnimterop_c_d\stdlib_bitops.cpp.o C:\Users\gt\nimcache\tnimterop_c_d\stdlib_algorithm.cpp.o C:\Users\gt\nimcache\tnimterop_c_d\stdlib_unicode.cpp.o C:\Users\gt\nimcache\tnimterop_c_d\stdlib_options.cpp.o C:\Users\gt\nimcache\tnimterop_c_d\stdlib_typetraits.cpp.o C:\Users\gt\nimcache\tnimterop_c_d\stdlib_strformat.cpp.o C:\Users\gt\nimcache\tnimterop_c_d\stdlib_winlean.cpp.o C:\Users\gt\nimcache\tnimterop_c_d\stdlib_dynlib.cpp.o C:\Users\gt\nimcache\tnimterop_c_d\stdlib_hashes.cpp.o C:\Users\gt\nimcache\tnimterop_c_d\stdlib_os.cpp.o C:\Users\gt\nimcache\tnimterop_c_d\stdlib_terminal.cpp.o C:\Users\gt\nimcache\tnimterop_c_d\stdlib_colors.cpp.o C:\Users\gt\nimcache\tnimterop_c_d\stdlib_tables.cpp.o C:\Users\gt\nimcache\tnimterop_c_d\nimterop_cimport.cpp.o C:\Users\gt\nimcache\tnimterop_c_d\nimterop_getters.cpp.o C:\Users\gt\nimcache\tnimterop_c_d\regex_regex.cpp.o C:\Users\gt\nimcache\tnimterop_c_d\unicodedb_properties.cpp.o C:\Users\gt\nimcache\tnimterop_c_d\unicodedb_properties_data.cpp.o C:\Users\gt\nimcache\tnimterop_c_d\unicodedb_types.cpp.o C:\Users\gt\nimcache\tnimterop_c_d\unicodedb_types_data.cpp.o C:\Users\gt\nimcache\tnimterop_c_d\unicodeplus_unicodeplus.cpp.o C:\Users\gt\nimcache\tnimterop_c_d\treesitter_runtime.cpp.o C:\Users\gt\nimcache\tnimterop_c_d\nimterop_git.cpp.o C:\Users\gt\nimcache\tnimterop_c_d\stdlib_osproc.cpp.o C:\Users\gt\nimcache\tnimterop_c_d\stdlib_strtabs.cpp.o C:\Users\gt\nimcache\tnimterop_c_d\stdlib_cpuinfo.cpp.o C:\Users\gt\nimcache\tnimterop_c_d\nimterop_globals.cpp.o '
from nimterop.
This is because of C++ name mangling. See here.
I'm pushing a fix in test.h.
from nimterop.
could we reopen? the test was disabled, see 1e086d5#r31803031
and indeed now fails if we uncomment; was there a regression at some point?
from nimterop.
=> PR #30
from nimterop.
Related Issues (20)
- nimterop/globals.nim(8, 18) Error: cannot open file: compiler/ast HOT 2
- using system tree-sitter HOT 6
- Parsing a global variable that's a pointer to an array of functions
- Structs mapped from C header need completeStruct pragma, otherwise sizeof doesn't work on those
- VM does not support 'cast' from tyFloat to tyFloat HOT 2
- [Question] Change build directory HOT 1
- Toast parsing comment as var HOT 4
- Inject code to process `#define`? HOT 8
- Building Failed with nimble. HOT 2
- [Question] Binding to OpenCV HOT 2
- Using nimterop in MSYS2 Bash environment on Windows HOT 3
- Header path handling on Windows HOT 3
- βuint16_t β What happened?
- Typedef function with an enum return type
- Support OpenBSD
- The nimterop good this reference documentation to convert small C project
- [Question] Nimterop, libnx and DevKitPro | sys/lock.h : No such file or directory HOT 1
- "cmd: not found" when building using mingw building a windows executable in linux
- ssing comma in the example
- Toast segfault with comment after define
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nimterop.