# FPM linking fails

**URL:** <https://fortran-lang.discourse.group/t/fpm-linking-fails/6517>\
**Category:** Uncategorized\
**Created:** [September 15, 2023, 1:09pm UTC](https://fortran-lang.discourse.group/t/fpm-linking-fails/6517 "2023-09-15T13:09:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sprock](https://avatars.discourse-cdn.com/v4/letter/s/87869e/32.png) [@sprock](https://fortran-lang.discourse.group/u/sprock)\
**Post date:** [September 15, 2023, 1:09pm UTC](https://fortran-lang.discourse.group/t/fpm-linking-fails/6517/1 "2023-09-15T13:09:10Z")

</div>

Hello,

I have this manifest:

name = “e2e”  
version = “0.1.0”  
license = “license”  
author = “sprock”  
maintainer = “sprock@somewhere”  
copyright = “Copyright”  
[build]  
auto-executables = true  
auto-tests = true  
auto-examples = true  
module-naming = false  
external-modules = [“fox\_dom”, “fox\_wxml”]  
link = [“FoX\_dom”,“FoX\_common”,“FoX\_fsys”,“FoX\_utils”,“FoX\_wxml”,“FoX\_sax”]  
[install]  
library = false  
[fortran]  
implicit-typing = false  
implicit-external = false  
source-form = “free”

I invoke it like this:

fpm build --flag “-I/home/sprock/.local/fox/finclude” --link-flag “-fopenmp -L/home/sprock/.local/fox/lib”

The libraries exist in the specified directory:

ls ~/.local/fox/lib  
libFoX\_common.a\* libFoX\_dom.a\* libFoX\_fsys.a\* libFoX\_sax.a\* libFoX\_utils.a\* libFoX\_wcml.a\* libFoX\_wkml.a\* libFoX\_wxml.a

Linking fails with lots of undefined references:  
/usr/local/bin/ld: /home/sprock/.local/fox/lib/libFoX\_wxml.a(m\_wxml\_core.o): in function `__m_wxml_core_MOD_add_eol': /home/sprock/Software/FoX/fox/wxml/m_wxml_core.F90:1755: undefined reference to `\_\_m\_common\_buffer\_MOD\_dump\_buffer’

etc.

I’m using FPM Version: 0.9.0, alpha

Can someone please point out what I’m doing wrong?  
Thanks,  
sprock
