Skip to main content
Home
for DLMS smart meters
Open source solutions for DLMS smart metering

Main navigation

  • Home
  • Products
  • About us
  • Open Source
  • Community
  • Forum
  • Downloads
User account menu
  • Log in

Breadcrumb

  1. Home
  2. Forums
  3. ESP 32 Linker Error

ESP 32 Linker error

Forum Rules

Before commenting read Forum rules

Don't comment the topic if you have a new question.

You can create a new topic selecting correct category from Gurux Forum and then create a new topic selecting "New Topic" from the top left.

By rakeshpatil1983 , 5 September, 2021
Forums
Known problems

While compiling for Arduino Mega the compilation happens file and no issues.
Although while compiling for ESP 32 I'm getting a linker error as below

c:/users/rakes/appdata/local/arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/gcc8_4_0-esp-2021r1/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: C:\Users\rakes\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.0/tools/sdk/esp32/lib\libwpa_supplicant.a(crypto_mbedtls.c.obj): in function `aes_encrypt':
/home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/wpa_supplicant/src/crypto/crypto_mbedtls.c:326: multiple definition of `aes_encrypt'; C:\Users\rakes\AppData\Local\Temp\arduino_build_644450\sketch\src\ciphering.c.o:C:\Users\rakes\AppData\Local\Temp\arduino_build_644450\sketch\src/ciphering.c:343: first defined here
collect2.exe: error: ld returned 1 exit status
exit status 1
Error compiling for board ESP32 Dev Module.

Any Idea on why this could be happening ? any suggestions ?
I see that there is a clash of same function aes_encrypt in the ESP32 stach and in the gurux libraries.

Profile picture for user Kurumi

Kurumi

4 years 9 months ago

Hi,

Hi,

You have another aes_encrypt defined in your project. What compiler you are using? We can try to repeat this and find a way to remove it.

BR,
Mikko

rakeshpatil1983

4 years 9 months ago

Thanks Mikko for the quick

Thanks Mikko for the quick reply,
I solved this issue. In the cyphering.c I renamed the aes_encrypt function to aes_encrypt1 and replaced the same where the function is called. Now it's compiled.

Esp32 has its own aes_encrypt function for the wifi connects. This workaround has worked fine.

Profile picture for user Kurumi

Kurumi

4 years 9 months ago

Hi,

Hi,

If you can share your board settings this can be handled in the framework. It's easier to use in the future.

BR,
Mikko

rakeshpatil1983

4 years 5 months ago

I'm using the esp32 dev board

I'm using the esp32 dev board.
I'm using arduino ide and in that WIFI library has aes_encrypt function which is already defined.
Renaming that function in the cyphering.c has worked.
hope that helps to update the Library.

  • Create new account
  • Reset your password

Hire Us!

Latest Releases

  • Tue, 06/09/2026 - 11:16
    gurux.dlms.java 4.0.95
  • Tue, 06/09/2026 - 10:03
    Gurux.DLMS.Python 1.0.199
  • Mon, 06/08/2026 - 13:39
    gurux.dlms.cpp 9.0.2606.0801
  • Mon, 06/01/2026 - 10:15
    gurux.dlms.cpp 9.0.2606.0101
  • Thu, 05/28/2026 - 16:06
    gurux.dlms.java 4.0.94

New forum topics

  • Error reading L&G Meter
  • Pass a TCP Client to GXNet
  • Australian EDMI Mk10D (Essential Energy area)
  • Strange mix of data notificiation vs get response
  • DLMS Connection
More

Who's new

  • Tuanhgg
  • Adel
  • charnon
  • Paddles
  • Miguel Ángel
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin