These are the two functions of my build script. I am using rust/cargo 1.75. The containers have 1.73.
I have been using the bottom main function to build and debug flawlessly in OS X for quite some time. Now, the code is stable enough to move to containers.
The command "cargo build" fails with the message that the symbols under the link attribute can not be found The link attribute is:
Likely, change your main so the linux one is like on your mac.
We have no idea what your requiring from an independent library so you should be looking at its requirements.
"the symbols under the link attribute can not be found" suggests it was compiled and found; contradictory to topic title.
Your getting it the wrong way around.
When you write "#[link ...]extern "C" ..." you are declaring that those functions will match symbols in the library. (the #[link is somewhat optional and without they will be searched in any given library at link time.)
To look inside at what symbols the build.rs created, find the XXXX under target directory and run "readelf -W -s file"