Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Just a Question of How to Use #1

Open
exonent opened this issue Jan 9, 2020 · 3 comments
Open

Just a Question of How to Use #1

exonent opened this issue Jan 9, 2020 · 3 comments

Comments

@exonent
Copy link

exonent commented Jan 9, 2020

First of all, Happy New Year!

My first question is: ¿Your emscripten-f2c is the same if I use F2C and EMS?

I have a problem with f2c, when Im using with EMScripten.
I normally use F2C with XCode to build some Fortran code into my iOS App. That works fine!
But now, Im migrating my iOS App to iOnic (Hybrid App Framework) but when Im using the command:

emcc \
file.c fileB.c fileC.c fileD.c fileE.c fileF.c fileG.c  \
-O0 \
-s WASM=1 \
-s MODULARIZE=1 \
-s ASSERTIONS=1 \
-s EMBIND_STD_STRING_IS_UTF8=1 \
-s ALLOW_MEMORY_GROWTH=1 \
-s NO_FILESYSTEM=1 \
-s EXPORT_ALL=1 \
-s EXPORTED_FUNCTIONS='["_new_MethodA", "_free_MethodA", "_new_MethodB", "_free_MethodC","_MethodD", "_MethodE", "MethodF"]' \
-s EXTRA_EXPORTED_RUNTIME_METHODS='["ccall", "cwrap"]' \
-o results/outputEmscriptenFile.js

Take this errors:

warning: To disable errors for undefined symbols use "-s ERROR_ON_UNDEFINED_SYMBOLS=0"
- error: undefined symbol: do_lio
- error: undefined symbol: e_rsfe
- error: undefined symbol: e_rsle
- error: undefined symbol: f_clos
- error: undefined symbol: f_open
- error: undefined symbol: i_indx
- error: undefined symbol: i_nint
- error: undefined symbol: pow_dd
- error: undefined symbol: pow_ri
- error: undefined symbol: r_mod
- error: undefined symbol: s_cat
- error: undefined symbol: s_cmp
- error: undefined symbol: s_copy
- error: undefined symbol: s_rsfe
- error: undefined symbol: s_rsle

How do you resolve it? I don't want to use "-s ERROR_ON_UNDEFINED_SYMBOLS=0" because when I deploy it into iOnic got the same errors but in the web console.

So, Can I use your emscripten-f2c to compile it and get an usable code (.JS & .wasm)?

My only problem is the "undefined symbol". Don't know how to solve...

@exonent
Copy link
Author

exonent commented May 22, 2020

Anyone? @josephwinston

@josephwinston
Copy link
Owner

josephwinston commented May 22, 2020 via email

@exonent
Copy link
Author

exonent commented May 24, 2020

I want to convert my Fortran to C using F2C and then using that C code in EMScripten. The F2C process works perfectly, but when I use the emcc command I get some:

warning: To disable errors for undefined symbols use "-s ERROR_ON_UNDEFINED_SYMBOLS=0"
- error: undefined symbol: do_lio
- error: undefined symbol: e_rsfe
- error: undefined symbol: e_rsle
- error: undefined symbol: f_clos
- error: undefined symbol: f_open
- error: undefined symbol: i_indx
- error: undefined symbol: i_nint
- error: undefined symbol: pow_dd
- error: undefined symbol: pow_ri
- error: undefined symbol: r_mod
- error: undefined symbol: s_cat
- error: undefined symbol: s_cmp
- error: undefined symbol: s_copy
- error: undefined symbol: s_rsfe
- error: undefined symbol: s_rsle

Thats because I'm using EMScripten. How do you resolve it? Thx!
Or whats steps you did to convert your fortran into EMScripten code? Thx again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants