Pier Nardin

Member since: Tuesday, 22 May 2018
Last login: 4 years ago
Profile viewed: 255 views

No Rank
Points: 0

Pier Nardin replied to the topic 'C++ Builder linker error' in the forum. 4 years ago

If I add the library .c files to my project I get even more "unresolved external errors" which once again disappear if I uncheck (default is checked) the "Generate underscores on symbol names" option in "Project | Options | C++ compiler | Output" and compile the project but then I get the error message:

[ilink32 Error] Error: Unresolved external '_main' referenced from ...

I am not compiling the .c files into a lib file.

Read More...

Pier Nardin replied to the topic 'C++ Builder linker error' in the forum. 4 years ago

I am linking to C code. All of my source files have a .c extension. In "Project | Options | C++ compiler" the "Force C++ compile" option is unchecked which means the compiler will use the source file extensions, which are all .c, to determine whether to compile the source as c code

There is a declaration

#ifdef __cplusplus
extern "C" {
#endif

in all the API header files. The TMR functions are implemented in an API c source code library. I did not add those files to my project but they are included in the main project c code unit.

Read More...

Pier Nardin created a new topic ' C++ Builder linker error' in the forum. 4 years ago

I have managed to get a C demo program to compile in C++ Builder 10 as a console application but I get the following linker errors:

[ilink32 Error] Error: Unresolved external '_TMR_create' referenced from ...
[ilink32 Error] Error: Unresolved external '_TMR_paramGet' referenced from ...
[ilink32 Error] Error: Unresolved external '_TMR_RP_init_simple' referenced from ...
[ilink32 Error] Error: Unresolved external '_TMR_paramSet' referenced from ...
[ilink32 Error] Error: Unresolved external '_TMR_strerr' referenced from ...
[ilink32 Error] Error: Unresolved external '_TMR_bytesToHex' referenced from ...

I have read various posts on Stack Overflow regarding this type of error and I have also read this document written by Embarcadero staff in 1998: community.embarcadero.com/article/techni...mbol-linker-messages

However, I still can't get the program to link successfully. If I uncheck (default is checked) the "Generate underscores on symbol names" option in "Project | Options | C++ compiler | Output" and compile the project I don't get the above errors but I get the error message:

[ilink32 Error] Error: Unresolved external '_main' referenced from ...

If I leave the "Generate underscores on symbol names" option checked I get the original errors. I have also tried checking and unchecking the "Don't prefix underbars to exported symbols" option (default is unchecked) but it does not seem to have any effect.

What am I doing wrong?

Read More...