Re: Linking errors

new topic     » goto parent     » topic index » view thread      » older message » newer message

I "think" I got those kinds of errors when trying to compile with Euphoria 4.1. I've been using 4.2 for a while now, and it compiles in the usual manner: euc hello

You could try this to see if it helps:

Although for most purposes, interpreting or binding programs works fine, if you wish to compile your program, on newest Linux distros (e.g. Mint 19 and later) euc fails: You'll need to run a short script, shown below.

Replace the -j8 with -j[n] where [n] is the number of processors you have. Makes things faster.

euc -build-dir build -extra-lflags="-no-pie" -makefile $1.ex
make -j8 -f $1.mak -C build

I named the script 'compile', make it executable, and call it like this: ./compile hello

irv@irv-desktop:~$ ./compile hello 
Translating code, pass: 1 2 3  generating 
 
3.c files were created. 
To build your project, change directory to build/ and type make -f hello.mak 
make: Entering directory '/home/irv/build' 
gcc -fomit-frame-pointer -c -w -fsigned-char -O2 -m64 -I/usr/local/euphoria-4.1.0-Linux-x64 -ffast-math init-.c -o init-.o 
gcc -fomit-frame-pointer -c -w -fsigned-char -O2 -m64 -I/usr/local/euphoria-4.1.0-Linux-x64 -ffast-math hello.c -o hello.o 
gcc -fomit-frame-pointer -c -w -fsigned-char -O2 -m64 -I/usr/local/euphoria-4.1.0-Linux-x64 -ffast-math main-.c -o main-.o 
gcc -o /home/irv/hello init-.o hello.o main-.o  /usr/local/euphoria-4.1.0-Linux-x64/bin/eu.a -m64 -ldl -lm -lpthread -no-pie 
make: Leaving directory '/home/irv/build' 

You can ignore all that extra text, don't bother about the changing to build and typing make, etc... it's already been done for you.

irv@irv-desktop:~$ ./hello 
Hello World! 

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu