Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Dynamic and Static libraries(Working to compile an external library)
Dynamic and Static libraries [message #1827737] Fri, 22 May 2020 07:01 Go to next message
Keyara Edwards is currently offline Keyara EdwardsFriend
Messages: 1
Registered: May 2020
Junior Member
So I've tried adding both a static and dynamic libraries in eclipse using the MinGw linker and gcc++ compiler with limited success would anybody be able to clearly explain how to correctly do so. The errors i've run into area:

- the file type was not supported
-file could not be found

and then this wonderful error message as well:

-C:/Program Files (x86)/mingw-w64/i686-8.1.0-posix-dwarf-rt_v6-rev0/mingw32/bin/../lib/gcc/i686-w64-mingw32/8.1.0/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lD:\workspace\Libraries\C++\SDL2-2.0.12-win32-x64\SDL2.dll

Which after labeling clearly where everything was in the project manager has made me want to smash my pc, please help if possible.

Side note: I have added path in the path&symbols and in the tools under build with correct path to library.

Side note to side note: I might have not done it correctly but there are no compile errors like previous about file not found till the above one.
Re: Dynamic and Static libraries [message #1827740 is a reply to message #1827737] Fri, 22 May 2020 09:17 Go to previous message
David VavraFriend
Messages: 1112
Registered: October 2012
Senior Member
FWIW: I haven't used MinGW in a long time
but I don't think you can include a path in the -l (small L) option.
It's meant to be a shorthand notation of libXXX.a (or a Windows equivalent)
For MinGW, it's a bit more complicated.

Are you telling the linker to use a DLL?
You can't use a Windows DLL with MinGW that was generated with MSVC++

Some additional reading:

This forum is for addressing issues with CDT.
Issues involving using external tools are generally off-topic.
While CDT allows you to specify options so that it can generate makefile recipes,
it is assumed you know what those options mean and how to apply them.

Previous Topic:make: *** [Hello_World.elf] Error 1 Nios II Eclipse
Next Topic:Eclipse Locking Up
Goto Forum:

Current Time: Tue May 26 14:10:31 GMT 2020

Powered by FUDForum. Page generated in 0.02062 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top