Skip to content
This repository has been archived by the owner on May 11, 2022. It is now read-only.

Error link whith mingw #11

Open
erpofr opened this issue Feb 6, 2021 · 1 comment
Open

Error link whith mingw #11

erpofr opened this issue Feb 6, 2021 · 1 comment
Assignees

Comments

@erpofr
Copy link

erpofr commented Feb 6, 2021

hi
When I compile the project with Mingw, I have the following error when i build the test :

C:\Users\Utilisateur\Documents\Developpement\C\gpxlib\build>mingw32-make.exe > log-build.txt
CMakeFiles\gpxcheck.dir/objects.a(gpxcheck.cpp.obj):gpxcheck.cpp:(.text+0x96a7): undefined reference to gpx::distance(double, double, double, double)' CMakeFiles\gpxcheck.dir/objects.a(gpxcheck.cpp.obj):gpxcheck.cpp:(.text+0x979e): undefined reference to gpx::bearing(double, double, double, double)'
CMakeFiles\gpxcheck.dir/objects.a(gpxcheck.cpp.obj):gpxcheck.cpp:(.text+0x98a5): undefined reference to `gpx::crosstrack(double, double, double, double, double, double)'
collect2.exe: error: ld returned 1 exit status
mingw32-make.exe[2]: *** [test\CMakeFiles\gpxcheck.dir\build.make:110: test/gpxcheck.exe] Error 1
mingw32-make.exe[1]: *** [CMakeFiles\Makefile2:413: test/CMakeFiles/gpxcheck.dir/all] Error 2
mingw32-make.exe: *** [Makefile:151: all] Error 2

In the file attach, you have the log of compilation. The functions in the file Algorithm.h are not linked the library gpxlib but the library is compiled without error.

I don't unsterstand the origin of this mistake in test module gpxcheck. Can you help me ? thank

log-build.txt

@irdvo irdvo self-assigned this Feb 14, 2021
irdvo pushed a commit that referenced this issue Feb 16, 2021
@irdvo
Copy link
Owner

irdvo commented Feb 16, 2021

The undefined references are missing a DLL export declaration. This is added.

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

No branches or pull requests

2 participants