Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » help! undefined reference error ECLIPSE (OLIMEX) ?
help! undefined reference error ECLIPSE (OLIMEX) ? [message #978877] Sat, 10 November 2012 07:03 Go to next message
mehmet karakaya is currently offline mehmet karakaya
Messages: 7
Registered: November 2012
Junior Member
hello forum,

I am trying to compile a C project for STM32 with Eclipse (OLIMEX)

I got the following error

C:\OlimexODS\examples\STM32-E407_blink_FLASH_DENEME/main.c:156: undefined reference to SYSCFG_ETH_MediaInterfaceConfig'
(a function in stm32f4xx_syscfg.c)

the header file is included in main.c
#include "stm32f4xx_syscfg.h"

the source file where above function(SYSCFG_ETH_MediaInterfaceConfig) is declared
stm32f4xx_syscfg.c file is included in lib\src folder

why am I getting this error ? Confused

note : I got 10 of the same error only I posted just one here - al the same error message with different functions - my OS is winXP
Re: help! undefined reference error ECLIPSE (OLIMEX) ? [message #983272 is a reply to message #978877] Tue, 13 November 2012 15:26 Go to previous messageGo to next message
mehmet karakaya is currently offline mehmet karakaya
Messages: 7
Registered: November 2012
Junior Member
hello - I have seen lots of messages when I search the forum
all the same question like me
and all unresolved

why nobody help on this question ?
Re: help! undefined reference error ECLIPSE (OLIMEX) ? [message #985245 is a reply to message #978877] Thu, 15 November 2012 04:03 Go to previous messageGo to next message
Axel Mueller is currently offline Axel Mueller
Messages: 1927
Registered: July 2009
Senior Member
mehmet karakaya wrote on Sat, 10 November 2012 13:03
hello forum,

I am trying to compile a C project for STM32 with Eclipse (OLIMEX)

I got the following error

C:\OlimexODS\examples\STM32-E407_blink_FLASH_DENEME/main.c:156: undefined reference to SYSCFG_ETH_MediaInterfaceConfig'
(a function in stm32f4xx_syscfg.c)

the header file is included in main.c
#include "stm32f4xx_syscfg.h"

the source file where above function(SYSCFG_ETH_MediaInterfaceConfig) is declared
stm32f4xx_syscfg.c file is included in lib\src folder

why am I getting this error ? Confused

note : I got 10 of the same error only I posted just one here - al the same error message with different functions - my OS is winXP

That is an error message from the linker. The symbols from stm32f4xx_syscfg.o are not linked into your executable.
Does stm32f4xx_syscfg.c belong to your main project or is it an external library?


Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Re: help! undefined reference error ECLIPSE (OLIMEX) ? [message #985399 is a reply to message #985245] Thu, 15 November 2012 06:14 Go to previous messageGo to next message
mehmet karakaya is currently offline mehmet karakaya
Messages: 7
Registered: November 2012
Junior Member
hello thanks for answer

stm32f4xx_syscfg.c is in the lib/src folder of the project

stm32f4xx_syscfg.h is in the lib/inc folder of the project

stm32f4xx_syscfg.h is included in main.c

( these are the files from standart library of STM32 microcontroller )
Re: help! undefined reference error ECLIPSE (OLIMEX) ? [message #985721 is a reply to message #985399] Thu, 15 November 2012 14:56 Go to previous message
mehmet karakaya is currently offline mehmet karakaya
Messages: 7
Registered: November 2012
Junior Member
hello ,

moreover the file "stm32f4xx_syscfg.o"
is not in the obj folder when I give build project command

It seems the compiler doesnot compile stm32f4xx_syscfg.c

and add it to obj folder

so it cannot find the respective function in the obj

I looked at makefile file
there also the above file is not listed

I added a screenshot image from eclipse

I must add that the eclipse errors help menu is very limited too
othervise I didnot ask it here in the forum

  • Attachment: eclipse.JPG
    (Size: 109.40KB, Downloaded 119 times)
Previous Topic:Tracepoint Support in Juno available?
Next Topic:Including source files from a separate C++ project
Goto Forum:
  


Current Time: Sun Apr 20 07:08:17 EDT 2014

Powered by FUDForum. Page generated in 0.02597 seconds