How to build sml3d from svn? - opengl

I'm trying to build the sml3d from the SVN source (is there an another way?).
First, checked out the source with the following command like below:
$svn co --username anonsvn \
https://smlnj-gforge.cs.uchicago.edu/svn/sml3d/trunk sml3d
Then, I read sml3d/README 'BUILDING FROM SVN' section and tried like ...
$autoheader -Iconfig
$autoconf -Iconfig
$./configure
At this point, I got these many errors...
(snip)
make[1]: Entering directory `/home/eldesh/work/sml3d/sml3d/gen/fi-gen'
cc gen-sdl-offsets.c -o gen-sdl-offsets
/tmp/ccmu83YP.o: In function `main':
gen-sdl-offsets.c:(.text+0xb1): undefined reference to `prField'
gen-sdl-offsets.c:(.text+0xcd): undefined reference to `prField'
gen-sdl-offsets.c:(.text+0xe9): undefined reference to `prField'
gen-sdl-offsets.c:(.text+0x105): undefined reference to `prField'
gen-sdl-offsets.c:(.text+0x121): undefined reference to `prField'
/tmp/ccmu83YP.o:gen-sdl-offsets.c:(.text+0x13d): more undefined references to `prField' follow
/tmp/ccmu83YP.o: In function `main':
gen-sdl-offsets.c:(.text+0x1a9): undefined reference to `prConst'
blah blah blah...
Next, I guess the correct building protocol like below:
$autoheader -Iconfig
$autoconf -Iconfig
$./configure --enable-dev
$mkdir -p src/sml3d/opengl/c-abi
$cd gen/gen-from-xml/specs
$make
$../../../bin/glgen targets.json
$../../../bin/grpgen targets.json
But I got not-exists and Undefined errors yet:
~/sml3d/sml3d$ make
(snip)
make[2]: Entering directory `/home/eldesh/work/sml3d/sml3d/src/sml3d'
/home/eldesh/lcl/bin/mlton -mlb-path-var 'GL_DIR gl32' -stop tc sml3d.mlb
Error: opengl/opengl-32.mlb 45.3.
File gl-object-fn.sml does not exist.
Error: gl32/gl32-types.sml 8.26.
Undefined functor GLObjectFn.
(snip)
Error: gl32/frame-buffer.sml 11.14.
Undefined structure FramebufObj.
Error: gl32/frame-buffer.sml 13.25.
Undefined structure RenderbufObj.
(snip)
Error: gl32/frame-buffer.sml 7.27.
Type texture_id in signature but not in structure.
Error: gl32/frame-buffer.sml 60.14.
...
How to build sml3d correctly ?
environment
I use runtime/systems...
smlnj 110.77
mlton 20130715
linux x86

Related

Undefined reference to nlopt_... symbols

I am fairly new to Fortran and this may sound like a silly question. I encounter an error when compiling the Fortran code that is posted as an example in the NLOPT Wiki.
I compile in Ubuntu 18.04 LTS using the following command:
gfortran example-nlopt.f90 -o example-nlopt -I/usr/local/include/
The following error is produced in the terminal:
/tmp/ccbAim6b.o: In function `MAIN__':
example-nlopt.f90:(.text+0x26): undefined reference to `nlo_create_'
example-nlopt.f90:(.text+0x42): undefined reference to `nlo_get_lower_bounds_'
example-nlopt.f90:(.text+0x67): undefined reference to `nlo_set_lower_bounds_'
example-nlopt.f90:(.text+0x8a): undefined reference to `nlo_set_min_objective_'
example-nlopt.f90:(.text+0xca): undefined reference to `nlo_add_inequality_constraint_'
example-nlopt.f90:(.text+0x10e): undefined reference to `nlo_add_inequality_constraint_'
example-nlopt.f90:(.text+0x12d): undefined reference to `nlo_set_xtol_rel_'
example-nlopt.f90:(.text+0x164): undefined reference to `nlo_optimize_'
example-nlopt.f90:(.text+0x305): undefined reference to `nlo_destroy_'
collect2: error: ld returned 1 exit status
Based on what I saw in nlopt's documentation (https://nlopt.readthedocs.io/en/latest/NLopt_Installation/#changing-the-installation-directory) it looks like you just need to specify the library to link against. Maybe try this:
gfortran -I/usr/local/include/ -L/usr/local/lib example-nlopt.f90 -o example-nlopt -lnlopt -lm
This assumes you have the libnlopt.so in /usr/local/lib, if not then point to its location with the -L option.

Linker errors in libqt5network.so

Hello dear stack overflow users,
lately I tried to compile a qt5 project on my suse machine.
It seems that my linker refuses to link the libqt5network.so against openssl.
And I fail to understand why:
/usr/lib64/libQt5Network.so:-1: error: undefined reference to `TLSv1_1_server_method'
/usr/lib64/libQt5Network.so:-1: error: undefined reference to `SSL_set_psk_client_callback'
/usr/lib64/libQt5Network.so:-1: error: undefined reference to `TLSv1_1_client_method'
/usr/lib64/libQt5Network.so:-1: error: undefined reference to `SSL_select_next_proto'
/usr/lib64/libQt5Network.so:-1: error: undefined reference to `SSL_get0_next_proto_negotiated'
/usr/lib64/libQt5Network.so:-1: error: undefined reference to `TLSv1_2_client_method'
/usr/lib64/libQt5Network.so:-1: error: undefined reference to `SSL_CTX_set_next_proto_select_cb'
/usr/lib64/libQt5Network.so:-1: error: undefined reference to `TLSv1_2_server_method'
/usr/lib64/libQt5Network.so:-1: error: undefined reference to `EC_curve_nist2nid'
This Method seems the culprit, which shall download some information of a book frome the worldcat book database by its public api:
void Worldcat::search(QString searchTerm){
if(book1!=NULL){
setIsbn(searchTerm);
QNetworkRequest request(apiUri+getIsbn()+QString("?method=getMetadata&format=json&fl=*"));
networkManager = new QNetworkAccessManager(this);
connect(networkManager,SIGNAL(finished(QNetworkReply*)),
this,SLOT(replyFinished(QNetworkReply*)));
networkManager->get(request);
}
}
qmake.pro file
http://pastebin.com/Qk83kLaQ
The Generated make file, it is huge therefore paste bin:
http://pastebin.com/KuF9Y0JS
I will answer it myself since I found the solution when my mongodb also refused to start, maybe it is usefeull to someone the following does help:
zypper in libopenssl-devel
rpm -e --nodeps libopenssl0_9_8
cd /usr/lib64/
ln -s libssl.so libssl.so.0.9.8
ln -s libcrypto.so libcrypto.so.0.9.8
Seems that tumble weed has a mess with its openssl librarys.
Where I found the solution:
https://stackoverflow.com/a/32406299/4958693
Original source:
https://jira.mongodb.org/browse/SERVER-20259

g++ Windows Linker "Undefined reference to..." with SDL2

Overview
I am attempting to convert a C++ project from a Visual Studio solution to a makefile project (using g++), as a first step to supporting multiple platforms with ease. This project requires the Simple DirectMedia Layer 2 (SDL2) and SDL_image libraries. The project previously compiled without errors, and I have since corrected any errors halting the g++ compiler. I am still using Windows x64 and MinGW x64 at this point.
Problem
When linking, g++ throws errors as though there is something wrong with the SDL2 library, claiming that all functions of SDL2 can't be found. However, I know it is finding the libraries, because when I provide an incorrect name or path, I get an explicit error.
Here is my new makefile, apologies if it isn't up to standard:
# Source files
SRC_ENTITIES = Entity_Block.cpp Entity_Controller.cpp Entity_Cursor.cpp Entity_GreenEye.cpp Entity_Harry.cpp
SRC_ENGINE = Game.cpp Sound.cpp SoundManager.cpp Sprite.cpp Texture.cpp TextureManager.cpp Entity.cpp EntityManager.cpp
SRC_ENTRY = main.cpp
# Source and destination
SOURCE = $(SRC_ENTITIES) $(SRC_ENGINE) $(SRC_ENTRY)
DEST = crystal_engine.bin
# Compiler options
OUTPUT = -o $(DEST)
INCLUDES = -I . -I.\include\windows\SDL2-devel-2.0.4-mingw\SDL2-2.0.4\x86_64-w64-mingw32\include\SDL2 -I.\include\windows\SDL2_image-devel-2.0.1-mingw\SDL2_image-2.0.1\x86_64-w64-mingw32\include\SDL2
LIBPATHS = -L.\include\windows\SDL2-devel-2.0.4-mingw\SDL2-2.0.4\x86_64-w64-mingw32\lib -L.\include\windows\SDL2_image-devel-2.0.1-mingw\SDL2_image-2.0.1\x86_64-w64-mingw32\lib
LIBRARIES = -lSDL2 -lSDL2main -lSDL2_image
STANDARD = -std=c++0x
FLAGS = -Wall
default:
echo No task selected
compile:
g++ $(STANDARD) $(INCLUDES) $(FLAGS) $(SOURCE) $(OUTPUT) $(LIBPATHS) $(LIBRARIES)
run:
./$(DEST)
run_win:
$(DEST)
Therefor the command line currently looks like this:
g++ -std=c++0x -I . -I.\include\windows\SDL2-devel-2.0.4-mingw\SDL2-2.0.4\x86_64-w64-mingw32\include\SDL2 -I.\include\windows\SDL2_image-devel-2.0.1-mingw\SDL2_image-2.0.1\x86_64-w64-mingw32\include\SDL2 -Wall Entity_Block.cpp Entity_Controller.cpp Entity_Cursor.cpp Entity_GreenEye.cpp Entity_Harry.cpp Game.cpp Sound.cpp SoundManager.cpp Sprite.cpp Texture.cpp TextureManager.cpp Entity.cpp EntityManager.cpp main.cpp -o crystal_engine.bin -L.\include\windows\SDL2-devel-2.0.4-mingw\SDL2-2.0.4\x86_64-w64-mingw32\lib -L.\include\windows\SDL2_image-devel-2.0.1-mingw\SDL2_image-2.0.1\x86_64-w64-mingw32\lib -lSDL2 -lSDL2main -lSDL2_image
Disregarding warnings (removing -Wall), the output of the compile looks like this:
C:\Users\[...]\ccSkHjgE.o:Game.cpp:(.text+0x169): undefined reference to `SDL_GetTicks'
C:\Users\[...]\ccSkHjgE.o:Game.cpp:(.text+0x2b4): undefined reference to `SDL_GetMouseState'
C:\Users\[...]\ccSkHjgE.o:Game.cpp:(.text+0x2c2): undefined reference to `SDL_PollEvent'
C:\Users\[...]\ccSkHjgE.o:Game.cpp:(.text+0x2d0): undefined reference to `SDL_GetTicks'
C:\Users\[...]\ccSkHjgE.o:Game.cpp:(.text+0x363): undefined reference to `SDL_GetTicks'
C:\Users\[...]\ccSkHjgE.o:Game.cpp:(.text+0x3ef): undefined reference to `SDL_GetTicks'
C:\Users\[...]\ccSkHjgE.o:Game.cpp:(.text+0x46c): undefined reference to `SDL_GetTicks'
C:\Users\[...]\ccSkHjgE.o:Game.cpp:(.text+0x4e3): undefined reference to `SDL_RenderClear'
C:\Users\[...]\ccSkHjgE.o:Game.cpp:(.text+0x4fd): undefined reference to `SDL_RenderPresent'
C:\Users\[...]\ccSkHjgE.o:Game.cpp:(.text+0x597): undefined reference to `SDL_ShowCursor'
C:\Users\[...]\ccSkHjgE.o:Game.cpp:(.text+0x5b1): undefined reference to `SDL_Init'
C:\Users\[...]\ccSkHjgE.o:Game.cpp:(.text+0x633): undefined reference to `SDL_CreateRenderer'
C:\Users\[...]\ccSkHjgE.o:Game.cpp:(.text+0x663): undefined reference to `SDL_CreateWindowAndRenderer'
C:\Users\[...]\ccSkHjgE.o:Game.cpp:(.text+0x678): undefined reference to `SDL_SetWindowTitle'
C:\Users\[...]\ccSkHjgE.o:Game.cpp:(.text+0x836): undefined reference to `SDL_SetRenderDrawColor'
C:\Users\[...]\ccSkHjgE.o:Game.cpp:(.text+0x844): undefined reference to `SDL_RenderClear'
C:\Users\[...]\ccSkHjgE.o:Game.cpp:(.text+0x852): undefined reference to `SDL_RenderPresent'
C:\Users\[...]\ccSkHjgE.o:Game.cpp:(.text+0x865): undefined reference to `SDL_SetHint'
C:\Users\[...]\ccSkHjgE.o:Game.cpp:(.text+0x881): undefined reference to `SDL_RenderSetLogicalSize'
C:\Users\[...]\ccSkHjgE.o:Game.cpp:(.text+0x895): undefined reference to `SDL_GL_SetAttribute'
C:\Users\[...]\ccSkHjgE.o:Game.cpp:(.text+0x8a3): undefined reference to `SDL_GetError'
C:\Users\[...]\ccSkHjgE.o:Game.cpp:(.text+0x8d8): undefined reference to `SDL_GL_SetAttribute'
C:\Users\[...]\ccSkHjgE.o:Game.cpp:(.text+0x8e6): undefined reference to `SDL_GetError'
C:\Users\[...]\ccSkHjgE.o:Game.cpp:(.text+0xa3d): undefined reference to `SDL_Quit'
C:\Users\[...]\ccSkHjgE.o:Game.cpp:(.text+0xaba): undefined reference to `SDL_DestroyWindow'
C:\Users\[...]\ccSkHjgE.o:Game.cpp:(.text+0xad1): undefined reference to `SDL_DestroyRenderer'
f:/mingw/mingw-4.8.1/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: C:\Users\[...]\ccSkHjgE.o: bad reloc address 0x1b in section `.text$printf[_printf]'
collect2.exe: error: ld returned 1 exit status
make: *** [compile] Error 1
Troubleshooting
I have tried a number of things from supplying exact paths to libraries to updating SDL from 2.0.3 to 2.0.4. The behavior is the same. There are two include/lib folders in the MinGW devel folder for each architecture, and changing which one I include does not make a difference.
There seems to be a lot of commotion about the order of which arguments are supplied to g++, given the three posts below:
SDL2 Undefined references to functions
Try to change the sequence of the input params:
I've stumbled over this before (on Linux)
https://askubuntu.com/questions/68922/cant-compile-program-that-uses-sdl-after-upgrade-to-11-10-undefined-reference
Ok, solved. Apparently, for some mysterious reason, the order of the gcc options now matters.
http://smf.cataclysmdda.com/index.php?topic=11028.0
It looks like the SDL2_image library is included, but the main SDL2 library is not (the references could be out of order).
Unfortunately, regardless of how I have reordered the arguments, I can't seem to change this result. Unlike with most issues, I haven't even been able to make it any worse! Any and all help is greatly appreciated.
I don't believe this has anything to do with my code, considering a compile without linking -c completes fine, but if it assists with the solution I would be more than happy to post some of it (it is a LOT of code).
Edits
Per request, here is a dump of the full compile with the -v and -Wall options. It is too large for this question so I threw it in a pastebin.
http://pastebin.com/ydET621i
When using the -DDECLSPEC=__declspec(dllimport) option, the output becomes:
C:\Users\[...]\ccZ61vi9.o:Game.cpp:(.text+0x169): undefined reference to `_imp__SDL_GetTicks'
C:\Users\[...]\ccZ61vi9.o:Game.cpp:(.text+0x2b6): undefined reference to `_imp__SDL_GetMouseState'
C:\Users\[...]\ccZ61vi9.o:Game.cpp:(.text+0x2c6): undefined reference to `_imp__SDL_PollEvent'
C:\Users\[...]\ccZ61vi9.o:Game.cpp:(.text+0x2d6): undefined reference to `_imp__SDL_GetTicks'
C:\Users\[...]\ccZ61vi9.o:Game.cpp:(.text+0x36b): undefined reference to `_imp__SDL_GetTicks'
C:\Users\[...]\ccZ61vi9.o:Game.cpp:(.text+0x3f9): undefined reference to `_imp__SDL_GetTicks'
C:\Users\[...]\ccZ61vi9.o:Game.cpp:(.text+0x478): undefined reference to `_imp__SDL_GetTicks'
C:\Users\[...]\ccZ61vi9.o:Game.cpp:(.text+0x4f1): undefined reference to `_imp__SDL_RenderClear'
C:\Users\[...]\ccZ61vi9.o:Game.cpp:(.text+0x50d): undefined reference to `_imp__SDL_RenderPresent'
C:\Users\[...]\ccZ61vi9.o:Game.cpp:(.text+0x5a9): undefined reference to `_imp__SDL_ShowCursor'
C:\Users\[...]\ccZ61vi9.o:Game.cpp:(.text+0x5c5): undefined reference to `_imp__SDL_Init'
C:\Users\[...]\ccZ61vi9.o:Game.cpp:(.text+0x649): undefined reference to `_imp__SDL_CreateRenderer'
C:\Users\[...]\ccZ61vi9.o:Game.cpp:(.text+0x67b): undefined reference to `_imp__SDL_CreateWindowAndRenderer'
C:\Users\[...]\ccZ61vi9.o:Game.cpp:(.text+0x692): undefined reference to `_imp__SDL_SetWindowTitle'
C:\Users\[...]\ccZ61vi9.o:Game.cpp:(.text+0x852): undefined reference to `_imp__SDL_SetRenderDrawColor'
C:\Users\[...]\ccZ61vi9.o:Game.cpp:(.text+0x862): undefined reference to `_imp__SDL_RenderClear'
C:\Users\[...]\ccZ61vi9.o:Game.cpp:(.text+0x872): undefined reference to `_imp__SDL_RenderPresent'
C:\Users\[...]\ccZ61vi9.o:Game.cpp:(.text+0x887): undefined reference to `_imp__SDL_SetHint'
C:\Users\[...]\ccZ61vi9.o:Game.cpp:(.text+0x8a5): undefined reference to `_imp__SDL_RenderSetLogicalSize'
C:\Users\[...]\ccZ61vi9.o:Game.cpp:(.text+0x8bb): undefined reference to `_imp__SDL_GL_SetAttribute'
C:\Users\[...]\ccZ61vi9.o:Game.cpp:(.text+0x8cb): undefined reference to `_imp__SDL_GetError'
C:\Users\[...]\ccZ61vi9.o:Game.cpp:(.text+0x902): undefined reference to `_imp__SDL_GL_SetAttribute'
C:\Users\[...]\ccZ61vi9.o:Game.cpp:(.text+0x912): undefined reference to `_imp__SDL_GetError'
C:\Users\[...]\ccZ61vi9.o:Game.cpp:(.text+0xa6b): undefined reference to `_imp__SDL_Quit'
C:\Users\[...]\ccZ61vi9.o:Game.cpp:(.text+0xaea): undefined reference to `_imp__SDL_DestroyWindow'
C:\Users\[...]\ccZ61vi9.o:Game.cpp:(.text+0xb03): undefined reference to `_imp__SDL_DestroyRenderer'
f:/mingw/mingw-4.8.1/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: C:\Users\[...]\ccZ61vi9.o: bad reloc address 0x1b in section `.text$printf[_printf]'
collect2.exe: error: ld returned 1 exit status
make: *** [compile] Error 1
Running ar -t libSDL2.a produces the following:
SDL.o
SDL_assert.o
SDL_error.o
SDL_hints.o
SDL_log.o
SDL_atomic.o
SDL_spinlock.o
SDL_audio.o
SDL_audiocvt.o
SDL_audiodev.o
SDL_audiotypecvt.o
SDL_mixer.o
SDL_wave.o
SDL_cpuinfo.o
SDL_dynapi.o
SDL_clipboardevents.o
SDL_dropevents.o
SDL_events.o
SDL_gesture.o
SDL_keyboard.o
SDL_mouse.o
SDL_quit.o
SDL_touch.o
SDL_windowevents.o
SDL_rwops.o
SDL_haptic.o
SDL_gamecontroller.o
SDL_joystick.o
e_atan2.o
e_log.o
e_pow.o
e_rem_pio2.o
e_sqrt.o
k_cos.o
k_rem_pio2.o
k_sin.o
k_tan.o
s_atan.o
s_copysign.o
s_cos.o
s_fabs.o
s_floor.o
s_scalbn.o
s_sin.o
s_tan.o
SDL_power.o
SDL_d3dmath.o
SDL_render.o
SDL_yuv_mmx.o
SDL_yuv_sw.o
SDL_render_d3d.o
SDL_render_d3d11.o
SDL_render_gl.o
SDL_shaders_gl.o
SDL_render_gles.o
SDL_render_gles2.o
SDL_shaders_gles2.o
SDL_render_psp.o
SDL_blendfillrect.o
SDL_blendline.o
SDL_blendpoint.o
SDL_drawline.o
SDL_drawpoint.o
SDL_render_sw.o
SDL_rotate.o
SDL_getenv.o
SDL_iconv.o
SDL_malloc.o
SDL_qsort.o
SDL_stdlib.o
SDL_string.o
SDL_thread.o
SDL_timer.o
SDL_RLEaccel.o
SDL_blit.o
SDL_blit_0.o
SDL_blit_1.o
SDL_blit_A.o
SDL_blit_N.o
SDL_blit_auto.o
SDL_blit_copy.o
SDL_blit_slow.o
SDL_bmp.o
SDL_clipboard.o
SDL_egl.o
SDL_fillrect.o
SDL_pixels.o
SDL_rect.o
SDL_shape.o
SDL_stretch.o
SDL_surface.o
SDL_video.o
SDL_nullevents.o
SDL_nullframebuffer.o
SDL_nullvideo.o
SDL_diskaudio.o
SDL_dummyaudio.o
SDL_windows.o
SDL_xinput.o
SDL_windowsclipboard.o
SDL_windowsevents.o
SDL_windowsframebuffer.o
SDL_windowskeyboard.o
SDL_windowsmessagebox.o
SDL_windowsmodes.o
SDL_windowsmouse.o
SDL_windowsopengl.o
SDL_windowsopengles.o
SDL_windowsshape.o
SDL_windowsvideo.o
SDL_windowswindow.o
SDL_winmm.o
SDL_directsound.o
SDL_xaudio2.o
SDL_dinputjoystick.o
SDL_mmjoystick.o
SDL_windowsjoystick.o
SDL_xinputjoystick.o
SDL_dinputhaptic.o
SDL_windowshaptic.o
SDL_xinputhaptic.o
SDL_syspower.o
SDL_sysfilesystem.o
SDL_sysmutex.o
SDL_syssem.o
SDL_systhread.o
SDL_systls.o
SDL_syscond.o
SDL_systimer.o
SDL_sysloadso.o
Thanks to suggestions from #J.JHakala and #user657267 I have reached the conclusion that my installation of MinGW is actually 32 bit! Given that I was using the 64 bit libraries, they would read in like any other library, but the functions within them were not recognized.
For anyone else having this problem, you can download the 64 bit version of MinGW or alternatively just switch which libraries you are importing.
x86: i686-w64-mingw32
x64: x86_64-w64-mingw32

OpenDMTP configuration on Linux machine

I've successfully installed and run the OpenGTS server application using the HTTP based GPRMC servlet.
Now I'm attempting to run the OpenDMTP C Client on linux. I get stuck at the very first step.
When I try to use the make command in the terminal:
make dest=linux dmtp
I get the following errors:
Linking 'dmtpd' ...
cc -o ./build_lin/obj/dmtp/dmtpd -Wall -DTARGET_LINUX -DTRANSPORT_MEDIA_SOCKET -
DPROTOCOL_THREAD -DGPS_THREAD -Isrc /usr/lib/i386-linux-gnu/libpthread.so /usr/lib/i386-linux-gnu/libm.so ./build_lin/obj/custom/startup.o /build_lin/obj/custom/transport.o ./build_lin/obj/custom/log.o ./build_lin/obj/custom/gps.o ./build_lin/obj/custom/gpsmods.o ./build_lin/obj/custom/linux/os.o -L./build_lin/obj/lib -lmodule -lbase -ltools
./build_lin/obj/lib/libbase.a(propman.o): In function _propGetDoubleValue': propman.c: (.text+0xec8): undefined reference topow'
propman.c:(.text+0xf0b): undefined reference to pow'
./build_lin/obj/lib/libbase.a(propman.o): In function_propSetDoubleValue':
propman.c:(.text+0xf5b): undefined reference to pow' propman.c:(.text+0xf66): undefined reference torint'
./build_lin/obj/lib/libbase.a(propman.o): In function _propInitKeyValueFromString':
propman.c:(.text+0x26e4): undefined reference topow'
propman.c:(.text+0x26ef): undefined reference to rint'
./build_lin/obj/lib/libtools.a(gpstools.o): In functiongpsRadiansToPoint':
gpstools.c:(.text+0x253): undefined reference to sin' gpstools.c:(.text+0x269): undefined reference to cos'
gpstools.c:(.text+0x277): undefined reference to cos' gpstools.c:(.text+0x292): undefined reference to sin'
gpstools.c:(.text+0x2b0): undefined reference to sqrt' gpstools.c:(.text+0x2be): undefined reference to sqrt'
gpstools.c:(.text+0x2cd): undefined reference to atan2'
./build_lin/obj/lib/libtools.a(threads.o): In functionthreadCreate':
threads.c:(.text+0x191): undefined reference to `pthread_create'
It appears math.h isn't being accessed by the file. I think the program doesn't include the headers from the \usr\include directory but don't know how to add this path to the makefile. Please help!
Please help!

Linking with gl3n Errors

When I try to link my minimal program
import gl3n.linalg;
pragma(lib, "gl3n");
void main(string args[]) {
}
against the OpenGL library gl3n as
dmd -debug -gc -unittest -D -Dd/home/per/.emacs.d/auto-builds/dmd/Debug-Boundscheck-Unittest/home/per/Work/cognia/ -w ~/Work/cognia/t_opengl.d -of/home/per/.emacs.d/auto-builds/dmd/Debug-Boundscheck-Unittest/home/per/Work/cognia/t_opengl
it errors as
LANG=en dmd -debug -gc -unittest -D -Dd/home/per/.emacs.d/auto-builds/dmd/Debug-Boundscheck-Unittest/home/per/Work/cognia/ -w ~/Work/cognia/t_opengl.d -of/home/per/.emacs.d/auto-builds/dmd/Debug-Boundscheck-Unittest/home/per/Work/cognia/t_opengl
/home/per/opt/x86_64-unknown-linux-gnu/dmd/bin/../lib/libgl3n.a(util.o): In function `no symbol':
gl3n/util.d:(.text+0x6): undefined reference to `_Dmodule_ref'
/home/per/opt/x86_64-unknown-linux-gnu/dmd/bin/../lib/libgl3n.a(linalg.o): In function `no symbol':
gl3n/linalg.d:(.text+0x6): undefined reference to `_Dmodule_ref'
/home/per/opt/x86_64-unknown-linux-gnu/dmd/bin/../lib/libgl3n.a(plane.o): In function `no symbol':
gl3n/plane.d:(.text+0x6): undefined reference to `_Dmodule_ref'
/home/per/opt/x86_64-unknown-linux-gnu/dmd/bin/../lib/libgl3n.a(plane.o): In function `_D4gl3n5plane13__T6PlaneTTfZ6PlaneT8opEqualsMxFNaNbNfS4gl3n5plane13__T6PlaneTTfZ6PlaneTZb':
gl3n/plane.d:(.text._D4gl3n5plane13__T6PlaneTTfZ6PlaneT8opEqualsMxFNaNbNfS4gl3n5plane13__T6PlaneTTfZ6PlaneTZb+0x51): undefined reference to `_D4gl3n6linalg16__T6VectorTfVi3Z6Vector53__T8opEqualsTxS4gl3n6linalg16__T6VectorTfVi3Z6VectorZ8opEqualsMxFNaNbNfxS4gl3n6linalg16__T6VectorTfVi3Z6VectorZb'
/home/per/opt/x86_64-unknown-linux-gnu/dmd/bin/../lib/libgl3n.a(math.o): In function `no symbol':
gl3n/math.d:(.text+0x6): undefined reference to `_Dmodule_ref'
collect2: error: ld returned 1 exit status
--- errorlevel 1
What is _Dmodule_ref?
_Dmodule_ref is a special symbol in druntime. The problem here is most likely related to either a wrongly installed druntime or an object.d in the current working directory.
1) Does compiling hello world work? If not, might help to reinstall dmd/druntime/phobos.
2) Is there a file in the same directory as your gl3n app called object.d? If so, rename it or something since dmd can see it there and get confused, thinking you want it to act as a custom druntime.