Question:
Code Blocks C Programming Help?
MeTSCA
2012-10-07 07:21:36 UTC
Trying to run a code written in C.

Everything is ok except when I build it, it says

undefined reference to 'FT_Open'
undefined reference to 'FT_SetBitMode'
undefined reference to 'FT_SetBaudeRate'
undefined reference to 'FT_Write'

What should I do in order to fix this error?
Four answers:
anonymous
2012-10-07 07:48:36 UTC
Either pass the files containing those functions to the compiler, or indicate that you want to link your program with a library file containing those functions.
husoski
2012-10-07 07:50:36 UTC
You'll need to add the library with those functions into your project. Right-click on the project name and select "Build Options...". On the "Linker settings" tab, click "Add" and in the "Add library" box, click "..." to browse for your library. Select it and click OK as many times as needed. You'll need to do this for both the Debug and Release configurations, assuming you use them both.



There are other ways (like adding the library's location to your projects list of places to look for libraries, and then adding just the name to the library list, not the full path, but this will get you started more quickly. Then you can look into C::B and MinGW linker options more, at your leisure. (Fire up MinGW's command line, or MSYS, and type "gcc -v --help" to get a list of every option for every language and process (including back-end assembler and linker.))
anonymous
2016-12-11 14:11:51 UTC
it extremely is a living house windows-particular errors, with a living house windows-particular answer. positioned on the precise of your code #contain and then replace int substantial() with int WINAPI WinMain(...) replace the ... with living house windows established arguments, look them up.
David
2012-10-07 07:41:23 UTC
Maybe show us the relevant code?


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...