cancel
Showing results for 
Search instead for 
Did you mean: 

Undefined reference when porting from 4.9.3 to 4.12.3

egoltzman
Senior

Hi Martin,

Congratulations for the new release!

I'm trying to port an 4.9.3 project to 4.12.3 and I got some undefined reference error when compile with CubeIDE 1.1, is there a porting guidelines somewhere?

Do you see any thing in the list that might help me to resolve it?

BTW, the simulation under visual studio built with no error and runs OK.

Thanks,

Eyal

  • undefined reference to `touchgfx::Circle::getMinimalRectForUpdatedEndAngle(touchgfx::CWRUtil::Q5 const&) const' Circle.hpp
  • undefined reference to `touchgfx::ConstFont::ConstFont(touchgfx::GlyphNode const*, unsigned short, unsigned short, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned short, unsigned short)' GeneratedFont.cpp
  • undefined reference to `touchgfx::LCD::drawString(touchgfx::Rect, touchgfx::Rect const&, touchgfx::LCD::StringVisuals const&, unsigned short const*, ...)' TextAreaWithWildcard.hpp
  • undefined reference to `touchgfx::LCD::drawString(touchgfx::Rect, touchgfx::Rect const&, touchgfx::LCD::StringVisuals const&, unsigned short const*, ...)' TextAreaWithWildcard.hpp
  • undefined reference to `touchgfx::muldiv(long, long, long, long&)' CWRUtil.hpp
  • undefined reference to `touchgfx::ScrollableContainer::setScrollbarsPermanentlyVisible()' AboutScreenViewBase.cpp
  • undefined reference to `touchgfx::ScrollableContainer::setScrollbarsVisible(bool)' AboutScreenViewBase.cpp

11 REPLIES 11
Martin KJELDSEN
Chief III

Hi Eyal, thanks!

There shouldn't be any porting required, but sometimes the intention to be compliant with semantic versioning fails =) Or maybe there is some sort of step involved - Specifically when coming from 4.9.3 which is a PRE-ST release (non stm32 locked).

Did you make sure to press "Generate code" from the designer? (This is a manual step now). It should update your project to include the right files where as Makefiles using gcc from the simulator always just work.

/Martin

egoltzman
Senior

Yes Martin, I generated the code under the designer (It works much faster!) and as I mention in my case I also was able to compile and run the simulation.

Martin KJELDSEN
Chief III

I would expect the simulation to run fine because it relies on Makefiles which are more generic

There may be something wrong with how the cubeide project is updated. What does your post-generation step say? (in .touchgfx).

/Martin

egoltzman
Senior

There is no special instruction for the CubeIDE there, should I add something?

This is how it is look like now:

"PostGenerateCommand": "touchgfx update_project --project-file=simulator/msvs/Application.vcxproj",

Martin KJELDSEN
Chief III

Hi Eyal,

Yes, so the upgrade process does not do anything with your post-generate command. It can't guess that you were using CubeIDE. 4.12.3 now supports a project updater that can update CubeIDE projects. I'm not sure where your project is located, but you could do something like this:

"PostGenerateCommand": "touchgfx update_project --project-file=simulator/msvs/Application.vcxproj && touchgfx update_project --project-file=../STM32CubeIDE/.cproject"

/Martin

egoltzman
Senior

Hi Martin,

I updated the PostGenerateCommand as suggested but I still have those undefined references.

I think that what I should try to do is to compare my CubeIDE project with a working example of TouchGFX CubeIDE project, is there any? Or is there any guidelines how to generate a new one?

Thanks,

Eyal

MartinS
Associate II

​Hi,

I'm also unable to compile my project under 4.12.3 because of the same compilation errors (as described by @egoltzman​  ) . Till now I didn't have such problems with moving to the newer version. I use Atollic TrueStudio 9.3 and don't use CubeMX.

MartinS
Associate II

​Hi,

I was trying to cope with this problem for a whole day. After writing a message I found solution in this place ( https://touchgfx.zendesk.com/hc/en-us/community/posts/115000231465-Integrating-TouchGFX-with-SimplicityStudio ) Simply I forgot to update library version for linker. It is defined in build settings of Atollic TrueStudio. Maybe it will help you.

Thank you Martin, the library was my first suspect so I already checked this but its look like the link is using the right library