-
Notifications
You must be signed in to change notification settings - Fork 151
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
HashLink output not working #124
Comments
your sdl.hdll is outdated, and you want -lhl not -Lhl. you'll also want the hdlls in your build (i.e. |
Hi well something different happened, but is still not building thanks again |
Add -lm
…On Tue, Mar 13, 2018, 9:22 AM varomix ***@***.***> wrote:
Hi
thank you for that
well something different happened, but is still not building
I got this error now
gcc -o myapp output.c -I. -lhl -lSDL2 sdl.hdll ui.hdll /usr/bin/ld:
/tmp/ccM9HboN.o: undefined reference to symbol 'fmod@@GLIBC_2.2.5'
//lib/x86_64-linux-gnu/libm.so.6: error adding symbols: DSO missing from
command line collect2: error: ld returned 1 exit status
thanks again
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#124 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AANZdoCthciOAMJ79WRQ2_s2H2y5sCLaks5td_JOgaJpZM4Sn5Bw>
.
|
more errors but seems to me that we're making progress :) output to big see it here please thanks |
per the function signatures, this time you need |
not there yet but close
|
bad link order, put -lGL later |
had it all over the place, is not working gcc -o myapp output.c -I. -lhl -lSDL2 -lm -lopenal -lGL sdl.hdll ui.hdll fmt.hdll openal.hdll ui.hdll uv.hdll same output |
Ok fixed the GL issues by putting the libs after the hdlls gcc -o myapp output.c -I. sdl.hdll ui.hdll fmt.hdll openal.hdll ui.hdll uv.hdll -lhl -lSDL2 -lm -lopenal -lGL
thank you |
It finally works, had to use hsdl that comes with hashlink that was quite a challenge :) |
Varomix If you get a chance it would be good if you can summarise the steps you needed. |
In summary I used
to compile, which I did on Kubuntu 17.10, installed the dependencies, GCC, SDL, OpenAL, OpenGL etc. To generate the C source To compile the native app order of those options are REALLY important, have all those libs after the *.hdll and that should work, I only did this on Linux so, windows and Mac would be a bit different let me know if there are any issues Good luck. |
I asked on behalf on all users. I will try again but probably not at the moment. |
I actually have this issue on Windows. I tried linking my |
Fixed, please update haxelib hlsdl library for hashlink 1.5 usage |
I did all the same but using https://haxe.org/download/file/4.0.0-preview.5/haxe-4.0.0-preview.5-linux64.tar.gz/ and on Arch Linux. Linker still complains:
I've set Also I use this params to compile:
...because hdll's are not found if I add them to list:
Could that be the reason of undefined references? How to add them properly? |
Still gives the same result.
|
@slouffka try to put all the hdll (+ -L) before main.c, you can also make sure the symbols are part of the hdll by using |
@ncannasse thanks for the reply. It helped a lot.
I've created a simple bash script. Could be an inline command but this reads better and can be reused if put in parent of ./out directory. Also turns out there's no matter where to put Now the code is compiling and running well. I've ended with these scripts to compile:
and
|
Hi
I'm trying to compile to native using HashLink and I can't make it work
I'm using Ubuntu 17.10, Haxe 4.0.0.preview.3 and HashLink 1.5
I can compile to C but compiling using GCC throws a bunch of errors and fails
commands
haxe -hl output.c -cp src -lib heaps -lib hlsdl -main Main
gcc -o myapp -I. -D INCLUDE_ALL -std=c11 output.c -Lhl
https://pastebin.com/MNcKBRpX
also compiling to .hl works but running that throws another error
haxe -hl output.hl -cp src -lib heaps -lib hlsdl -main Main
hl output.hl src/module.c(296) : FATAL ERROR : Invalid signature for function sdl@gl_options : Piiiii_v required but Piiiiii_v found in hdll
I'm following compilation instructions from here: https://hashlink.haxe.org/
So basically can't make it work in any way, please help
thanks
The text was updated successfully, but these errors were encountered: